Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 687688

Summary: net-analyzer/mrtg on 17.1/hardened profile - mrtg: Can't locate MRTG_lib.pm in @INC (you may need to install the MRTG_lib module)
Product: Gentoo Linux Reporter: Felix Tiede <info>
Component: Current packagesAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 506276    

Description Felix Tiede 2019-06-09 06:50:52 UTC
After migrating an amd64 hardened system from 17.0 to 17.1 profile following the steps outlined in the relevant news entry, net-analyzer/mrtg fails to find its MRTG_lib.pm module in perl's search path, which includes /usr/lib, but not /usr/lib64.

Remerging mrtg did not help here.

Apparently it either perl or mrtg needs a modified search path.

Reproducible: Always

Steps to Reproduce:
1. Have mrtg installed and operational
2. Start migration to 17.1/hardened profile
3. Reboot box in the process
4. mrtg fails to start
Actual Results:  
# /etc/init.d/mrtg restart
 * Caching service dependencies ...  [ ok ]
Can't locate MRTG_lib.pm in @INC (you may need to install the MRTG_lib module) (@INC contains: /usr/bin/../lib/mrtg2 /usr/bin /etc/perl /usr/local/lib64/perl5/5.28.2/x86_64-linux /usr/local/lib64/perl5/5.28.2 /usr/lib64/perl5/vendor_perl/5.28.2/x86_64-linux /usr/lib64/perl5/vendor_perl/5.28.2 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.28.2/x86_64-linux /usr/lib64/perl5/5.28.2) at /usr/bin/mrtg line 89.
BEGIN failed--compilation aborted at /usr/bin/mrtg line 89.
 * ERROR: mrtg failed to start

Expected Results:  
# /etc/init.d/mrtg restart
 * Caching service dependencies ...  [ ok ]
 * Starting mrtg ...                 [ ok ]
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-06-09 10:43:44 UTC
Please post your `emerge --info net-analyzer/mrtg` output in a comment.
Comment 2 Felix Tiede 2019-06-09 11:48:47 UTC
# emerge --info net-analyzer/mrtg
Portage 2.3.66 (python 3.6.5-final-0, default/linux/amd64/17.1/hardened, gcc-8.3.0, glibc-2.29-r2, 4.19.44-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.44-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2407_v2_@_2.40GHz-with-gentoo-2.6
KiB Mem:    98860596 total,  84279988 free
KiB Swap:    2099196 total,   2099196 free
Timestamp of repository gentoo: Sun, 09 Jun 2019 01:15:01 +0000
Head commit of repository gentoo: 7d211604cc83b15d4aed3dc0f04edc6c3201c86f
Head commit of repository anarchy: 2e357ee6969efebb70541e26bf86352e2747adfe

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p7) 2.31.1
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.14.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r6::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

anarchy
    location: /usr/local/overlays/anarchy
    sync-type: git
    sync-uri: git://git.gentoo.org/dev/anarchy
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -fforce-addr -ftracer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/fax /usr/share/gnupg/qualified.txt /var/bind /var/spool/fax/etc /var/yp/Makefile"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -fforce-addr -ftracer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --keep-going"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://mirror.leaseweb.com/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j5"
PKGDIR="/usr/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 audit bzip2 bzlib caps crypt cups curl cxx gmp hardened http2 iconv imap ipv6 jpeg libtirpc lz4 lzma maildir mmx multilib ncurses nis nls nptl nptlonly openmp pax_kernel pcre pgo pie png ppds readline seccomp skey sse sse2 ssl ssp svg tcpd threads tiff truetype unicode urandom vhosts vim-syntax wmf 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard" KERNEL="linux" L10N="de en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset dav dav_ext empty_gif fastcgi geo gzip limit_conn limit_req map memc memcached proxy referer rewrite scgi slice slowfs_cache spdy split_clients ssi upstream_ip_hash upstream_keepalive upstream_zone userid uwsgi vhost_traffic_status" NGINX_MODULES_STREAM="access geo limit_conn map split_clients upstream upstream_keepalive upstream_zone" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24" SANE_BACKENDS="dell1600n_net" USERLAND="GNU" VOICEMAIL_STORAGE="file" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-analyzer/mrtg-2.17.4-r1::gentoo was built with the following:
USE="(-selinux)" ABI_X86="(64)"
Comment 3 Felix Tiede 2019-06-10 06:15:22 UTC
Thinking about it and considering that with unsymlink-lib /usr/lib is supposed to store cross-arch files, it might actually be a better solution to install mrtg's Perl module(s) into /usr/lib instead of /usr/lib64.

Manually moving /usr/lib64/mrtg to /usr/lib does solve the problem.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2019-06-10 06:33:30 UTC
Perhaps you should try =net-analyzer/mrtg-2.17.7
Comment 5 Felix Tiede 2019-06-10 06:46:29 UTC
(In reply to Jeroen Roovers from comment #4)
> Perhaps you should try =net-analyzer/mrtg-2.17.7

That one works also, yes.
Comment 6 Pacho Ramos gentoo-dev 2019-06-20 15:40:36 UTC

*** This bug has been marked as a duplicate of bug 643812 ***