Closed orbea closed 3 years ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Also see this downstream issue. https://bugs.gentoo.org/778200
Thanks!
I updated this PR to correctly use LIBADD
instead of LDFLAGS
and to remove the incorrect and unused LDADD
variable.
Thank you!
When building netcdf-cxx4 with sblitool (https://dev.midipix.org/cross/slibtool) it fails with many undefined references. This is because the build used
-no-undefined
which GNU libtool silently ignores while slibtool does not.-lnetcdf
should be inLIBADD
and notLDADD
. - Build log: netcdf-cxx4.rdlibtool.logLDADD
variable is unused andLDADD
should be used for linking dependencies for programs, for example:foo_LDADD = bar.la
. The global variable isLIBS
, but it should just be removed instead since linking against yourself is wrong in this case.libh5bzip2.la
depends on hdf5 and the-lhdf5
linker flag is missing.rdlibtool: lconf: {.name="libtool"}. rdlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/tmp/netcdf-cxx4/plugins"}. rdlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 45, .st_ino = 324927}. rdlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = -1 [ENOENT]. rdlibtool: lconf: openat(AT_FDCWD,"../",O_DIRECTORY,0) = 3. rdlibtool: lconf: fstat(3,...) = 0 {.st_dev = 45, .st_ino = 315376}. rdlibtool: lconf: openat(3,"libtool",O_RDONLY,0) = 4. rdlibtool: lconf: found "/tmp/netcdf-cxx4/libtool". rdlibtool: link: ln -s /dev/null .libs/libh5bzip2.a.disabled rdlibtool: link: gcc .libs/H5Zbzip2.o .libs/blocksort.o .libs/huffman.o .libs/crctable.o .libs/randtable.o .libs/compress.o .libs/decompress.o .libs/bzlib.o -g -O2 -shared -fPIC -Wl,--no-undefined -o .libs/libh5bzip2.so -Wl,--export-dynamic /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/H5Zbzip2.o: in function
H5Z_filter_bzip2': /tmp/netcdf-cxx4/plugins/H5Zbzip2.c:204: undefined reference to
H5free_memory' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/netcdf-cxx4/plugins/H5Zbzip2.c:212: undefined reference to `H5free_memory' collect2: error: ld returned 1 exit status rdlibtool: exec error upon slbt_exec_link_create_library(), line 1446: (see child process error messages). rdlibtool: < returned to > slbt_exec_link(), line 1868. make[1]: [Makefile:467: libh5bzip2.la] Error 2 make[1]: Leaving directory '/tmp/netcdf-cxx4/plugins' make: [Makefile:542: install-recursive] Error 1