Unhelpful automatic 3rd-party library linkage

2021-06-29 Thread Oleg Smolsky
Hello there! I'm using automake+libtool for building C++ code and hitting a peculiar issue with 3rd-party libraries. It comes up when a library is built with one version of GCC and then the application is built with a newer compler. So, given the following wrapper lib that pulls libzmq: noinst_LT

Re: Unhelpful automatic 3rd-party library linkage

2021-06-29 Thread Oleg Smolsky
...and I have figured out the source of the mystery linker flags: zmq build leaves libzmq.la file which contains this: # Libraries that this one depends upon. dependency_libs=' -lrt -lpthread /opt/gcc-10/lib/../lib64/libstdc++.la' It looks like automake/libtool finds this file (BTW, when is it fo

Re: Unhelpful automatic 3rd-party library linkage

2021-06-29 Thread Bob Friesenhahn
On Tue, 29 Jun 2021, Oleg Smolsky wrote: It looks like GCC9 references come from libzmq: $ ldd /opt/3p/lib/libzmq.so | grep libstd libstdc++.so.6 => /opt/gcc-9/lib/../lib64/libstdc++.so.6 (0x7f95f8d9f000) Obviously the 3rd-party library was built a while ago with GCC9. At the time i

Re: Unhelpful automatic 3rd-party library linkage

2021-06-29 Thread Bob Friesenhahn
On Tue, 29 Jun 2021, Oleg Smolsky wrote: ...and I have figured out the source of the mystery linker flags: zmq build leaves libzmq.la file which contains this: # Libraries that this one depends upon. dependency_libs=' -lrt -lpthread /opt/gcc-10/lib/../lib64/libstdc++.la' It looks like automake

Re: [EXTERNAL] Re: Unhelpful automatic 3rd-party library linkage

2021-06-29 Thread Oleg Smolsky
On Tue, Jun 29, 2021 at 3:22 PM Bob Friesenhahn < bfrie...@simple.dallas.tx.us> wrote: > On Tue, 29 Jun 2021, Oleg Smolsky wrote: > > > > It looks like GCC9 references come from libzmq: > > > > $ ldd /opt/3p/lib/libzmq.so | grep libstd > >libstdc++.so.6 => /opt/gcc-9/lib/../lib64/libstdc++

Re: [EXTERNAL] Re: Unhelpful automatic 3rd-party library linkage

2021-06-29 Thread Oleg Smolsky
On Tue, Jun 29, 2021 at 3:30 PM Bob Friesenhahn < bfrie...@simple.dallas.tx.us> wrote: > On Tue, 29 Jun 2021, Oleg Smolsky wrote: > > > ...and I have figured out the source of the mystery linker flags: zmq > build > > leaves libzmq.la file which contains this: > > > > # Libraries that this one dep