[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #NPG-935647]: Netcdf 3.6.3 with Powerpc64: cputype error



> Unidata netCDF Support wrote:
> 
> > Howdy Tiago!
> >
> > Did you ever resolve this issue?
> 
> Hi,
> 
> No, I could not solve it. I needed 64-bit binaries in a PPC Mac, to link
> with code of the same architecture. Using gcc/gfortran, the following
> options are required for 64-bit binaries: -m64 -mpowerpc64.
> 
> If I just include them in gcc/gfortran, then I get the cputype error
> (something like: (netcdf.o) cputype (18) does not match previous archive
> members cputype). I think the problem is that netcdf.o, typeSizes.o and
> others are not being built with the FFLAGS, I can see it in the make
> script. A brute force approach is to include the flags in the compilers:
> 
> export FC='gfortran -m64 -mpowerpc64' '
> export CC='gcc -m64  -mpowerpc64'
> 
> This solves the cputype error, and I can see the compilation/linking
> goes well. But unfortunately, when I do 'make check', there are problems
> in the fortran 77 interface, when it tries to link the library with the
> test programs (I get undefined symbols for all the netcdf functions).
> 
> Cheers,
> 
> Tiago
> 
> 

Howdy Tiago,

There are two problems here. The easy one is the problem of the fortran flags. 
You need to set both FFLAGS (for F77 stuff) and FCFLAGS (for F90 stuff).

The other problem can probably be solved by setting CPPFLAGS to the correct 
value, which depends on your version of gfortran. You can try -DgFortran, and 
if that doesn't work, -Df2cFortran.

Don't forget to do a make distclean before every attempt.

Thanks,

Ed

Ticket Details
===================
Ticket ID: NPG-935647
Department: Support netCDF
Priority: Critical
Status: Closed