Re: [netcdfgroup] 64-bit build with Snow Leopard?

From config.log:

configure:24602: gfortran -o conftest -g -O2  conftestf.o conftest.o  -lcurl 
ld: warning: in conftest.o, file was built for unsupported file format which is 
not the architecture being linked (i386)

Looks like gcc and gfortran are not compiling the same bitness, as they might 
have different defaults for 32bit or 64bit. Probably gcc default is 64, and 
gfortran is 32. Use -m32 or -m64 for both, depending on what you want (e.g., 
CFLAGS=-m64  FFLAGS=-m64 FCFLAGS=-m64).

-- Ted

On Jun 11, 2013, at 12:37 PM, The_curious_Pear wrote:

> I am struggling to build netcdf with snow leopard.
> 
> I have read this thread and tried things but am still getting problems.
> 
> This is the error I am getting:
> configure: netCDF 4.1.3
> checking build system type... x86_64-apple-darwin10.8.0
> checking host system type... x86_64-apple-darwin10.8.0
> checking target system type... x86_64-apple-darwin10.8.0
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... ./install-sh -c -d
> checking for gawk... no
> checking for mawk... no
> checking for nawk... no
> checking for awk... awk
> checking whether make sets $(MAKE)... yes
> configure: checking user options
> checking whether CXX is set to ''... no
> checking whether FC is set to ''... no
> checking whether F90 is set to ''... no
> checking whether a NCIO_MINBLOCKSIZE was specified... 256
> checking whether udunits is to be built... no
> checking if fsync support is enabled... yes
> checking whether extra valgrind tests should be run... no
> checking whether we should try to build netCDF-4... yes
> checking whether libcf is to be built... no
> checking whether reading of HDF4 SD files is to be enabled... no
> checking whether to fetch some sample HDF4 files from Unidata ftp site to
> test HDF4 reading (requires wget)... no
> checking whether parallel I/O for classic and 64-bit offset files using
> parallel-netcdf is to be enabled... no
> checking whether new netCDF-4 C++ API is to be built... no
> checking whether extra example tests should be run... no
> checking whether parallel IO tests should be run... no
> checking whether a default chunk size in bytes was specified... 4194304
> checking whether a maximum per-variable cache size for HDF5 was specified...
> 67108864
> checking whether a number of chunks for the default per-variable cache was
> specified... 10
> checking whether a default file cache size for HDF5 was specified... 4194304
> checking whether a default file cache maximum number of elements for HDF5
> was specified... 1009
> checking whether a default cache preemption for HDF5 was specified... 0.75
> checking whether netCDF-4 logging is enabled... no
> checking whether cdmremote client is to be built... no
> checking whether DAP client is to be built... yes
> checking for style of include used by make... GNU
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables... 
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking dependency style of gcc... gcc3
> checking for curl_easy_setopt in -lcurl... yes
> checking whether dap remote testing should be enabled (default on)... yes
> checking whether the time-consuming dap tests should be enabled (default
> off)... no
> checking whether netCDF extra tests should be run (developers only)... no
> checking whether FFIO will be used... no
> checking whether to skip C++, F77, or F90 APIs if compiler is broken... yes
> checking whether examples should be built... yes
> checking whether F77 API is desired... yes
> checking whether any Fortran API is desired... yes
> checking whether F90 API is desired... yes
> checking whether fortran type sizes should be checked... yes
> checking whether CXX API is desired... yes
> checking whether v2 netCDF API should be built... yes
> checking whether the ncgen/ncdump/nccopy should be built... yes
> checking whether large file (> 2GB) tests should be run... no
> checking whether benchmaks should be run (experimental)... no
> checking whether extreme numbers should be used in tests... yes
> checking where to put large temp files if large file tests are run...  .
> checking whether a win32 DLL is desired... no
> configure: finding C compiler
> checking for gcc... (cached) gcc
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking for gcc option to accept ISO C89... (cached) none needed
> checking dependency style of gcc... (cached) gcc3
> checking whether gcc and cc understand -c and -o together... yes
> checking for an ANSI C-conforming const... yes
> checking whether a CURLOPT_KEYPASSWD is defined... yes
> configure: finding Fortran compiler (will not be used if Fortran API is not
> desired)
> checking for gfortran... gfortran
> checking whether we are using the GNU Fortran compiler... yes
> checking whether gfortran accepts -g... yes
> checking for gfortran... gfortran
> checking whether we are using the GNU Fortran 77 compiler... yes
> checking whether gfortran accepts -g... yes
> configure: setting up Fortran 90
> checking what FC is set to... gfortran
> checking for Fortran flag to compile .f90 files... none
> checking fortran 90 modules inclusion flag... -I
> configure: finding C++ compiler (will not be used if C++ API is not desired)
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking dependency style of g++... gcc3
> configure: setting up libtool
> checking how to print strings... printf
> checking for a sed that does not truncate output... /usr/bin/sed
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking for fgrep... /usr/bin/grep -F
> checking for ld used by gcc...
> /Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
> checking if the linker
> (/Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
> checking for BSD- or MS-compatible name lister (nm)... /Developer/usr/bin/nm
> checking the name lister (/Developer/usr/bin/nm) interface... BSD nm
> checking whether ln -s works... yes
> checking the maximum length of command line arguments... 196608
> checking whether the shell understands some XSI constructs... yes
> checking whether the shell understands "+="... yes
> checking how to convert x86_64-apple-darwin10.8.0 file names to
> x86_64-apple-darwin10.8.0 format... func_convert_file_noop
> checking how to convert x86_64-apple-darwin10.8.0 file names to toolchain
> format... func_convert_file_noop
> checking for /Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option
> to reload object files... -r
> checking for objdump... no
> checking how to recognize dependent libraries... pass_all
> checking for dlltool... no
> checking how to associate runtime and link libraries... printf %s\n
> checking for ar... ar
> checking for archiver @FILE support... no
> checking for strip... strip
> checking for ranlib... ranlib
> checking command to parse /Developer/usr/bin/nm output from gcc object... ok
> checking for sysroot... no
> checking for mt... no
> checking if : is a manifest tool... no
> checking for dsymutil... dsymutil
> checking for nmedit... nmedit
> checking for lipo... lipo
> checking for otool... otool
> checking for otool64... no
> checking for -single_module linker flag... yes
> checking for -exported_symbols_list linker flag... yes
> checking for -force_load linker flag... yes
> checking how to run the C preprocessor... gcc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for dlfcn.h... yes
> checking for objdir... .libs
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC... -fno-common -DPIC
> checking if gcc PIC flag -fno-common -DPIC works... yes
> checking if gcc static flag -static works... no
> checking if gcc supports -c -o file.o... yes
> checking if gcc supports -c -o file.o... (cached) yes
> checking whether the gcc linker
> (/Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared
> libraries... yes
> checking dynamic linker characteristics... darwin10.8.0 dyld
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> checking how to run the C++ preprocessor... g++ -E
> checking for ld used by g++...
> /Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
> checking if the linker
> (/Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
> checking whether the g++ linker
> (/Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared
> libraries... yes
> checking for g++ option to produce PIC... -fno-common -DPIC
> checking if g++ PIC flag -fno-common -DPIC works... yes
> checking if g++ static flag -static works... no
> checking if g++ supports -c -o file.o... yes
> checking if g++ supports -c -o file.o... (cached) yes
> checking whether the g++ linker
> (/Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared
> libraries... yes
> checking dynamic linker characteristics... darwin10.8.0 dyld
> checking how to hardcode library paths into programs... immediate
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> checking for gfortran option to produce PIC... -fno-common
> checking if gfortran PIC flag -fno-common works... yes
> checking if gfortran static flag -static works... no
> checking if gfortran supports -c -o file.o... yes
> checking if gfortran supports -c -o file.o... (cached) yes
> checking whether the gfortran linker
> (/Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared
> libraries... yes
> checking dynamic linker characteristics... darwin10.8.0 dyld
> checking how to hardcode library paths into programs... immediate
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> checking for gfortran option to produce PIC... -fno-common
> checking if gfortran PIC flag -fno-common works... yes
> checking if gfortran static flag -static works... no
> checking if gfortran supports -c -o file.o... yes
> checking if gfortran supports -c -o file.o... (cached) yes
> checking whether the gfortran linker
> (/Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared
> libraries... yes
> checking dynamic linker characteristics... darwin10.8.0 dyld
> checking how to hardcode library paths into programs... immediate
> configure: finding other utilities
> configure: trying to set fortran flags for this platform
> checking for special C compiler options needed for large files... no
> checking for _FILE_OFFSET_BITS value needed for large files... no
> configure: displaying some results
> checking CPPFLAGS... 
> checking CC CFLAGS... gcc -g -O2
> checking type gcc... gcc is hashed (/Developer/usr/bin/gcc)
> checking CXX... g++
> checking CXXFLAGS... -g -O2
> checking type g++... g++ is /Developer/usr/bin/g++
> checking FC... gfortran
> checking FFLAGS... -g -O2
> checking type gfortran... gfortran is /usr/local/bin/gfortran
> checking F90... gfortran
> checking FCFLAGS... -g -O2
> checking type gfortran... gfortran is /usr/local/bin/gfortran
> checking AR... ar
> checking AR_FLAGS... cru
> checking type ar... ar is hashed (/Developer/usr/bin/ar)
> checking NM... /Developer/usr/bin/nm
> checking NMFLAGS... 
> checking for /Developer/usr/bin/nm... /Developer/usr/bin/nm
> checking nm flags... 
> checking for C-equivalent to Fortran routine "SUB"... sub_
> checking for Fortran "byte"... yes
> checking for Fortran "integer*2"... yes
> checking if Fortran "byte" is C "signed char"... configure: error: Could not
> link conftestf.o and conftest.o
> 
> My config.log is config.log
> <http://netcdf-group.1586084.n2.nabble.com/file/n7575014/config.log>  
> 
> Any help is much appreciated. I have looked on the information in this
> thread and i am not if when people are referring to the FFLAGS am i changing
> it in the .tcshrc for my computer.
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://netcdf-group.1586084.n2.nabble.com/64-bit-build-with-Snow-Leopard-tp4134434p7575014.html
> Sent from the NetCDF Group mailing list archive at Nabble.com.
> 
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/ 



  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: