Re: [netcdfgroup] nc-config --libs output -- should it include hdf5 libs if netcdf-4 enabled

  • Subject: Re: [netcdfgroup] nc-config --libs output -- should it include hdf5 libs if netcdf-4 enabled
  • From: Olaf Gellert <gellert@xxxxxxx>
  • Date: Wed, 07 Sep 2011 10:46:03 +0200
Hi,

Ed Hartnett wrote:
"Gregory Sjaardema"<gdsjaar@xxxxxxxxxx>  writes:

Should the nc-config --libs output show the hdf5 libraries that need
to be included on the link line in addition to the -lnetdf?  This also
applies to the curl and opendap and ... options.

If you have a shared library build, these other libraries are not
included, because they are not needed.

it is not always true that in the shared library "libnetcdf.so"
is written that libhdf5 is necessary. Here is the output of
ldd on our libnetcdf.so":


% ldd libnetcdf.so.6.0.0
        linux-vdso.so.1 =>  (0x00007fff2cffd000)
        libcurl.so.3 => /usr/lib64/libcurl.so.3 (0x00002b4273fba000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b42741f7000)
libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002b42743fc000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002b427462a000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002b42748bf000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002b4274ae5000)
        libidn.so.11 => /usr/lib64/libidn.so.11 (0x00002b4274ce7000)
        libssl.so.6 => /lib64/libssl.so.6 (0x00002b4274f18000)
        libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002b4275165000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002b42754b6000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b42756ca000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003f5e600000)
libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002b4275a23000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002b4275c2b000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00002b4275e2d000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00002b4276043000)
        libsepol.so.1 => /lib64/libsepol.so.1 (0x00002b427625b000)

How should any application know that it has to link with libhdf5?
So we had to edit nc-config to include hdf5 with shared libraries...

Olaf

--
Olaf Gellert                          email  gellert@xxxxxxx
Deutsches Klimarechenzentrum GmbH     phone  +49 (0)40 460094 214
Bundesstrasse 45a                     fax    +49 (0)40 460094 270
D-20146 Hamburg, Germany              www    http://www.dkrz.de



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