NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] Error while compiling netcdf with netcdf-4, hdf4 and hdf5

Here it is:

./configure --prefix=$DIR/netcdf --disable-dap --enable-netcdf4
--disable-shared --enable-hdf4 --with-hdf4=$DIR/hdf4 --with-hdf5=$DIR/hdf5
LDFLAGS="-L$DIR/hdf5/lib -L$DIR/hdf4/lib" CPPFLAGS="-I$DIR/hdf5/include
-I$DIR/hdf4/include"

On Tue, Sep 28, 2021 at 6:33 PM Ed Hartnett <edwardjameshartnett@xxxxxxxxx>
wrote:

> The missing functions are from HDF4, and I don't see any HDF4 libraries on
> your link line.
>
> What was your configure command?
>
>
> On Tue, Sep 28, 2021 at 8:00 AM Ronald Opio <opioronald123@xxxxxxxxx>
> wrote:
>
>> Hello colleagues.
>>
>> I am trying to install netcdf (4.1.3) with netcdf-4 enabled and with hdf4
>> (4.2.9) and hdf5 (1.8.12) but I get this error in the make stage:
>>
>> /bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2
>>  -L/home/opio/wrf/libraries/hdf/lib -o ncgen3 main.o load.o escapes.o
>> getfill.o init.o genlib.o ncgentab.o ../liblib/libnetcdf.la  -lhdf5_hl
>> -lhdf5 -lm -lz
>> libtool: link: gcc -g -O2 -o ncgen3 main.o load.o escapes.o getfill.o
>> init.o genlib.o ncgentab.o  -L/home/opio/wrf/libraries/hdf/lib
>> ../liblib/.libs/libnetcdf.a -L/home/opio/wrf/libraries/grib2/lib
>> /home/opio/wrf/libraries/hdf/lib/libhdf5_hl.so
>> /home/opio/wrf/libraries/hdf/lib/libhdf5.so -ldl -lm -lz -Wl,-rpath
>> -Wl,/home/opio/wrf/libraries/hdf/lib -Wl,-rpath
>> -Wl,/home/opio/wrf/libraries/hdf/lib
>> /usr/bin/ld: ../liblib/.libs/libnetcdf.a(libnetcdf4_la-nc4file.o): in
>> function `nc4_open_hdf4_file':
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2173: undefined
>> reference to `SDstart'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2177: undefined
>> reference to `SDfileinfo'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2197: undefined
>> reference to `SDattrinfo'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2211: undefined
>> reference to `SDreadattr'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2231: undefined
>> reference to `SDselect'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2237: undefined
>> reference to `SDgetinfo'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2256: undefined
>> reference to `SDgetfillvalue'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2333: undefined
>> reference to `SDattrinfo'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2347: undefined
>> reference to `SDreadattr'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2279: undefined
>> reference to `SDgetdimid'
>> /usr/bin/ld:
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2281: undefined
>> reference to `SDdiminfo'
>> /usr/bin/ld: ../liblib/.libs/libnetcdf.a(libnetcdf4_la-nc4file.o): in
>> function `close_netcdf4_file':
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4file.c:2702: undefined
>> reference to `SDend'
>> /usr/bin/ld: ../liblib/.libs/libnetcdf.a(libnetcdf4_la-nc4var.o): in
>> function `nc4_get_hdf4_vara':
>> /home/opio/wrf/libraries/netcdf-4.1.3/libsrc4/nc4var.c:1358: undefined
>> reference to `SDreaddata'
>> collect2: error: ld returned 1 exit status
>> make[2]: *** [Makefile:370: ncgen3] Error 1
>> make[2]: Leaving directory '/home/opio/wrf/libraries/netcdf-4.1.3/ncgen3'
>> make[1]: *** [Makefile:551: all-recursive] Error 1
>> make[1]: Leaving directory '/home/opio/wrf/libraries/netcdf-4.1.3'
>> make: *** [Makefile:422: all] Error 2
>>
>>
>> I have read all existing solutions but none has worked for my case yet. I
>> kindly request help to solve it.
>>
>>
>> Ronald.
>> _______________________________________________
>> NOTE: All exchanges posted to Unidata maintained email lists are
>> recorded in the Unidata inquiry tracking system and made publicly
>> available through the web.  Users who post to any of the lists we
>> maintain are reminded to remove any personal information that they
>> do not want to be made public.
>>
>>
>> netcdfgroup mailing list
>> netcdfgroup@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe,  visit:
>> https://www.unidata.ucar.edu/mailing_lists/
>>
>
  • 2021 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: