This package fails to compile on an unstable system. Attached relevant logs and emerge --info
Created attachment 693456 [details] emerge_info emerge --info
Created attachment 693459 [details] netcdf-cxx-4.3.1:20210325-153453.log build log
rlibtool: compile: x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -Os -pipe -march=native -fdiagnostics-color=always -Os -pipe -march=native -fdiagnostics-color=always -c ncString.cpp -DPIC -fPIC -o .libs/ncString.o rlibtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ -Os -pipe -march=native -fdiagnostics-color=always -Os -pipe -march=native -fdiagnostics-color=always -version-info 2:0:1 -no-undefined -Wl,-O1 -Wl,--as-needed -o libnetcdf_c++4.l a -rpath /usr/lib64 ncAtt.lo ncCheck.lo ncCompoundType.lo ncDim.lo ncEnumType.lo ncException.lo ncFile.lo ncGroup.lo ncGroupAtt.lo ncOpaqueType.lo ncType.lo ncVar.lo ncVarAtt.lo ncVlenType.lo ncByte.lo ncChar.lo ncShort.lo ncInt.lo ncFloat.lo ncDouble.lo ncUbyte.lo ncUshort.lo ncUint.lo ncInt64.lo ncUint64.lo ncString.lo rlibtool: lconf: {.name="libtool"}. rlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/var/tmp/portage/sci-libs/netcdf-cxx-4.3.1/work/netcdf-cxx4-4.3.1/cxx4"}. rlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 40, .st_ino = 28362}. rlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = -1 [ENOENT]. rlibtool: lconf: openat(AT_FDCWD,"../",O_DIRECTORY,0) = 5. rlibtool: lconf: fstat(5,...) = 0 {.st_dev = 40, .st_ino = 28342}. rlibtool: lconf: openat(5,"libtool",O_RDONLY,0) = 6. rlibtool: lconf: found "/var/tmp/portage/sci-libs/netcdf-cxx-4.3.1/work/netcdf-cxx4-4.3.1/libtool". rlibtool: link: ln -s /dev/null .libs/libnetcdf_c++4.a.disabled rlibtool: link: x86_64-pc-linux-gnu-g++ .libs/ncAtt.o .libs/ncCheck.o .libs/ncCompoundType.o .libs/ncDim.o .libs/ncEnumType.o .libs/ncException.o .libs/ncFile.o .libs/ncGroup.o .libs/ncGroupAtt.o .libs/ncOpaqueType.o .libs/ncType.o .libs/ ncVar.o .libs/ncVarAtt.o .libs/ncVlenType.o .libs/ncByte.o .libs/ncChar.o .libs/ncShort.o .libs/ncInt.o .libs/ncFloat.o .libs/ncDouble.o .libs/ncUbyte.o .libs/ncUshort.o .libs/ncUint.o .libs/ncInt64.o .libs/ncUint64.o .libs/ncString.o -Os -pipe -march=native -fdiagnostics-color=always -Os -pipe -march=native -fdiagnostics-color=always -Wl,-O1 -Wl,--as-needed -shared -fPIC -Wl,--no-undefined -Wl,-soname -Wl,libnetcdf_c++4.so.1 -o .libs/libnetcdf_c++4.so.1.1.0 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/ncAtt.o: in function `netCDF::NcAtt::getAttLength() const': ncAtt.cpp:(.text+0x1c0): undefined reference to `nc_inq_attlen' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/ncAtt.o: in function `netCDF::NcAtt::getValues(void*) const': ncAtt.cpp:(.text+0x205): undefined reference to `nc_get_att' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/ncAtt.o: in function `netCDF::NcAtt::getType() const': ncAtt.cpp:(.text+0x24d): undefined reference to `nc_inq_atttype' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/ncAtt.o: in function `netCDF::NcAtt::getValues(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const': ncAtt.cpp:(.text+0x39c): undefined reference to `nc_get_att' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ncAtt.cpp:(.text+0x3aa): undefined reference to `nc_get_att_text' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/ncAtt.o: in function `netCDF::NcAtt::getValues(char*) const': ncAtt.cpp:(.text+0x538): undefined reference to `nc_get_att'
This seems like a regression in netcdf-cxx since 4.3.0 which builds fine, their git repo is also affected.
I did a git bisect. 6b6716eebc0a6291d104bb4228b8848a08d5187f is the first bad commit commit 6b6716eebc0a6291d104bb4228b8848a08d5187f Author: Julien Schueller <schueller@phimeca.com> Date: Tue Jun 13 20:18:41 2017 +0200 Add mandatory -no-undefined dll LDFLAG cxx4/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) https://github.com/Unidata/netcdf-cxx4/commit/6b6716eebc0a6291d104bb4228b8848a08d5187f So another case that GNU libtool failed the developer...
Created attachment 693669 [details, diff] https://github.com/Unidata/netcdf-cxx4/pull/103 Patches to fix the undefined references.
The issue in this report seems to not occur in their git repo.
Ignore my above comment, wrong issue...
An updated version of the patch was merged upstream. https://github.com/Unidata/netcdf-cxx4/pull/103
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df3e6bd9f56dd0d323e19abe242182f37fe802a2 commit df3e6bd9f56dd0d323e19abe242182f37fe802a2 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-09-08 05:06:15 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-09-08 05:06:32 +0000 sci-libs/netcdf-cxx: fix build with slibtool Closes: https://bugs.gentoo.org/778200 Thanks-to: orbea <orbea@riseup.net> Signed-off-by: Sam James <sam@gentoo.org> .../files/netcdf-cxx-4.3.1-slibtool.patch | 42 ++++++++++++++++++++++ sci-libs/netcdf-cxx/netcdf-cxx-4.3.1.ebuild | 4 +++ 2 files changed, 46 insertions(+)