When compiling net-analyzer/net-snmp-5.7.3_pre5-r1 I get the build error: recipe for target '../blib/arch/auto/NetSNMP/agent/agent.so' failed See the logs for details. Reproducible: Always
Created attachment 393834 [details] build.log
Created attachment 393836 [details] emerge.info
(In reply to RAPHEAD from comment #0) > When compiling net-analyzer/net-snmp-5.7.3_pre5-r1 I get the build error: > recipe for target '../blib/arch/auto/NetSNMP/agent/agent.so' failed > See the logs for details. That's not a build error. That is make's response to the build error.
... x86_64-pc-linux-gnu-gcc -shared -O2 -pipe -march=core2 -fomit-frame-pointer -Wl,-O1 -Wl,--as-needed agent.o -Wl,-O1 -Wl,--as-needed ... ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ This is probably a case of bug #261375.
But I can't reproduce it.
Anything I can try?
This is a parallel make error, workaround with "-j1". cp default_store.pm ../../blib/lib/NetSNMP/agent/default_store.pm AutoSplitting ../../blib/lib/NetSNMP/agent/default_store.pm (../../blib/lib/auto/NetSNMP/agent/default_store) x86_64-pc-linux-gnu-gcc -c -I../../../include -I. -I/usr/include -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=athlon64 -O2 -pipe -floop-interchange - floop-strip-mine -floop-block -DVERSION=\"5.0703\" -DXS_VERSION=\"5.0703\" -fPIC "-I/usr/lib64/perl5/5.20.2/x86_64-linux-thread-multi/CORE" default_store.c rm -f ../../blib/arch/auto/NetSNMP/agent/default_store/default_store.so LD_RUN_PATH="/usr/lib64:/usr/lib64/perl5/5.20.2/x86_64-linux-thread-multi/CORE" x86_64-pc-linux-gnu-gcc -shared -march=athlon64 -O2 -pipe -floop-interchange -floop-strip-mine -floop-block -Wl,-O1 -Wl,--as-needed defau lt_store.o -Wl,-O1 -Wl,--as-needed -o ../../blib/arch/auto/NetSNMP/agent/default_store/default_store.so \ -L/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3/perl/agent/default_store/../../../snmplib/.libs -L/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3/perl/agent/default_store/../../.. /snmplib -L/usr/lib64 -lnetsnmp -lcrypto -lm \ chmod 755 ../../blib/arch/auto/NetSNMP/agent/default_store/default_store.so "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- default_store.bs ../../blib/arch/auto/NetSNMP/agent/default_store/default_store.bs 644 Manifying 1 pod document make[3]: Leaving directory '/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3/perl/agent/default_store' rm -f ../blib/arch/auto/NetSNMP/agent/agent.so LD_RUN_PATH="/usr/lib64:/usr/lib64/perl5/5.20.2/x86_64-linux-thread-multi/CORE" x86_64-pc-linux-gnu-gcc -shared -march=athlon64 -O2 -pipe -floop-interchange -floop-strip-mine -floop-block -Wl,-O1 -Wl,--as-needed agent.o -Wl,-O1 -Wl,--as-needed -o ../blib/arch/auto/NetSNMP/agent/agent.so \ -L/usr/lib64 -L/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3/perl/agent/../../snmplib/.libs -L/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3/perl/agent/../../snmplib -L/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3/perl/agent/../../agent -lnetsnmpagent -lnetsnmp \ /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnetsnmpagent collect2: error: ld returned 1 exit status distcc[7123] ERROR: compile (null) on localhost failed Makefile:463: recipe for target '../blib/arch/auto/NetSNMP/agent/agent.so' failed make[2]: *** [../blib/arch/auto/NetSNMP/agent/agent.so] Error 1 make[2]: Leaving directory '/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3/perl/agent' Makefile:492: recipe for target 'subdirs' failed make[1]: *** [subdirs] Error 2 make[1]: Leaving directory '/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3/perl' Makefile:295: recipe for target 'perlmodules' failed make: *** [perlmodules] Error 1 * ERROR: net-analyzer/net-snmp-5.7.3::nerdboy-local failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-analyzer/net-snmp-5.7.3::nerdboy-local'`, * the complete build log and the output of `emerge -pqv '=net-analyzer/net-snmp-5.7.3::nerdboy-local'`. * The complete build log is located at '/var/log/portage/net-analyzer:net-snmp-5.7.3:20150705-180837.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-analyzer/net-snmp-5.7.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/net-snmp-5.7.3/temp/environment'. * Working directory: '/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3' * S: '/var/tmp/portage/net-analyzer/net-snmp-5.7.3/work/net-snmp-5.7.3'
Sorry, clicked too fast... This problem would most likely pass unnoticed with USE="-perl" as my default build flags were: Calculating dependencies... done! [ebuild R ] net-analyzer/net-snmp-5.7.3::nerdboy-local USE="X bzip2 ipv6 lm_sensors perl python ssl tcpd zlib -doc -elf -mfd-rewrites -minimal -mysql -netlink -pci -rpm (-selinux) -ucd-compat" PYTHON_TARGETS="python2_7" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB
This is still present in 5.7.3-r3, and is now biting infra servers. [ebuild N ] net-analyzer/net-snmp-5.7.3-r3 USE="bzip2 ipv6 mfd-rewrites perl python ssl tcpd zlib -X -doc -elf (-libressl) -lm_sensors -minimal -mysql -netlink -pci -rpm (-selinux) -ucd-compat" PYTHON_TARGETS="python2_7" Portage 2.2.28 (python 3.3.5-final-0, hardened/linux/amd64, gcc-4.9.3, glibc-2.21-r2, 3.15.5-hardened-r2-infra29 x86_64) ================================================================= System uname: Linux-3.15.5-hardened-r2-infra29-x86_64-AMD_Opteron-tm-_Processor_4170_HE-with-gentoo-2.2 KiB Mem: 32997064 total, 1258356 free KiB Swap: 2097148 total, 1498936 free Timestamp of repository gentoo: Tue, 28 Jun 2016 03:00:01 +0000 sh bash 4.3_p42-r1 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 app-shells/bash: 4.3_p42-r1::gentoo dev-lang/perl: 5.20.1-r4::gentoo dev-lang/python: 2.7.10-r1::gentoo, 3.3.5-r1::gentoo, 3.4.1::gentoo dev-util/cmake: 2.8.12.2-r1::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.19.1::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.5.3-r2::gentoo, 4.7.4::gentoo, 4.9.3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 3.82-r4::gentoo sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 infra-overlay location: /usr/local/infra-overlay masters: gentoo priority: 0 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dev.d /etc/env.d /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/scsi_id.config /etc/terminfo /etc/udev" CXXFLAGS="-O2 -pipe" DISTDIR="/var/cache/portage/distfiles/" EMERGE_DEFAULT_OPTS="-q --color=n --newuse --selective=n --jobs 3 --load-average 12" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distfiles.gentoo.org rsync://dipper.gentoo.org/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j 12 -l 12" PKGDIR="/var/cache/portage/packages/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="acl amd64 bash-completion berkdb bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 jpeg justify libwww maildir mmx mmxext modules multilib ncurses nptl nptlonly openmp pam pax_kernel pcre perl pie png python readline seccomp session sse sse2 ssl ssp tcpd unicode urandom vim-syntax xattr xml xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="account chaos checksum condition delude dhcpmac dnetmap echo fuzzy geoip gradm iface ipmark ipp2p ipset ipv4options length2 logmark lscan pknock psd quota2 rawnat steal sysrq tarpit tee" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
(In reply to Steve Arnold from comment #7) > /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ > ld: cannot find -lnetsnmpagent I get the same error after removing net-snmp with libnetsmnpagent.so/libnetsmnp.so being preserved and remerging it again. Removing them makes it install. Also remerging with the package still installed works fine for me.
(In reply to Fredric Johansson from comment #10) > (In reply to Steve Arnold from comment #7) > > > /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ > > ld: cannot find -lnetsnmpagent > > I get the same error after removing net-snmp with > libnetsmnpagent.so/libnetsmnp.so being preserved and remerging it again. > Removing them makes it install. So it compiles against stale installed libraries instead of the newly compiled libraries in that case? Could you try =net-analyzer/net-snmp-5.7.3-r5 ?
5.7.3-r5 seems to compile fine for me
Fredric confirms that it works now. Oldest version in the tree is 5.8-r3 now. Please test and reopen, if this bug is still present.