Created attachment 838873 [details] build.log I'm copy/pasting from a forum post where I first asked about this; a developer named sam_ advised me to file a bug even though there is a work-around. https://forums.gentoo.org/viewtopic.php?p=8761243 ----- I'm getting an error during an "emerge -uDNav world" for the above-named package. I've retried a couple of times, and run 'MAKEOPTS="-j1" emerge -av1 =net-analyzer/net-snmp-5.9.3-r1' to isolate the error's context: ... libtool: link: x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Os -pipe -fomit-frame-pointer -march=native -mtune=native -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -Os -pipe -fomit-frame-pointer -march=native -mtune =native -Ulinux -Dlinux=linux -o .libs/snmpps .libs/snmpps.o -Wl,-O1 -Wl,--as-needed -lcurses ../snmplib/.libs/libnetsnmp.so -lm -lssl -lcrypto /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/snmpps.o: undefined reference to symbol 'halfdelay' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libtinfo.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [Makefile:354: snmpps] Error 1 make: Leaving directory '/var/tmp/portage/net-analyzer/net-snmp-5.9.3-r1/work/net-snmp-5.9.3/apps' * ERROR: net-analyzer/net-snmp-5.9.3-r1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-analyzer/net-snmp-5.9.3-r1::gentoo'`, ... I've also googled around a bit and found similar errors, but for different packages. One recommended changes to ncurses USE flags, but was then fixed through the ebuild. (https://bugs.gentoo.org/653028) build.log: https://pastebin.com/raw/GujewJqB emerge --info: https://pastebin.com/raw/aX2qEekx
Created attachment 838875 [details] emerge --info
Created attachment 838877 [details] emerge -pqv '=net-analyzer/net-snmp-5.9.3-r1::gentoo'
Work-around was to customize build environment for this package to build with -O2.
Thanks! It's indeed a missing -ltinfo somewhere (it's possible our patch to add it is incomplete).
Could you upload /var/tmp/portage/net-analyzer/net-snmp-5.9.3-r1/work/net-snmp-5.9.3/config.log?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ab69c8447b50953c90c7524d09cd836f57355ef commit 4ab69c8447b50953c90c7524d09cd836f57355ef Author: Sam James <sam@gentoo.org> AuthorDate: 2022-12-02 02:50:52 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-12-02 02:51:40 +0000 net-analyzer/net-snmp: fix LDFLAGS ordering; rebase patches No guarantee this fixes the reported bug but it needed doing anyway and I've sent the rebased patches upstream. It'll make the situation easier to deal with now these are tidied up, anyway. Unfortunately couldn't reproduce the bug yet w/ -Os. Bug: https://bugs.gentoo.org/883945 Signed-off-by: Sam James <sam@gentoo.org> ...p-5.9.3-0001-Fix-LDFLAGS-vs-LIBS-ordering.patch | 231 ++++++++++++++++++++ ...5.9.3-0002-Tidy-up-net-snmp-config-output.patch | 51 +++++ ...ne-Libs.private-entries-in-netsnmp-.pc.in.patch | 30 +++ ...-Search-for-ltinfo-in-configure-if-needed.patch | 24 +++ net-analyzer/net-snmp/net-snmp-5.9.3-r2.ebuild | 233 +++++++++++++++++++++ net-analyzer/net-snmp/net-snmp-9999.ebuild | 13 +- 6 files changed, 576 insertions(+), 6 deletions(-)
(In reply to Sam James from comment #5) > Could you upload > /var/tmp/portage/net-analyzer/net-snmp-5.9.3-r1/work/net-snmp-5.9.3/config. > log? Well, this is distressing. I can upload *a* config.log, but not *the* config.log. It's currently compiling fine with -Os. I removed my mitigation to get you a clean, non-working config, except now it's working. I don't think anything else is different from before, except that I finished my @world updates the other day. I'm attaching what I've got, in case it helps, but again - this config.log is from a *working* compilation.
Created attachment 838883 [details] config.log from recent attempt (compile was successful, though)
(In reply to Quinn Jones from comment #7) > (In reply to Sam James from comment #5) > > Could you upload > > /var/tmp/portage/net-analyzer/net-snmp-5.9.3-r1/work/net-snmp-5.9.3/config. > > log? > > Well, this is distressing. > > I can upload *a* config.log, but not *the* config.log. > > It's currently compiling fine with -Os. I removed my mitigation to get you a > clean, non-working config, except now it's working. I don't think anything > else is different from before, except that I finished my @world updates the > other day. > > I'm attaching what I've got, in case it helps, but again - this config.log > is from a *working* compilation. No worries, but very mysterious! Please let me know if you manage to hit it again. I'll close the bug as WORKSFORME for now. At the very least, something good came out of this, as you motivated me to rebase our patches and finally send them upstream :)