[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #VQF-302876]: Unsuccessful make check on OSX undefined functions



Hi Jed,
 
> I'm having a little problem with undefined symbols when running make
> check on all recent releases of netCDF (4.0.1 - 4.1 snapshot), using
> Mac OS X 10.5.6 Server on 64-bit Intel.
> 
> Make succeeds, but make check It seem that make check dies in nf_test
> becuase of several undefined symbols. Please see attached the complete
> output of configure, make and make check.
> 
> After the failed make check, issuing the command copied below for
> example, results in no declaration of "function nf_inq_var_chunking"
> 
> I would very much appreciate any comments you may have on this.

The problem may be related to your specifing --enable-shared to build
shared libraries, but the configure output says that the ifort
compiler you have installed doesn't support shared libraries:

    ...
  checking whether the ifort linker 
(/opt/intel/Compiler/11.0/064/bin/intel64/xild) supports shared libraries... no
  checking dynamic linker characteristics... darwin9.6.0 dyld
  checking how to hardcode library paths into programs... immediate
  checking if libtool supports shared libraries... no
  checking whether to build shared libraries... no
  checking whether to build static libraries... yes
  checking for ifort option to produce PIC... 
  checking if ifort static flag  works... yes

However, the output of "make check" in the nf_test directory is
puzzling.  It successfully links the nf_test program using

  libtool: link: ifort -I../fortran -I../libsrc4 -I../f90 -O3 -xT -ip 
-no-prec-div -m64 -parallel -o nf_test test_get.o test_put.o nf_error.o 
nf_test.o test_read.o test_write.o util.o fortlib.o  -L/lib 
../fortran/.libs/libnetcdff.a 
/Users/admin/Downloads/netcdf/netcdf-4.0.1/libsrc4/.libs/libnetcdf.a 
../libsrc4/.libs/libnetcdf.a /usr/local/lib/libhdf5_hl.dylib -L/usr/local/lib 
/usr/local/lib/libhdf5.dylib -lpthread /usr/local/lib/libsz.dylib -lz -lm

but then a little later fails to link the ftst_vars program in the
same directory, using exactly the same libraries in the same order:

  libtool: link: ifort -I../fortran -I../libsrc4 -I../f90 -O3 -xT -ip 
-no-prec-div -m64 -parallel -o ftst_vars ftst_vars.o fortlib.o handle_err.o  
-L/lib ../fortran/.libs/libnetcdff.a 
/Users/admin/Downloads/netcdf/netcdf-4.0.1/libsrc4/.libs/libnetcdf.a 
../libsrc4/.libs/libnetcdf.a /usr/local/lib/libhdf5_hl.dylib -L/usr/local/lib 
/usr/local/lib/libhdf5.dylib -lpthread /usr/local/lib/libsz.dylib -lz -lm
  Undefined symbols:
    "_nf_inq_var_chunking_", referenced from:
        _MAIN__ in ftst_vars.o
        _MAIN__ in ftst_vars.o
    "_nf_get_chunk_cache_", referenced from:
        _MAIN__ in ftst_vars.o
    "_nf_def_var_deflate_", referenced from:
        _MAIN__ in ftst_vars.o
    "_nf_inq_var_deflate_", referenced from:
        _MAIN__ in ftst_vars.o
        _MAIN__ in ftst_vars.o
    "_nf_def_var_fletcher32_", referenced from:
        _MAIN__ in ftst_vars.o
    "_nf_def_var_chunking_", referenced from:
        _MAIN__ in ftst_vars.o
    "_nf_set_chunk_cache_", referenced from:
        _MAIN__ in ftst_vars.o
    "_nf_inq_var_endian_", referenced from:
        _MAIN__ in ftst_vars.o
        _MAIN__ in ftst_vars.o
    "_nf_inq_var_fletcher32_", referenced from:
        _MAIN__ in ftst_vars.o
        _MAIN__ in ftst_vars.o
    "_nf_def_var_endian_", referenced from:
        _MAIN__ in ftst_vars.o
  ld: symbol(s) not found
  
As a guess, is it possible you have an older dynamic library installed
in some library path that's being used to link against instead of the
one just built?  The referenced Fortran functions are new Fortran
functions (or at least have optional arguments now that they didn't
have in earlier versions), so it appears that the latest library is
not being used.  When Ed gets back in the office, he may have a better 
answer ...

--Russ


Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: VQF-302876
Department: Support netCDF
Priority: Normal
Status: Closed