Re: Installing NCAR graphics on MacPro with OS 10.6.2 with 64 bits

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 25 2010 - 11:51:17 MST

Hi David,

There are problems building on these new 64-bit mac systems, because
they "look" like a 32-bit system to some software builds.

I think (hope) the fix in this case may be that the "libncarg_c.a"
library doesn't have the correct files being built, because it thinks
you're on a 32-bit system.

Try this fix:

Edit the file $NCARG/common/src/libncarg_c/yMakefile and change the
line:

#elif defined(Darwin) && defined(i386)

to:

#elif defined(Darwin) && defined(i386) && !defined(__LP64__)

Then, right above this line, add the following lines:

#elif defined(Darwin) && defined(i386) && defined(__LP64__)
EXCSRCS = bcopyswap.c logic32.c
EXFSRCS = gbytes.f sbytes.f
EXOBJS = sbytes.o gbytes.o bcopyswap.o logic32.o

To make sure the correct files get built, save this file, and in the
same directory, type:

make clean
make me
make includes depend all install

(make sure it used "-m64").

Type

   ls *.o

and make sure you see the following files:

argget.o error.o logic32.o rwchinfl.o
version.o
atoargv.o gbytes.o misc.o sbytes.o
bcopyswap.o i1mach.o ncarg_path.o sdbm.o
d1mach.o iargct.o options.o trnspprt.o
env.o lblank.o r1mach.o usleep.o

If you see "gsbytes.o" and not "sbytes.o" and "gbytes.o", then your
code will continue to seg fault.

If you don't see "gsbytes.o", then give your "make Everything" a try
again, making sure again that
you are using -m64. You can do this by adding "-m64" to the
CcOptions and FcOptions line
in the file $NCARG/config/Darwin_Intel.

--Mary

On Feb 25, 2010, at 7:47 AM, David Jorgensen wrote:

> Hello,
>
> I'm trying to install the latest NCAR graphics (5.1.1) on a new
> Intel MacPro running MacOSX 10.6.2 (Snow Leopard). I'm also using
> the latest gfortran and gcc. I downloaded the source from
> www.ncl.ucar.edu and followed the install instructions. All
> apparently made well (no obvious errors in the "make-install" file)
> but when I tried to test the code with "ncargex cpex08" it
> immediately returns with a segmentation fault:
>
> NCAR Graphics Fortran Example <cpex08>
>
> Copying cpex08.f
>
> Copying cpexcc.f
>
> Compiling and linking...
> gfortran -fPIC -fno-range-check -O -o cpex08 cpexcc.f cpex08.f -L/
> usr/local/ncarg/lib -L/usr/X11R6/lib -L/sw/lib -lncarg -lncarg_gks -
> lncarg_c -lXpm -lX11 -lXext
>
> Executing <cpex08>...
> Segmentation fault
>
>
> I can get it to make and run just fine by making NCAR graphics
> under 32 bits by replacing the following lines in $NCARG/config/
> Darwin_Intel:
>
> #define CCompiler gcc
> #define FCompiler gfortran
>
> with
>
> #define CCompiler gcc -m32
> #define FCompiler gfortran -m32
>
>
> However, I now need to keep duplicate copies of all my home-grown
> libraries, one for 64 bits and one for applications that use NCAR
> graphics (32 bits). Although that's doable, its a pain to keep all
> the Makefiles straight.
>
> Has anyone managed to install and use NCAR graphics made with 64
> bits under Mac Snow Leopard? Or have I missed something in my
> attempt to install ncarg?
>
> Thanks for any help,
>
> Dave
>
>
> ____________________________________________________________________
> David P. Jorgensen
> Research Meteorologist and Chief, NOAA/NSSL/Warning R&D Division
> NOAA/National Severe Storms Laboratory
> Publications Commissioner, American Meteorological Society
>
> e-mail: David.P.Jorgensen@noaa.gov
> http://www.nssl.noaa.gov
> Phone: (405) 325-6270 fax: (405) 325-6780
> Mailing Address: NOAA/NSSL, The National Weather Center, 120 David
> L. Boren Blvd., Norman, OK 73072-7323
>
>
>
>
>
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk

_______________________________________________
ncarg-talk mailing list
ncarg-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Thu Feb 25 11:51:28 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 18 2010 - 16:53:15 MDT