Help building NCO 4.2.2 on Mac OS X 10.9.1

Help
2014-02-12
2014-12-18
  • Matthew Thompson

    All,

    I seem to be having an issue building on OS X 10.9.1 that is just stumping me. First, I build NCO as part of a set of base libraries for the GEOS-5 GCM. It starts with jpeg and zlib and goes up to netCDF, NCO, and ESMF; this way we have a consistent "portable" set of libraries we can build. As for configure, it looks like:

          export NETCDF4_ROOT="$(prefix)/"; \
          export NETCDF_LIB="$(prefix)/lib"; \
          export NETCDF_INC="$(prefix)/include/netcdf"; \
          export PATH="$(prefix)/bin:$(PATH)" ;\
          export CPPFLAGS="$(CPPFLAGS) $(INC_SUPP) -DHAVE_NETCDF4_H -I$(prefix)/include/netcdf";\
          export LIBS="-L$(prefix)/lib $(LIB_HDF5) -lmfhdf -ldf -lsz  -ljpeg $(LINK_GPFS) $(LIB_CURL)  -lm" ;\
          ./configure --prefix=$(prefix) \
                      --includedir=$(prefix)/include/nco \
                      --disable-ncoxx \
                      --disable-ncap2 \
                      --disable-shared --enable-static \
                      --disable-nco_cplusplus \
                      --disable-mpi --disable-gsl \
                      --enable-netcdf4  \
                      CC=$(NC_CC) FC=$(NC_FC) CXX=$(NC_CXX) F77=$(NC_F77)  )
    

    where, in this case, NC_CC=mpicc, NC_CXX=mpic++, etc since I built HDF5 with parallel support (thus, netCDF uses parallel so you need to link with MPI). But the mpicc and mpic++ are using the "native" clang/llvm gcc, not a gcc from Macports or anything.

    This set up has served us well on many a Linux box, but on OS X, I seem to be having issues. Namely, when it builds and tries to link ncap I get:

    libtool: link: mpicc -fno-common -g -O2 -std=c99 -D_BSD_SOURCE -o ncap ncap_utl.o ncap.o ncap_yacc.o ncap_lex.o  -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib ./.libs/libnco.a -lresolv /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libnetcdf.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libhdf5_hl.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libhdf5.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libz.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libudunits2.a -lexpat /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libmfhdf.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libdf.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libsz.a -ljpeg /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libcurl.a -lz -lm
    ld: warning: ignoring file ./.libs/libnco.a, file was built for archive which is not the architecture being linked (x86_64): ./.libs/libnco.a
    Undefined symbols for architecture x86_64:
      "_cast_nctype_void", referenced from:
          _ncap_scv_2_ptr_unn in ncap_utl.o
          _ncap_var_fnc in ncap_utl.o
          _nco_yyparse in ncap_yacc.o
      "_cast_void_nctype", referenced from:
          _ncap_scv_2_ptr_unn in ncap_utl.o
          _ncap_var_fnc in ncap_utl.o
          _nco_yylex in ncap_lex.o
      "_ncap_scv_scv_cnf_typ_hgh_prc", referenced from:
          _nco_yyparse in ncap_yacc.o
    ...
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[4]: *** [ncap] Error 1
    make[3]: *** [install-recursive] Error 1
    make[2]: *** [install-recursive] Error 1
    make[1]: *** [nco.install] Error 2
    make: *** [install] Error 2
    

    I tried going for broke and sending in "-arch x86_64 -m64" with CPPFLAGS, CFLAGS, CXXFLAGS, and LDFLAGS, but it didn't seem to help. I can also look at the ncap_utl.o that was built (without the arch/m64) and see that it looks like it's x86_64:

    $ file nco/src/nco/ncap_utl.o
    nco/src/nco/ncap_utl.o: Mach-O 64-bit object x86_64
    

    Any ideas on how to solve this?

    Thanks,
    Matt

     
  • George N. White III

    That "file was built for archive which is not the architecture being linked (x86_64)" message is not very helpful.

    You may get a hint by examining the contents of .libs/libnco.a as below:

    $ mkdir nco.tmp
    $ cd nco.tmp
    $ ar x .../nco_cvs-20140202/src/nco/.libs/libnco.a
    $ ls
    __.SYMDEF SORTED        nco_fl_utl.o            nco_rec_var.o
    [...]
    nco_dmn_utl.o           nco_prn.o
    $ file nco_fl_utl.o 
    nco_fl_utl.o: Mach-O 64-bit x86_64 object
    
     
  • Charlie Zender

    Charlie Zender - 2014-02-13

    Thanks, George.

    My two cents is that this seems like Matt might have an "unclean" build of NCO.
    Suggest completely removing all NCO prior builds/libraries/objects and
    re-installing/re-building them from scratch.

     
  • Matthew Thompson

    First, I made a mistake in the subject/title, it is NCO 4.4.2, not 4.2.2...bad typing.

    Second, could the problem be that I'm using 4.4.2? The main NCO page says that's the current stable, but you can't actually get it as a tarball on SF.net, only 4.4.1 exists there. I grabbed 4.4.2 by getting it from CVS, but since it's not on SF.net, is it not stable?

    Beyond that, I'll take a look around. It's possible an old NCO is getting into the environment somehow. I'll clean out everything, isolate my build area, and try again.

    Matt

     
  • Matthew Thompson

    Okay, I went to my build directory under as pristine an environment I could make. I then did a fresh checkout from CVS of NCO 4.4.2 following the main page. I then did the make, which died, and:

    ...
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[4]: *** [ncap] Error 1
    make[3]: *** [install-recursive] Error 1
    make[2]: *** [install-recursive] Error 1
    make[1]: *** [nco.install] Error 2
    make: *** [install] Error 2
    (33) $ mkdir nco.tmp                                                                                                 [gs6101-niteroi:~...GMAO-Baselibs-4_0_4/src 10:35am] (34) $ cd nco.tmp/                                                                                                   [gs6101-niteroi:~...GMAO-Baselibs-4_0_4/src 10:35am]
    Directory: /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/src/nco.tmp
    (35) $ ar x ../nco-4.4.2/src/nco/.libs/libnco.a
    (36) $ ls
    __.SYMDEF SORTED  libz.a            nco_cnf_dmn.o     nco_ctl.o         nco_grp_utl.o     nco_msa.o         nco_prn.o         nco_scm.o         nco_var_rth.o
    libcurl.a         nco_att_utl.o     nco_cnf_typ.o     nco_dbg.o         nco_lmt.o         nco_mss_val.o     nco_rec_var.o     nco_sng_utl.o     nco_var_scv.o
    libhdf5.a         nco_aux.o         nco_cnk.o         nco_dmn_utl.o     nco_lst_utl.o     nco_netcdf.o      nco_rth_flt.o     nco_srm.o         nco_var_utl.o
    libhdf5_hl.a      nco_bnr.o         nco_cnv_arm.o     nco_fl_utl.o      nco_md5.o         nco_omp.o         nco_rth_utl.o     nco_var_avg.o
    libsz.a           nco_cln_utl.o     nco_cnv_csm.o     nco_grp_trv.o     nco_mmr.o         nco_pck.o         nco_scl_utl.o     nco_var_lst.o
    (37) $ file nco_fl_utl.o
    nco_fl_utl.o: Mach-O 64-bit object x86_64
    

    Indeed, a quick foreach loop in nco.tmp shows every .o is x86_64.

    Matt

     
  • Charlie Zender

    Charlie Zender - 2014-02-14

    It is better that you are building 4.4.2 than 4.2.2.
    That said, I do not have a Mac so someone with Mac OS X 10.9 will need to help.
    I'm sure it's just a compiler flag(s) gone awry and that we can get this built.
    The Mac change to LLVM/clang has caused some unexpected build problems.
    As the homepage says, 4.4.2 is not released yet; you are working with the beta
    code which is good for this purpose.
    cz

     
  • Charlie Zender

    Charlie Zender - 2014-02-14

    Based on an earlier posting, it looks like you are mixing Intel compiler (icc) objects with LLVM/clang objects. While this could work, it is not recommended to keep things simple. Pick a compiler and stick with it.
    cz

     
  • Matthew Thompson

    Charlie,

    I'm definitely not mixing in icc objects. The computer I'm on only has the Intel Fortran compiler installed. So I get ifort but I'm using the clang/llvm gcc/g++ for everything else. Most other computers I do pure Intel if I can.

    Matt

     
  • Pedro Vicente

    Pedro Vicente - 2014-02-14

    Matt

    I tried to build in Mac OS X 10.9 with just
    ./configure --prefix=
    and I do not get that error. I am using the MacPorts libraries of all the NCO dependencies, except antlr. To replicate that error, I'll try to use the base libraries built from source.

    You may also give a try to using the MacPorts dependencies

    sudo port install libdap # DAP
    sudo port install gsl # GSL
    sudo port install netcdf # netCDF
    sudo port install udunits2 # UDUnits

    Pedro

     
  • Pedro Vicente

    Pedro Vicente - 2014-02-14

    Matt
    Can you post the output of ./configure ?

    Here's what I get, using


    ./configure --prefix=/Volumes/Home/nco_install \ --disable-ncoxx \ --disable-ncap2 \ --disable-shared --enable-static \ --disable-nco_cplusplus \ --disable-mpi --disable-gsl \ --enable-netcdf4 \

    checking build system type... x86_64-apple-darwin13.0.0
    checking host system type... x86_64-apple-darwin13.0.0
    checking target system type... x86_64-apple-darwin13.0.0
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... autobld/install-sh -c -d
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    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 for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    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
    checking how to run the C preprocessor... gcc -E
    checking how to run the C++ preprocessor... g++ -E
    checking for gcc option to accept ISO C99... none needed
    checking for gcc option to accept ISO Standard C... (cached) none needed
    checking for flex... flex
    checking lex output file root... lex.yy
    checking lex library... -ll
    checking whether yytext is a pointer... yes
    checking for bison... bison -y
    checking whether ln -s works... yes
    checking how to print strings... printf
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking for BSD- or MS-compatible name lister (nm)... /opt/local/bin/nm
    checking the name lister (/opt/local/bin/nm) interface... BSD nm
    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-darwin13.0.0 file names to x86_64-apple-darwin13.0.0 format... func_convert_file_noop
    checking how to convert x86_64-apple-darwin13.0.0 file names to toolchain format... func_convert_file_noop
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/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 /opt/local/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 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... yes
    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 (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin13.0.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... no
    checking whether to build static libraries... yes
    checking how to run the C++ preprocessor... g++ -E
    checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/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 (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin13.0.0 dyld
    checking how to hardcode library paths into programs... immediate
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for working memcmp... yes
    checking whether lstat correctly handles trailing slash... no
    checking whether stat accepts an empty string... no
    checking for working strtod... yes
    checking for canonicalize_file_name... no
    checking for floor... yes
    checking for gethostname... yes
    checking for getpagesize... yes
    checking for getrusage... yes
    checking for memchr... yes
    checking for memmove... yes
    checking for memset... yes
    checking for mkstemp... yes
    checking for pow... yes
    checking for readlink... yes
    checking for realpath... yes
    checking for regcomp... yes
    checking for setlocale... yes
    checking for sqrt... yes
    checking for strchr... yes
    checking for strerror... yes
    checking for strpbrk... yes
    checking for strrchr... yes
    checking for strstr... yes
    checking for strtol... yes
    checking for ANSI C header files... (cached) yes
    checking getopt.h usability... yes
    checking getopt.h presence... yes
    checking for getopt.h... yes
    checking libintl.h usability... no
    checking libintl.h presence... no
    checking for libintl.h... no
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking locale.h usability... yes
    checking locale.h presence... yes
    checking for locale.h... yes
    checking netinet/in.h usability... yes
    checking netinet/in.h presence... yes
    checking for netinet/in.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for strings.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking cstdlib usability... yes
    checking cstdlib presence... yes
    checking for cstdlib... yes
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for pid_t... yes
    checking for size_t... yes
    checking whether struct tm is in sys/time.h or time.h... time.h
    checking for uid_t in sys/types.h... yes
    checking for ptrdiff_t... yes
    checking size of int*... 8
    checking whether C++ compiler implements namespaces... yes
    checking whether C++ compiler has working valarray<T>... yes
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no

    Test for netCDF

    checking for /opt/local/include/netcdf.h... yes
    checking for /opt/local/lib/libnetcdf.a... yes
    checking for /sopt/netcdf/netcdf411-gcc-serial/include/netcdf.h... no
    checking for /sopt/netcdf/netcdf411-gcc-serial/lib/libnetcdf.a... no
    checking netcdf.h usability... yes
    checking netcdf.h presence... yes
    checking for netcdf.h... yes
    checking for nc_open in -lnetcdf... yes

    Test for netCDF4 support

    checking whether NC_CHUNKED is declared... yes
    configure: netcdf.h contains netCDF4 definitions
    checking for nc_def_var_chunking in -lnetcdf... yes
    configure: Good news: Simple program compiles and links to netCDF4 library
    checking for gcc option to support OpenMP... unsupported
    Beginning generic tests for DAP support
    Testing for DAP-netCDF support (is DAP in libnetcdf.a?)...
    checking for nc__opendap in -lnetcdf... yes
    configure: DAP support enabled
    checking for getopt_long... yes
    checking for _g95_ac_array in -lf95... no
    checking for sin in -lm... yes
    checking for sinf in -lsunmath... no
    checking for gettext in -lintl... yes
    checking for res_init in -lresolv... yes
    checking for main in -lsocket... no
    checking for main in -lthread... no
    checking for nco_open in -lnco... yes
    checking for nc_inq_format... yes
    checking for getopt... yes
    checking for getopt_long... (cached) yes
    checking for atan2... yes
    checking for acosf... yes
    checking for asinf... yes
    checking for atanf... yes
    checking for atan2f... yes
    checking for cosf... yes
    checking for expf... yes
    checking for fabsf... yes
    checking for fmodf... yes
    checking for log10f... yes
    checking for logf... yes
    checking for powf... yes
    checking for sinf... yes
    checking for sqrtf... yes
    checking for tanf... yes
    checking for erff... yes
    checking for erfcf... yes
    checking for gammaf... no
    checking for acoshf... yes
    checking for asinhf... yes
    checking for atanhf... yes
    checking for coshf... yes
    checking for sinhf... yes
    checking for tanhf... yes
    checking for ceilf... yes
    checking for floorf... yes
    checking for nearbyint... yes
    checking for rint... yes
    checking for round... yes
    checking for trunc... yes
    checking for nearbyintf... yes
    checking for rintf... yes
    checking for roundf... yes
    checking for truncf... yes
    checking for getopt_long... (cached) yes
    checking for strdup... yes
    checking for strcasecmp... yes
    checking for strcasestr... yes

    Sorting out MacOSX build parameters

    Testing for ANTLR support

    checking for runantlr... no
    checking for antlr... no
    configure: antlr library was not found, disabling ncap2 build
    INFO: ANTLR support not found. To build ncap2, please install ANTLR and its C++ development package, e.g., 'sudo aptitude install antlr libantlr-dev' or 'sudo yum install antlr antlr-c++-devel'

    Testing for GSL support

    checking regex.h usability... yes
    checking regex.h presence... yes
    checking for regex.h... yes
    checking for sys/types.h... (cached) yes
    checking for regexec... yes
    checking for regcomp... (cached) yes
    checking for regfree... yes

    Testing for UDUNITS support

    WARNING: Requested both UDUnits and UDUnits2 support---overriding UDUnits
    Will attempt to build NCO with UDUnits support from libudunits2, not from libudunits
    checking for XML_ParserCreate in -lexpat... yes
    checking for /Volumes/Home/libs/install/udunits-2.1.24/share/udunits/udunits2.xml... yes
    configure: NB: Following tests of UDUnits2 library and header must succeed for UDUnits2 support:
    checking for ut_read_xml in -ludunits2... yes
    checking for /Volumes/Home/libs/install/udunits-2.1.24/include/udunits2.h... yes
    configure: UDUnits2 support enabled
    checking for ncgen... /Volumes/Home/libs/install/netcdf-4.3.0/bin/ncgen
    configure: Creating sample netCDF data files for self-tests

    Require Shared Libs?

    checking for makeinfo... yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating data/Makefile
    config.status: creating src/Makefile
    config.status: creating src/nco/Makefile
    config.status: creating man/Makefile
    config.status: creating doc/Makefile
    config.status: creating config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands

    Configuration Parameters:
    AR_FLAGS............. cru
    CC................... gcc
    CFLAGS............... -fno-common -g -O2 -std=c99 -D_BSD_SOURCE
    CPP.................. gcc -E
    CPPFLAGS............. -I/Volumes/Home/libs/install/netcdf-4.3.0/include -I/Volumes/Home/libs/install/netcdf-4.3.0/include -I/Volumes/Home/libs/install/netcdf-4.3.0/include -I/opt/local/include -I/Volumes/Home/libs/install/udunits-2.1.24/include
    CXX.................. g++
    CXXFLAGS............. -g -O2
    OPENMP_CFLAGS........
    ENABLE_DAP_NETCDF.... yes
    ENABLE_DAP........... yes
    ENABLE_GSL........... no
    HAVE_NETCDF4_H....... yes
    ENABLE_NETCDF4....... yes
    NETCDF4_ROOT......... /Volumes/Home/libs/install/netcdf-4.3.0
    ENABLE_UDUNITS....... no
    ENABLE_UDUNITS2...... yes
    GSL_ROOT.............
    HAVE_ANTLR........... no
    HAVE_MAKEINFO........ yes
    HOST.................
    host................. x86_64-apple-darwin13.0.0
    HOSTNAME............. pvn.socal.rr.com
    LDFLAGS.............. -L/Volumes/Home/libs/install/netcdf-4.3.0/lib -lnetcdf -L/Volumes/Home/libs/install/netcdf-4.3.0/lib -L/Volumes/Home/libs/install/netcdf-4.3.0/lib -L/opt/local/lib -lnetcdf -L/Volumes/Home/libs/install/udunits-2.1.24/lib
    LIBS................. -ludunits2 -lexpat -lresolv -lintl -lm -lnetcdf -lnetcdf -lnetcdf -lcurl -ludunits2
    install prefix ...... /Volumes/Home/nco_install


    Configuration complete. You are now ready to run 'make'.
    Ensure 'make' points to GNU Make (AT&T Make chokes on GNU syntax).
    If the build fails, please examine the file 'configure.eg'
    in the top-level NCO directory. It contains examples known to
    build NCO for various platforms and compilers.


     
    Last edit: Pedro Vicente 2014-02-14
  • Matthew Thompson

    Sorry for the late reply. Here is the config.log I get when building the stable NCO 4.4.2:

    Configuring nco 
    checking build system type... x86_64-apple-darwin13.0.0
    checking host system type... x86_64-apple-darwin13.0.0
    checking target system type... x86_64-apple-darwin13.0.0
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking for gcc... mpicc
    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 mpicc accepts -g... yes
    checking for mpicc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of mpicc... gcc3
    checking whether we are using the GNU C++ compiler... yes
    checking whether mpic++ accepts -g... yes
    checking dependency style of mpic++... gcc3
    checking how to run the C preprocessor... mpicc -E
    checking how to run the C++ preprocessor... mpic++ -E
    checking for mpicc option to accept ISO C99... none needed
    checking for mpicc option to accept ISO Standard C... (cached) none needed
    checking for flex... flex
    checking lex output file root... lex.yy
    checking lex library... -ll
    checking whether yytext is a pointer... yes
    checking for bison... bison -y
    checking whether ln -s works... yes
    checking how to print strings... printf
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by mpicc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
    checking the name lister (/usr/bin/nm) interface... BSD nm
    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-darwin13.0.0 file names to x86_64-apple-darwin13.0.0 format... func_convert_file_noop
    checking how to convert x86_64-apple-darwin13.0.0 file names to toolchain format... func_convert_file_noop
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/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 /usr/bin/nm output from mpicc 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 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 mpicc supports -fno-rtti -fno-exceptions... yes
    checking for mpicc option to produce PIC... -fno-common -DPIC
    checking if mpicc PIC flag -fno-common -DPIC works... yes
    checking if mpicc static flag -static works... no
    checking if mpicc supports -c -o file.o... yes
    checking if mpicc supports -c -o file.o... (cached) yes
    checking whether the mpicc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin13.0.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... no
    checking whether to build static libraries... yes
    checking how to run the C++ preprocessor... mpic++ -E
    checking for ld used by mpic++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking whether the mpic++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking for mpic++ option to produce PIC... -fno-common -DPIC
    checking if mpic++ PIC flag -fno-common -DPIC works... yes
    checking if mpic++ static flag -static works... no
    checking if mpic++ supports -c -o file.o... yes
    checking if mpic++ supports -c -o file.o... (cached) yes
    checking whether the mpic++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin13.0.0 dyld
    checking how to hardcode library paths into programs... immediate
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for working memcmp... yes
    checking whether lstat correctly handles trailing slash... no
    checking whether stat accepts an empty string... no
    checking for working strtod... yes
    checking for canonicalize_file_name... no
    checking for floor... yes
    checking for gethostname... yes
    checking for getpagesize... yes
    checking for getrusage... yes
    checking for memchr... yes
    checking for memmove... yes
    checking for memset... yes
    checking for mkstemp... yes
    checking for pow... yes
    checking for readlink... yes
    checking for realpath... yes
    checking for regcomp... yes
    checking for setlocale... yes
    checking for sqrt... yes
    checking for strchr... yes
    checking for strerror... yes
    checking for strpbrk... yes
    checking for strrchr... yes
    checking for strstr... yes
    checking for strtol... yes
    checking for ANSI C header files... (cached) yes
    checking getopt.h usability... yes
    checking getopt.h presence... yes
    checking for getopt.h... yes
    checking libintl.h usability... no
    checking libintl.h presence... no
    checking for libintl.h... no
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking locale.h usability... yes
    checking locale.h presence... yes
    checking for locale.h... yes
    checking netinet/in.h usability... yes
    checking netinet/in.h presence... yes
    checking for netinet/in.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for strings.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking cstdlib usability... yes
    checking cstdlib presence... yes
    checking for cstdlib... yes
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for pid_t... yes
    checking for size_t... yes
    checking whether struct tm is in sys/time.h or time.h... time.h
    checking for uid_t in sys/types.h... yes
    checking for ptrdiff_t... yes
    checking size of int*... 8
    checking whether C++ compiler implements namespaces... yes
    checking whether C++ compiler has working valarray<T>... yes
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no
    #################################
    #  Test for netCDF             #
    ################################
    checking for /opt/local/include/netcdf.h... no
    checking for /opt/local/lib/libnetcdf.a... no
    checking for /sopt/netcdf/netcdf411-gcc-serial/include/netcdf.h... no
    checking for /sopt/netcdf/netcdf411-gcc-serial/lib/libnetcdf.a... no
    checking netcdf.h usability... yes
    checking netcdf.h presence... yes
    checking for netcdf.h... yes
    checking for nc_open in -lnetcdf... yes
    #################################
    #  Test for netCDF4 support     #
    #################################
    checking whether NC_CHUNKED is declared... yes
    configure: netcdf.h contains netCDF4 definitions
    checking for nc_def_var_chunking in -lnetcdf... yes
    configure: Good news: Simple program compiles and links to netCDF4 library
    checking for mpicc option to support OpenMP... unsupported
    Beginning generic tests for DAP support
    Testing for DAP-netCDF support (is DAP in libnetcdf.a?)...
    checking for nc__opendap in -lnetcdf... yes
    configure: DAP support enabled
    checking for getopt_long... yes
    checking for _g95_ac_array in -lf95... no
    checking for sin in -lm... yes
    checking for sinf in -lsunmath... no
    checking for gettext in -lintl... no
    checking for res_init in -lresolv... yes
    checking for main in -lsocket... no
    checking for main in -lthread... no
    checking for nco_open in -lnco... no
    checking for nc_inq_format... yes
    checking for getopt... yes
    checking for getopt_long... (cached) yes
    checking for atan2... yes
    checking for acosf... yes
    checking for asinf... yes
    checking for atanf... yes
    checking for atan2f... yes
    checking for cosf... yes
    checking for expf... yes
    checking for fabsf... yes
    checking for fmodf... yes
    checking for log10f... yes
    checking for logf... yes
    checking for powf... yes
    checking for sinf... yes
    checking for sqrtf... yes
    checking for tanf... yes
    checking for erff... yes
    checking for erfcf... yes
    checking for gammaf... no
    checking for acoshf... yes
    checking for asinhf... yes
    checking for atanhf... yes
    checking for coshf... yes
    checking for sinhf... yes
    checking for tanhf... yes
    checking for ceilf... yes
    checking for floorf... yes
    checking for nearbyint... yes
    checking for rint... yes
    checking for round... yes
    checking for trunc... yes
    checking for nearbyintf... yes
    checking for rintf... yes
    checking for roundf... yes
    checking for truncf... yes
    checking for getopt_long... (cached) yes
    checking for strdup... yes
    checking for strcasecmp... yes
    checking for strcasestr... yes
    ##########################################################
    #     Sorting out MacOSX build parameters                #
    ##########################################################
    #################################
    #  Testing for ANTLR support    #
    #################################
    checking for runantlr... no
    checking for antlr... no
    configure: antlr library was not found, disabling ncap2 build
    INFO: ANTLR support not found. To build ncap2, please install ANTLR and its C++ development package, e.g., 'sudo aptitude install antlr libantlr-dev' or 'sudo yum install antlr antlr-c++-devel'
    ########################################
    #     Testing for GSL support          #
    ########################################
    checking regex.h usability... yes
    checking regex.h presence... yes
    checking for regex.h... yes
    checking for sys/types.h... (cached) yes
    checking for regexec... yes
    checking for regcomp... (cached) yes
    checking for regfree... yes
    ########################################
    #     Testing for UDUNITS support      #
    ########################################
    WARNING: Requested both UDUnits and UDUnits2 support---overriding UDUnits
    Will attempt to build NCO with UDUnits support from libudunits2, not from libudunits
    checking for XML_ParserCreate in -lexpat... yes
    checking for /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/netcdf/../share/udunits/udunits2.xml... no
    configure: WARNING: file /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/netcdf/../share/udunits/udunits2.xml was not found but will still attempt to build NCO with UDUnits2 support.
    configure: NB: Following tests of UDUnits2 library and header must succeed for UDUnits2 support:
    checking for ut_read_xml in -ludunits2... yes
    checking udunits2.h usability... yes
    checking udunits2.h presence... yes
    checking for udunits2.h... yes
    configure: UDUnits2 support enabled
    checking for ncgen... /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/bin/ncgen
    configure: Creating sample netCDF data files for self-tests
    ###############################
    #    Require Shared Libs?     #
    ###############################
    checking for makeinfo... yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating data/Makefile
    config.status: creating src/Makefile
    config.status: creating src/nco/Makefile
    config.status: creating man/Makefile
    config.status: creating doc/Makefile
    config.status: creating config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
    
    Configuration Parameters:
    AR_FLAGS............. cru
    CC................... mpicc
    CFLAGS............... -fno-common -g -O2 -std=c99 -D_BSD_SOURCE 
    CPP.................. mpicc -E
    CPPFLAGS............. -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include -DpgiFortran -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/ -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/zlib -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/szlib -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/jpeg -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/hdf5 -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/hdf -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/uuid -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/netcdf -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/udunits2 -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/netcdf -DpgiFortran  -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/    -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/zlib    -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/szlib    -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/jpeg    -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/hdf5    -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/hdf    -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/uuid    -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/netcdf    -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/udunits2   -DHAVE_NETCDF4_H -I/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/include/netcdf 
    CXX.................. mpic++
    CXXFLAGS............. -g -O2
    OPENMP_CFLAGS........ 
    ENABLE_DAP_NETCDF.... yes
    ENABLE_DAP........... yes
    ENABLE_GSL........... no
    HAVE_NETCDF4_H....... yes
    ENABLE_NETCDF4....... yes
    NETCDF4_ROOT......... /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/
    ENABLE_UDUNITS....... no
    ENABLE_UDUNITS2...... yes
    GSL_ROOT............. 
    HAVE_ANTLR........... no
    HAVE_MAKEINFO........ yes
    HOST................. gs6101-niteroi.gsfc.nasa.gov
    host................. x86_64-apple-darwin13.0.0
    HOSTNAME............. gs6101-niteroi.gsfc.nasa.gov
    LDFLAGS.............. -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib -lnetcdf -ljpeg -lmfhdf -ldf -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib -lmfhdf -ldf -lsz -ljpeg -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib -lcurl -lz -lm -lm -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib  
    LIBS................. -ludunits2 -lexpat -lresolv -lm -lnetcdf -lnetcdf -lnetcdf -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libhdf5_hl.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libhdf5.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libz.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libsz.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib/libcurl.a -lmfhdf -ldf -lsz  -ljpeg  -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin/lib -lcurl -lz -lm   -lm -lcurl -ludunits2
    install prefix ...... /Users/mathomp4/Baselibs/GMAO-Baselibs-4_0_4/x86_64-apple-darwin13.0.0/ifort_12.1.0.038-openmpi_1.6/Darwin
    *******************************************************************
    Configuration complete. You are now ready to run 'make'.
    Ensure 'make' points to GNU Make (AT&T Make chokes on GNU syntax).
    If the build fails, please examine the file 'configure.eg'
    in the top-level NCO directory.  It contains examples known to
    build NCO for various platforms and compilers.
    *******************************************************************
    

    I still get the same error on building with stable.

     
    Last edit: Matthew Thompson 2014-02-26
  • Matthew Thompson

    All,

    Sorry to revive a zombie thread, but this is still happening on Mac's for me. I grabbed NCO 4.4.7 and tried building it on a Mac Pro running 10.10.1 (Yosemite) and, as before:

    /bin/sh ../../libtool --tag=CXX  --tag=CC   --mode=link mpicc  -fno-common -g -O2 -std=c99 -D_BSD_SOURCE   -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin
    14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib -lnetcdf -ljpeg -lmfhdf -ldf -lhdf5_hl -lhdf5 -lm -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/i
    fort_15.0.1.108-openmpi_1.8.3/Darwin/lib -lmfhdf -ldf -lsz -ljpeg -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Dar
    win/lib -lcurl -lssl -lcrypto -lz -lm -lm -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib   -o ncap ncap_u
    tl.o ncap.o ncap_yacc.o ncap_lex.o libnco.la -ludunits2 -lexpat -lresolv -lm -lnetcdf -lnetcdf -lnetcdf -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.
    0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libhdf5_hl.a /
    Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libhdf5.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64
    -apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libz.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Da
    rwin/lib/libsz.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libcurl.a -lmfhdf -ldf -lsz  -ljpeg  -L/Use
    rs/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib -lcurl -lssl -lcrypto -lz -lm   -lm -lcurl -ludunits2
    libtool: link: mpicc -fno-common -g -O2 -std=c99 -D_BSD_SOURCE -o ncap ncap_utl.o ncap.o ncap_yacc.o ncap_lex.o  -L/Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-
    darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib ./.libs/libnco.a -lresolv /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-open
    mpi_1.8.3/Darwin/lib/libnetcdf.a -ldl /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libhdf5_hl.a /Users/ma
    thomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libhdf5.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-d
    arwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libz.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib
    /libudunits2.a -lexpat /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libmfhdf.a /Users/mathomp4/Baselibs/G
    MAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libdf.a /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libsz.a -ljpeg /Users/mathomp4/Baselibs/GMAO-Baselibs-4_1_0/x86_64-apple-darwin14.0.0/ifort_15.0.1.108-openmpi_1.8.3/Darwin/lib/libcurl.a -lssl -lcrypto -lz -lm
    
    ld: warning: ignoring file ./.libs/libnco.a, file was built for archive which is not the architecture being linked (x86_64): ./.libs/libnco.a
    Undefined symbols for architecture x86_64:
      "_cast_nctype_void", referenced from:
          _ncap_scv_2_ptr_unn in ncap_utl.o
          _ncap_var_fnc in ncap_utl.o
          _nco_yyparse in ncap_yacc.o
      "_cast_void_nctype", referenced from:
          _ncap_scv_2_ptr_unn in ncap_utl.o
          _ncap_var_fnc in ncap_utl.o
          _nco_yylex in ncap_lex.o
    ...
      "_var_scv_mlt", referenced from:
          _ncap_var_scv_mlt in ncap_utl.o
         (maybe you meant: _ncap_var_scv_mlt)
      "_var_scv_mod", referenced from:
          _ncap_var_scv_mod in ncap_utl.o
         (maybe you meant: _ncap_var_scv_mod)
      "_var_scv_pwr", referenced from:
          _ncap_var_scv_pwr in ncap_utl.o
         (maybe you meant: _ncap_var_scv_pwr)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[4]: *** [ncap] Error 1
    make[3]: *** [install-recursive] Error 1
    make[2]: *** [install-recursive] Error 1
    make[1]: *** [nco.install] Error 2
    make: *** [install] Error 2
    

    The only way we've discovered how to "fix" this is build, wait for it to crash, cd into nco/src/nco, run by hand:

    ar r libnco.a *.o
    mv libnco.a .libs/
    

    and then run "make install" again. It seems like a libtool error...

    Does anyone out there know enough m4 or libtool to figure this out. I tried comparing, say, the libtool netcdf generates (as netcdf builds and archives just fine on Darwin) and the one nco generates, but it flummoxed me. I even compared the netcdf/m4/libtool.m4 and nco/m4/libtool.m4 but they seem nigh-identical, so maybe m4 is getting different flags?

    I suppose I could edit my make script so that, on Darwin, I just run a different make script to do this three-step process...

    Thanks,
    Matt

     
    Last edit: Matthew Thompson 2014-12-12
  • Charlie Zender

    Charlie Zender - 2014-12-18

    Thank you Matt for reporting this.
    This is bumming me out, too, because I havn't been able to reproduce it.
    Others use configure to build on Mac OS just fine, with a different combination of compilers, though.
    Something about using MPI versions of Intel compilers seems to trigger this problem. I don't have an answer yet. Will keep trying...
    cz

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks