----- Original Message ----- > From: "Florian Weimer" <fweimer@xxxxxxxxxx> > To: "Pavel Valena" <pvalena@xxxxxxxxxx> > Cc: devel@xxxxxxxxxxxxxxxxxxxxxxx > Sent: Tuesday, May 14, 2019 10:47:41 AM > Subject: Re: rpmlint: library-not-linked-against-libc (parts of Python stdlib, after gcc 9) > > * Pavel Valena: > > > The same occurs with Ruby: > > https://src.fedoraproject.org/rpms/ruby/pull-request/44 > > I'm not sure if this is a false positive. I checked fcntl.so, and it > references __cxa_finalize, as a weak symbol, so it needs to be linked > against libc.so.6, for ABI stability. > > Can you figure out the linker command line? It could be a binutils bug > in the implementation of --as-needed. >From Ruby build(rawhide): https://da.gd/jBhE6 https://copr.fedorainfracloud.org/coprs/pvalena/ruby/build/887856/ ``` * LDFLAGS: -L. -Wl,-z,relro -Wl,--as-needed -Wl,-z,now \ -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \ -fstack-protector-strong -rdynamic \ -Wl,-export-dynamic * DLDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now \ -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ``` The full command is: ``` gcc -shared -o ../../.ext/x86_64-linux/fcntl.so fcntl.o -L. -L../.. -L. -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -m64 -lruby -lm -lc ``` ________________________________ Wich is different from F29(same SRPM; result linked correctly): ``` * LDFLAGS: -L. -Wl,-z,relro -Wl,-z,now \ -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \ -fstack-protector-strong -rdynamic \ -Wl,-export-dynamic * DLDFLAGS: -Wl,-z,relro -Wl,-z,now \ -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ``` ``` gcc -shared -o ../../.ext/x86_64-linux/fcntl.so fcntl.o -L. -L../.. -L. -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -m64 -lruby -lm -lc ``` > > Thanks, > Florian > HIH, -- Pavel Valena Software Engineer, Red Hat Brno, Czech Republic _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx