Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445838 - net-analyzer/net-snmp-5.7.2.rc1 build fails with python 3
Summary: net-analyzer/net-snmp-5.7.2.rc1 build fails with python 3
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-03 19:00 UTC by Lindsay Haisley
Modified: 2012-12-04 03:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lindsay Haisley 2012-12-03 19:00:35 UTC
emerge for net-snmp-5.7.2.rc1 fails with python errors  

During the build, the following error occurs; however, the build continues.

make[1]: Entering directory `/var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc1/work/net-snmp-5.7.2.rc1/perl'
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from setuptools import setup, Extension, find_packages
ImportError: No module named setuptools
make: *** [pythonmodules] Error 1
make: *** Waiting for unfinished jobs....

A short time later the build quits with no further diagnostics output, only:

make[1]: Leaving directory `/var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc1/work/net-snmp-5.7.2.rc1/perl'
 * ERROR: net-analyzer/net-snmp-5.7.2_rc1 failed (compile phase):
 *   emake failed

python 3.2 is installed, as is the setuptools module for it, so I assume that the ebuild is trying to use an earlier version of python for which this module is not installed.  The file /var/tmp/portage/net-analyzer/net-snmp-5.7.2/work/net-snmp-5.7.2/python/setup.py isn't compatible with python 3 since it calls methods of the string module (find, split) which were removed in python 3.

If I fix these errors and and run make in the build root, I get a series of link errors apparently associated with MySQL libraries:

libtool: link: x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -march=nocona -O2 -pipe -fomit-frame-pointer -Ulinux -Dlinux=linux -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/5.12.4/x86_64-linux/CORE -o .libs/snmptrapd .libs/snmptrapd.o -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-E  ./.libs/libnetsnmptrapd.so -L/usr/lib64/perl5/5.12.4/x86_64-linux/CORE /var/tmp/portage/net-analyzer/net-snmp-5.7.2/work/net-snmp-5.7.2/agent/.libs/libnetsnmpmibs.so ../agent/.libs/libnetsnmpmibs.so /var/tmp/portage/net-analyzer/net-snmp-5.7.2/work/net-snmp-5.7.2/agent/.libs/libnetsnmpagent.so -lsensors ../agent/.libs/libnetsnmpagent.so /var/tmp/portage/net-analyzer/net-snmp-5.7.2/work/net-snmp-5.7.2/snmplib/.libs/libnetsnmp.so -lwrap -lperl -ldl -lutil -lc ../snmplib/.libs/libnetsnmp.so -lrt -L/usr/lib64/mysql /usr/lib64/mysql/libmysqlclient.so -L/usr/lib64/ -L/usr//lib64 -lz -lcrypt -lnsl -lssl -lcrypto -lm -Wl,-rpath -Wl,/usr/lib64/mysql
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_stmt_error'
./.libs/libnetsnmptrapd.so: undefined reference to `load_defaults'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_insert_id'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_server_end'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_commit'
./.libs/libnetsnmptrapd.so: undefined reference to `my_init'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_init'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_close'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_real_connect'
./.libs/libnetsnmptrapd.so: undefined reference to `my_progname'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_error'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_stmt_execute'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_stmt_bind_param'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_sqlstate'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_stmt_errno'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_autocommit'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_errno'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_stmt_sqlstate'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_stmt_close'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_stmt_init'
./.libs/libnetsnmptrapd.so: undefined reference to `mysql_stmt_prepare'
collect2: ld returned 1 exit status
make[1]: *** [snmptrapd] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-analyzer/net-snmp-5.7.2/work/net-snmp-5.7.2/apps'
make: *** [subdirs] Error 1

MySQL is installed at version 5.1.66.

This is an old gentoo install, long neglected, and I'm tryin to bring it up to date.

Reproducible: Always

Steps to Reproduce:
1.emerge net-snmp
2.
3.
Actual Results:  
build progressed for several minutes and then failed.

Expected Results:  
succesful build and install

# emerge --info
Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-Intel-R-_Celeron-R-_D_CPU_3.46GHz-with-gentoo-2.1
Timestamp of tree: Mon, 03 Dec 2012 07:30:01 +0000
ld GNU ld (GNU Binutils) 2.18
app-shells/bash:          4.0_p35
dev-lang/python:          2.5.4-r4, 2.6.8, 2.7.3-r2, 3.2.3
dev-util/cmake:           2.6.4-r3
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.9.6-r2, 1.10.2, 1.11.6
sys-devel/binutils:       2.18-r3
sys-devel/gcc:            4.1.2, 4.3.4
sys-devel/gcc-config:     1.4.1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.81
sys-kernel/linux-headers: 2.6.30-r1 (virtual/os-headers)
sys-libs/glibc:           2.10.1-r1
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.chem.wisc.edu/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bash-completion berkdb bzip2 cli cracklib crypt cups curl cvs cxx dbm dbus dbx dri fam fastcgi fortran ftp gdbm gpm gzip hal iconv imagemagick imap ipv6 lm_sensors mime mmx modules mudflap multilib mysql mysqli ncurses nls nptl openmp pam pcre perl php pppd python readline samba session snmp sse sse2 ssl subversion suid syslog sysvipc tcpd threads unicode usb vim-syntax xinetd xml zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 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" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Lindsay Haisley 2012-12-03 19:42:10 UTC
USE="-python" emerge net-analyzer/net-snmp 

Succeeds :)

I'm not sure why snmp, which has been around far longer than python, needs it, or how it uses it.
Comment 2 Lindsay Haisley 2012-12-03 20:48:53 UTC
# eselect python set --python2 python2.7
# python-updater

solved this.  NOTABUG