This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Hi, > > I am trying to build a 64-bit version of netcdf (3.6.3) in a powerpc64 > system (Mac G5). I am using gcc and gfortran 4.4.0 on Mac OS X 10.5.6. > To ensure compilation in 64-bit mode I use -mpowerpc64 -m64 as compiler > flags. I was told in the gcc mailing list that I should use both to have > a 64-bit executable in powerpc64. While just -mpowerpc64 is fine, > whenever I include -m64 the netcdf compilation exits with a cputype error: > > a(netcdf.o) cputype (18) does not match previous archive members cputype > (16777234) (all members must match) > > Searching on the support mailing list I found similar problems. I have > tested some of the suggestions, including: > > * Using "-arch ppc -m64" instead of -mpowerpc64: doesn't work, gcc does > not recognize the -arch option (?). > > * Using the configure option --enable-64bit: also doesn't work, > configure says that option is unrecognized. > > > How do you suggest I compile netcdf for powerpc64? It works fine if I > don't specify the 64-bit options, but I need to link it with a program > that has to be 64-bit. > > Thanks! > > Tiago Howdy Tiago! I don't have a powerpc system to experiment with, and I don't know the answer to your questions. However, I see something here, on this gcc page about the powerpc: http://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html It says: "The -mpowerpc option allows GCC to generate instructions that are found only in the 32-bit subset of the PowerPC architecture." and... "The -mpowerpc64 option allows GCC to generate the additional 64-bit instructions that are found in the full PowerPC64 architecture and to treat GPRs as 64-bit, doubleword quantities. GCC defaults to -mno-powerpc64." So perhaps you want to use -mpowerpc64. However, in general, the answer is to first figure out what command line options you need using some simple test case, before trying them on netCDF. If you can't get it to work on a simple test case, it is not going to work with the rather complex netCDF build system. Good luck, and please let us know if you solve this problem, so that we can make the solution available to other netCDF users. Thanks, Ed Ticket Details =================== Ticket ID: NPG-935647 Department: Support netCDF Priority: Normal Status: Closed