Chih-Ping, > Thanks for your help! I installed the latest Xcode 4.5 and redo netcdf > installation, however, I still got the same error, /usr/bin/libtool: unknown > option character `f' in: -force_load Hmm, I guess the OS-X libtool is not keeping up with the gnu libtool, which supports the -force_load option. But it can be tricky, using Gnu versions of tools with Apple's gcc, for example, which has Apple additions not supported by Gnu tools. It looks like setting lt_cv_ld_force_load=no got you past that problem. I think we can solve this without needing to use a different libtool, because the error below just looks like an attempt to mix 32-bit and 64-bit objects in the same library. You need to either use all 32-bit ("-m32" flag on gcc and gfortran) or all 64-bit ("-m64" flag on gcc and gfortran). Depending on where you got them, the default for your gfortran may be 32-bit, while the default for your gcc may be 64-bit. I think you can also use -arch i386 or -arch x86_64 to specify the target machine architecture for 32-bit or 64-bit when using Apple compilers. So set CFLAGS and FCFLAGS to include matching target architecture options. For example, this worked for me: make clean && CC=cc CFLAGS='-g -m32' CXX=g++ CXXFLAGS='-g -m32' FC='gfortran -m32' FCFLAGS='-g' F77='gfortran -m32' FFLAGS='-g -O2' CPPFLAGS='-DNDEBUG -DgFortran' LDFLAGS=-m32 LIBS= FLIBS= F90LIBS= ./configure --enable-netcdf-4 --with-hdf5=/share/ed/local/mort && make check install --Russ > If I set lt_cv_ld_force_load=no, then I got a new error, can you please help > me again, > > libtool: link: gfortran -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o > .libs/libnetcdff.5.dylib .libs/fort-attio.o .libs/fort-control.o > .libs/fort-dim.o .libs/fort-genatt.o .libs/fort-geninq.o .libs/fort-genvar.o > .libs/fort-lib.o .libs/fort-misc.o .libs/fort-v2compat.o .libs/fort-vario.o > .libs/fort-var1io.o .libs/fort-varaio.o .libs/fort-varmio.o > .libs/fort-varsio.o .libs/libnetcdff.lax/libnetcdff90.a/netcdf.o > .libs/libnetcdff.lax/libnetcdff90.a/typeSizes.o -L/usr/local/lib > ../liblib/.libs/libnetcdf.dylib -lm -lz -lcurl -O2 -install_name > /usr/local/lib/libnetcdff.5.dylib -compatibility_version 7 -current_version > 7.0 -Wl,-single_module > libtool: link: dsymutil .libs/libnetcdff.5.dylib || : > warning: no debug symbols in executable (-arch i386) > libtool: link: (cd ".libs" && rm -f "libnetcdff.dylib" && ln -s > "libnetcdff.5.dylib" "libnetcdff.dylib") > libtool: link: (cd .libs/libnetcdff.lax/lt1-libnetcdff90.a && ar x > "/Users/cat/Desktop/netcdf-4.1.3/fortran/../f90/.libs/libnetcdff90.a") > libtool: link: ar cru .libs/libnetcdff.a fort-attio.o fort-control.o > fort-dim.o fort-genatt.o fort-geninq.o fort-genvar.o fort-lib.o fort-misc.o > fort-v2compat.o fort-vario.o fort-var1io.o fort-varaio.o fort-varmio.o > fort-varsio.o .libs/libnetcdff.lax/lt1-libnetcdff90.a/netcdf.o > .libs/libnetcdff.lax/lt1-libnetcdff90.a/typeSizes.o > /usr/bin/ranlib: archive member: .libs/libnetcdff.a(netcdf.o) cputype (7) > does not match previous archive members cputype (16777223) (all members must > match) > /usr/bin/ranlib: archive member: .libs/libnetcdff.a(typeSizes.o) cputype (7) > does not match previous archive members cputype (16777223) (all members must > match) > libtool: link: ranlib .libs/libnetcdff.a > ranlib: archive member: .libs/libnetcdff.a(netcdf.o) cputype (7) does not > match previous archive members cputype (16777223) (all members must match) > ranlib: archive member: .libs/libnetcdff.a(typeSizes.o) cputype (7) does not > match previous archive members cputype (16777223) (all members must match) > make[3]: *** [libnetcdff.la] Error 1 > make[2]: *** [all] Error 2 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 --Russ > On Sep 27, 2012, at 8:34 PM, Unidata netCDF Support wrote: > > > Hi, > > > >> I am trying to install netcdf-4.1.3 on my mac pro (OS 10.7.4, gfortran, > >> gcc). I got an error (see below) when I was doing 'make'. I attached > >> config.log and Makefile. Can you please help me solve the problem. > >> > >> Thank you very much! > >> > >> Chih-Ping > >> > >> /usr/bin/libtool: unknown option character `f' in: -force_load > >> Usage: /usr/bin/libtool -static [-] file [...] [-filelist > >> listfile[,dirname]] [-arch_only arch] [-sacLT] > >> Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist > >> listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] > >> [-compatibility_version #] [-current_version #] [-seg1addr 0x#] > >> [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table > >> <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] > >> [-noall_load] > >> make[3]: *** [libnetcdff.la] Error 1 > >> make[2]: *** [all] Error 2 > >> make[1]: *** [all-recursive] Error 1 > >> make: *** [all] Error 2 > > > > It looks like the /usr/bin/libtool is too old to understand the > > "-force_load" option, > > available on recent versions of libtool. One workaround is to set the > > environment > > variable > > > > lt_cv_ld_force_load=no > > > > before invoking the configure script. Another is to update your version of > > the Xcode tools to get > > a more recent version of libtool. > > > > Here's a previous note about this problem and the solution of setting > > lt_cv_ld_force_load=no: > > > > http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg10648.html > > > > --Russ > > > > > >> > >> > >> > >> Chih-Ping Wang > >> Associate Researcher > >> Dept. of Atmospheric and Oceanic Sciences > >> MS 7115 > >> UCLA > >> 405 Hilgard Ave. > >> Los Angeles, CA 90095 > >> (O)310-825-1659 > >> http://www.atmos.ucla.edu/~cat > >> > >> > >> > >> > >> > >> > >> > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: SFP-169619 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > Chih-Ping Wang > Associate Researcher > Dept. of Atmospheric and Oceanic Sciences > MS 7115 > UCLA > 405 Hilgard Ave. > Los Angeles, CA 90095 > (O)310-825-1659 > http://www.atmos.ucla.edu/~cat > > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: SFP-169619 Department: Support netCDF Priority: Normal Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.