On Sat, May 13, 2023 at 08:42:58PM -0400, Thomas Frohwein wrote: > On Sat, May 13, 2023 at 10:04:26PM +0200, Theo Buehler wrote: > > > Missing: c++.9 (/usr/local/lib/libSDL2_image.so.1.0) (system lib) > > > Missing: c++abi.6 (/usr/local/lib/libSDL2_image.so.1.0) (system lib) > > > WANTLIB += ${COMPILER_LIBCXX} > > > > > > However, the build log doesn't have any use of c++ in it. I'm a little > > > puzzled by this, and would like to double-check if I'm missing > > > something here before committing an update that will add a need for > > > C++ libs to this port. > > > > Of the new LDEPS at least libjxl and libhwy are heavy C++ consumers. > > My understanding is that WANTLIB should list the shared libs listed as > > NEEDED in the readelf -d output. This does contain c++abi.6 and c++.9, > > so the WANTLIB change seems fine. > > Thanks. Does this mean the port needs a COMPILER=base-clang ports-gcc > base-gcc line now? There is a portcheck warning after the WANTLIB > addition, but if I understand the situation correctly, this doesn't > pertain to the compiler in this case.
Ah yes, portcheck is correct, COMPILER=base-clang ports-gcc is indeed needed on sparc64 in order to link against the correct C++ library. libjxl and libhwy are built with ports-gcc, which means they link against libestdc++. Mixing multiple C++ libraries won't end well. With COMPILER line added to the diff, sdl2-image builds and packages on sparc64 and make-port-lib-depends-check is happy. Without COMPILER=base-clang ports-gcc, you get this: Missing: estdc++.19 from gcc-libs-8.4.0p15 (/usr/local/lib/libSDL2_image.so.1.0) Extra: stdc++.57 WANTLIB += ${LIBECXX}