2015-07-23 22:20 GMT+03:00 Rafael Sadowski <[email protected]>: > On Thu Jul 23, 2015 at 10:12:51PM +0300, Vadim Zhukov wrote: >> Hello all. >> >> Not sure who cares about libraw now, so sending this to ports@. >> >> The problem is that libraw explicitly adds -lstdc++ to the Libs >> section in pkg-config files. As a result, when some software that >> links to -lestdc++ tries to link -lraw or -lraw_r, it could get >> -lstdc++ earlier that -lestdc++ in linker command line, >> effectively making ld.so pick up symbols from -lstdc++ whenever >> possible. And that's really bad. I see two options: >> >> 1. Make affected ports (depending on libraw) filter out -lstdc++. >> CMake-based one, libkdcraw, don't care about pkg-config --libs >> and thus isn't affected already. >> >> 2. Patch out libraw pkg-config templates. This is what the current >> patch does. Not sure if this patch could be considered for upstream, >> as there could be platforms where explicit -lstdc++ is needed; I'm >> not an expert here. >> >> Personally I'd go with (2), this will make incoming nomacs port >> easier. Thoughts? Okays? >> > > Do you test your patch with nomacs? I built nomacs with the same patch > last day but nomacs is still linking with bas stdc++.
$ objdump -p ../fake-amd64/usr/local/bin/nomacs | fgrep NEEDED NEEDED libQtGui.so.10.1 NEEDED libQtNetwork.so.10.0 NEEDED libQtCore.so.9.0 NEEDED libexiv2.so.7.0 NEEDED libraw.so.0.0 NEEDED liblcms2.so.1.0 NEEDED libopencv_imgproc.so.1.0 NEEDED libtiff.so.39.2 NEEDED libz.so.5.0 NEEDED libwebp.so.2.1 NEEDED libquazip.so.1.0 NEEDED libm.so.9.0 NEEDED libopencv_core.so.1.0 NEEDED libestdc++.so.17.0 NEEDED libc.so.80.0 NEEDED libX11.so.16.1 NEEDED libpthread.so.19.0 So... Look in the CMakeCache.txt in WRKBUILD of nomacs for "stdc++" and where it's coming from. -- WBR, Vadim Zhukov
