[MITgcm-support] cal pkg, OSX, absoft f77, and pragma

samar khatiwala spk at ldeo.columbia.edu
Fri Jul 29 10:50:42 EDT 2005


Ed:

Not sure if this is the solution, but have you tried (in the build file):

CPP='/usr/bin/cpp -traditional -P -xassembler-with-cpp'

Samar

On Fri, 29 Jul 2005, Ed Hill wrote:

> On Thu, 2005-07-28 at 21:21 -0500, m. r. schaferkotter wrote:
> > greetings:
> > i/m trying to build MITgcm with the cal pkg on OSX 10.3 with absoft f77
> > compiler.
> > the files build on linux with linux_ia32_pgf77 without incident.
> >
> > i/m using a build_option file darwin_absoft_f77
>
> Hi "m. r.",
>
> I found your problem.
>
>
> > the build stops with:
> >
> > cat cal_addtime.F | /Users/schaferk/MITgcm/tools/set64bitConst.sh |
> > /usr/bin/cpp -traditional -P -DWORDLENGTH=4 -I. > cal_addtime.for
> > /Applications/Absoft/bin/f77 -w -W -f -N15 -N113 -q  -O -U -c
> > cal_addtime.for
> >   error on line 1 of cal_addtime.for: illegal syntax
> >   error on line 1 of cal_addtime.for: illegal syntax
> >   error on line 1 of : too many continuation lines
> >   error on line 0 of : spelling error?
> >   error on line 359 of : RETURN statement in main program unit
> >
> > make: *** [cal_addtime.o] Error 1
> >
> > cat  cal_addtime.for
> >
> > #pragma GCC set_debug_pwd
> > "/Users/schaferk/MITgcm-expt/LUZ/expt_01.0/build"
> > C $Header: /u/gcmpack/MITgcm/pkg/cal/cal_addtime.F,v 1.3 2003/10/20
> > 06:25:16 dimitri Exp $
> > C $Name:  $
>
> The above error is identical to:
>
>   http://www.macosx.com/forums/showthread.php?t=229728
>
> and is described at
>
>   http://developer.apple.com/releasenotes/DeveloperTools/GCC3.html
>
> and its caused by the "brilliant" folks at Apple adding their non-
> standard "Xcode" junk to the version of GCC that they distribute.  The
> documentation says:
>
>   "The GCC 3.3 preprocessor inserts a new pragma, #pragma GCC
>    set_debug_pwd, as part of the new Distributed Builds feature.
>    (See below.) This may surprise tools and scripts that depended
>    on the exact form of preprocessed output from GCC. These
>    scripts should be rewritten to ignore unrecognized pragmas."
>
> so I guess we'll have to add something to get rid of those extra #pragma
> statements since I can't (in their on-line documentation, anyway) find
> an option that gets rid of them for us.
>
> Attached is a modified version of the "set64bitConst.sh" script that
> should fix your "#pragma" problems.  Please give it a try.
>
> And if you can find an option that gets rid of the annoying #pragma's
> that would be even better -- and please tell us about it!
>
> Ed
>
>
> --
> Edward H. Hill III, PhD
> office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
>              Cambridge, MA 02139-4307
> emails:  eh3 at mit.edu                ed at eh3.com
> URLs:    http://web.mit.edu/eh3/    http://eh3.com/
> phone:   617-253-0098
> fax:     617-253-4464
>



More information about the MITgcm-support mailing list