[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #HOB-657565]: building netcdf 3.6.3 on powerpc mac with 64-bit
- Subject: [netCDF #HOB-657565]: building netcdf 3.6.3 on powerpc mac with 64-bit
- Date: Fri, 24 Oct 2008 13:46:14 -0600
Hi Yolanda,
> First, I'm wondering if your binary files for the powerpc darwin are
> 64-bit. I'm assuming not since there is no 64 mentioned anywhere in
> your link.
Our binaries are 32-bit, generated on a ppc architecture.
> On this assumption I downloaded the source code and built the netcdf
> libraries on my mac using the following environment variables:
>
> FC gfortran
> CC gcc
> CFLAGS -02 -g -mpowerpc64
> FCFLAGS -02 -g -mpowerpc64
> FLAGS -02 -g -mpowerpc64 (was not sure if FORTRAN flags were FC or F)
> F90FLAGS -02 -g -mpowerpc64
>
> The gcc compiler states that for a mac powerpc the machine option for
> 64-bit is "-mpowerpc64" not "-m64" if I understood the man page
> correctly.
That should work, but I think you can also use "-arch ppc -m64"
instead of "-mpowerpc64".
> I configured using
>
> ./configure --prefix=/sw --diable-cxx
> make check
> make install
>
> I got no errors and the libraries were installed in the /sw/lib, etc.
> directories. The question is, how do I know if it is 64-bit or not??
Typically you can just use the "file" command on an executable linked
with the library. For example, assuming ncdump was installed in
/sw/bin/ncdump, run the command
$ file /sw/bin/ncdump
and the output will be either of
/sw/bin/ncdump: Mach-O executable ppc
/sw/bin/ncdump: Mach-O executable ppc64
depending on whether it's 32-bit or 64-bit. Using the file command on
a library sometimes also tells what architectures it supports, as in:
$ cd /usr/lib
$ file libfl.a
libfl.a: Mach-O universal binary with 4 architectures
libfl.a (for architecture ppc): current ar archive random library
libfl.a (for architecture ppc64): current ar archive random library
libfl.a (for architecture i386): current ar archive random library
libfl.a (for architecture x86_64): current ar archive random library
> Also, why in my 3.6.0 installation do I have dylibs but not in this
> one? Am I supposed to specify if I want those installed? I don't see
> where to do that.
I think you need to use the flag "-dynamiclib" for linking with gcc on
Mac OS X. Maybe this can be done by using LDFLAGS=-dynamiclib before
running configure.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: HOB-657565
Department: Support netCDF
Priority: Normal
Status: Closed