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

[netCDF #RRO-567751]: Patches for netcdf-3.6.3



>
> I gave a shot to netcdf latest snapshot
> (4.0.1-beta2-snapshot2009011802) without any patches.
> I have yet to test it with hdf5 to allow netcdf-4 support. I did:
>
> # ./configure --enable-shared LDFLAGS="-Wl,--as-needed"
> # make -j2
> # make check
>
> It failed with missing symbols from the libnetcdf.so library.
>
> As for netcdf-3.6.3, the shared lib libnetcdff.la also needs
> libnetcdf.so to link with. Similarly to the patch I sent, adding in
> fortran/Makefile.am:
>
> libnetcdff_la_LIBADD = $(top_builddir)/libsrc/libnetcdf.la
>
> and in cxx/Makefile.am
>
> libnetcdf_c___la_LIBADD = $(top_builddir)/libsrc/libnetcdf.la
>
> and re-doing the Makefile, tests ran fine.
>
> I still have to update the hdf5 libs to the 1.8.x in our system, and I
> will try netcdf-4 with full features and will likely do a full patch
> for working as-needed then if you haven't included fixes by then.
>
> Thanks a lot for the support,
>
> - --
> Sbastien
>

Howdy Senastien!

Thanks for the patch, I have applied those changes and now the -Wl,--as-needed
flag works for non-netCDF-4 builds. (Snapshot release will be updated around 3
a.m. tomorrow MST:
ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz).

But I cannot get it to work with --enable-netcdf-4. It fails with missing
symbols in the HDF5 library. I am not sure how to get this working. I have read
the document here:
http://www.gentoo.org/proj/en/qa/asneeded.xml

It fails like this:

link: g95 -I../fortran -I/shecky/local_post6/include -I../libsrc4 -I../f90 -g
-O2 -Wl,--as-needed -o .libs/ftst_vars6 ftst_vars6.o fortlib.o handle_err.\
o  -L/lib -L/shecky/local_post6/lib ../fortran/.libs/libnetcdff.so
/shecky/n4_new10/libsrc4/.libs/libnetcdf.so
/shecky/local_post6/lib/libhdf5_hl.a /shecky/local_po\
st6/lib/libhdf5.a -lz -lm ../libsrc4/.libs/libnetcdf.so -Wl,-rpath
-Wl,/usr/local/lib
o `H5T_NATIVE_LLONG_g'
/shecky/n4_new10/libsrc4/.libs/libnetcdf.so: undefined reference to
`H5T_NATIVE_SCHAR_g'
/shecky/n4_new10/libsrc4/.libs/libnetcdf.so: undefined reference to
`H5Aopen_name'
/shecky/n4_new10/libsrc4/.libs/libnetcdf.so: undefined reference to
`H5Tget_class'
/shecky/n4_new10/libsrc4/.libs/libnetcdf.so: undefined reference to `H5Gunlink'

Do the hdf5.a and hdf5_hl.a have to come fist because they are static?

If so, what about situations where the HDF5 library is shared?

Thanks!

Ed

Ticket Details
===================
Ticket ID: RRO-567751
Department: Support netCDF
Priority: Critical
Status: Closed