I’m trying to compile HDF5-1.8.5 on Mac OS X Server 10.6.4 with PGI Fortran 9.0 and gcc-4.2.1 and/or gcc-4.0.1. I’m trying for a 32-bit compile and thus using the 32-bit pgfortran and the “-m32” switch on gcc.
The compilation fails consistently with the following error:
/usr/bin/ranlib: object: .libs/libhdf5_fortran.a(H5f90global.o) malformed object (LC_SEGMENT command 0 filesize field greater than vmsize field)
ar: internal ranlib command failed
Some searches for this error haven’t turned up anything useful. There are a few threads in this forum, but nothing that seems relevant.
Does anyone here have any insight on this error or on compiling HDF5 on OS X?
The full command I was using:
./configure --prefix=/Users/corey/tmp/local/hdf5-1.8.5-patch1 --enable-fortran --with-zlib=/Users/corey/tmp/local/zlib-1.2.5 --with-szlib=/Users/corey/tmp/local/szip-2.1 --with-default-api-version=v16
I noticed you don’t have the --enable-fortran flag in yours which skips the compilation of libhdf5_fortran and thus the problem. I didn’t specifically set the CXX to include the -m32 flag. I tried that, but still get the error.
PGI compiler version:
pgf90 9.0-4 32-bit target on Apple OS/X
Hi,
The similar problem with libtool. Builds ok on MacOS 10.5.8, reports “malformed object (LC_SEGMENT command 0 filesize field greater than vmsize field)” on MacOS 10.6. PGI 10.8.
Thanks,
Vladimir
Hongyon is out this week on Winder Break, but in looking at TPR#17261, she suggests using the flag “-Mnomod” to work around the libtool bug.
Note she also found a typo in one of our configuration files that ships with the 2010 MacOSX compilers. Please update your “fnativerc” file (found in your PBI bin directory) to add a “$” before “APPENDMOD” in the section for the f901 command.
From:
Changing the compiler version shouldn’t matter since the problem is with libtool. I’ll ask Hongyon next week if Apple has an updated libtool that fixes the problem.