[ncl-install] Fwd: Have anybody installed ncarg on Mac OS 10.6
guangshan chen
gchen9 at gmail.com
Mon Nov 9 16:36:59 MST 2009
Hi Mary,
Thanks for the hint. Now WRAPIT works with 64-bit compiler (gcc and gfortran) in 32-bit ncl.
Here is what I did:
Searching "case Darwin" in WARPIT
First coming:
if ($debug == 1 && ($f90c == g77 || $f90c == gfortran)) then # GNU
set fopts = "$fopts -v -c -m32 -fno-common -ffortran-bounds-check -fno-second-underscore"
else
set fopts = "$fopts -c -m32 -O -fno-common -fno-second-underscore"
Second coming:
if ($debug == 1) then
set cmd = "gcc $copts -c -m32 -fno-common -I${NCARG_ROOT}/include WRAPIT.c"
echo $cmd
else
set cmd = "gcc $copts -c -m32 -fno-common -O -I${NCARG_ROOT}/include WRAPIT.c"
Third coming:
case Darwin: # MacOSX
if (-e /sw/lib/libg2c.a) then
set cmd = "gcc -m32 -bundle -flat_namespace -undefined suppress $ld_suffix -L/sw/lib -lg2c"
else
set cmd = "gcc -m32 -bundle -flat_namespace -undefined suppress $ld_suffix"
endif
if ($f90c == gfortran) then # gfortran compiler
set cmd = "$cmd -m32 -lgfortran"
endif
if ($f90c == g95) then # g95 compiler
set cmd = "$cmd -m32 -lf95"
endif
I like to build a 64-bit ncl for Snow leopard if I can get help form you. But I only can do it at weekend. I have more free time.
Guangshan
On Nov 9, 2009, at 4:21 PM, Mary Haley wrote:
>
> You could modify WRAPIT to force the compiler into a 32-bit compile, probably with a -m32 option. It's probably a 2 or 3 line change. I'm still not sure whether this will work.
>
> The sections to change in $NCARG_ROOT/bin/WRAPIT look like this:
>
> ======================================================
> case Darwin: # MacOSX (g77/gfortran)
> if ($debug == 1 && ($f90c == g77 || $f90c == gfortran)) then # GNU
> set fopts = "$fopts -v -c -fno-common -ffortran-bounds-check -fno-second-u\
> nderscore"
> else
> set fopts = "$fopts -c -O -fno-common -fno-second-underscore"
> endif
> breaksw
>
> ======================================================
>
> You would need to add whatever gfortran compiler option that forces a 32-bit compile (-m32?) to the "fopts" line in both cases.
>
> Then, you need to do the same for the "C" compiler section:
>
> ======================================================
>
> case Darwin:
> if ($debug == 1) then
> set cmd = "gcc $copts -c -fno-common -I${NCARG_ROOT}/include WRAPIT.c"
> echo $cmd
> else
> set cmd = "gcc $copts -c -fno-common -O -I${NCARG_ROOT}/include WRAPIT.c"
> endif
>
> ======================================================
>
>
> I am anxious to get a 64-bit build for a snow leopard system, but don't have access to one. I can help you (or anybody else for that matter) if you want to attempt this build.
>
> --Mary
>
More information about the ncl-install
mailing list