Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 620052 - net-misc/networkmanager-1.8.0 doesn't work if build with LTO enabled
Summary: net-misc/networkmanager-1.8.0 doesn't work if build with LTO enabled
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
Depends on:
Blocks: lto
  Show dependency tree
Reported: 2017-05-29 00:49 UTC by Mike Lothian
Modified: 2019-10-19 19:19 UTC (History)
3 users (show)

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

net-misc/networkmanager-1.8.0_build.log (file_620052.txt,16.76 KB, text/plain)
2017-05-31 03:20 UTC, zlg (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2017-05-29 00:49:48 UTC
This is a regression from networkmanager 1.4

No devices or connections are listed in NetworkManager gui

I'm not expecting this to be fixed but it took me a while to figure out what was wrong, so hopefully this bug will spare someone some time

I noticed in nmcli "missing plugin" after my wifi adaptor so I'm guessing the issue is related to

Disabling LTO makes the package work again once "systemctl restart NetworkManager" is issued
Comment 1 Mike Gilbert gentoo-dev 2017-05-30 15:54:45 UTC
Hmm... seems worth looking into.

Upstream explicitly supports LTO via configure, so I'm not sure why it would fail.
Comment 2 zlg (RETIRED) gentoo-dev 2017-05-31 03:13:13 UTC
I too am having issues compiling networkmanager-1.8.0. It's pulled in as a dependency for me and I never use it.

$ emerge --info
Portage 2.3.6 (python 3.4.6-final-0, default/linux/amd64/13.0/developer, gcc-6.3.0, glibc-2.24-r1, 4.10.12-gentoo x86_64)
System uname: Linux-4.10.12-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.3
KiB Mem:    16430820 total,   5908976 free
KiB Swap:    8388604 total,   8388604 free
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.8.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r3::gentoo, 6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r1::gentoo

    location: /usr/portage
    sync-type: git
    sync-uri: rsync://
    priority: -1000

    location: /usr/local/portage
    masters: gentoo

    location: /var/lib/layman/0x4d4c
    sync-type: laymansync
    masters: gentoo
    priority: 50

    location: /var/lib/layman/gamerlay
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

    location: /var/lib/layman/games-overlay
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

    location: /var/lib/layman/octopus
    sync-type: laymansync
    masters: gentoo
    priority: 50

    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

Installed sets: @base, @dev, @games, @main
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --binpkg-respect-use=y --oneshot"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
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"
USE="X a52 aac acl acpi alsa amd64 bash-completion branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gtk iconv ipv6 jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl seccomp session snmp spell ssl startup-notification svg tcpd tiff truetype udev unicode usb vim-syntax vorbis wxwidgets x264 xattr xcb xft xml xv xvid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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" INPUT_DEVICES="keyboard mouse evdev joystick wacom" 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-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22 ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia" 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"

Build log incoming.
Comment 3 zlg (RETIRED) gentoo-dev 2017-05-31 03:20:57 UTC
Created attachment 474726 [details]

Build log

emerge -pv:

These are the packages that would be merged, in order:

Calculating dependencies... done!                                                                                     
[ebuild     U  ] net-misc/networkmanager-1.8.0::gentoo [1.4.4-r1::gentoo] USE="consolekit dhclient introspection modemmanager ncurses nss policykit%* ppp wext wifi -audit -bluetooth -connection-sharing -dhcpcd% (-elogind) -gnutls -json -ofono -resolvconf (-selinux) -systemd -teamd {-test} -vala" ABI_X86="32 (64) (-x32)" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB
Comment 4 Mike Gilbert gentoo-dev 2017-05-31 13:43:13 UTC
(In reply to Daniel Campbell from comment #2)
> I too am having issues compiling networkmanager-1.8.0. It's pulled in as a
> dependency for me and I never use it.

Your build failure is unrelated to the runtime failure being reported in this bug. Please file a new bug report.

Also, I would expect a developer to actually read the bug before adding a comment. Please take care to do so in the future.
Comment 5 Mike Gilbert gentoo-dev 2017-06-01 00:58:31 UTC
(In reply to Mike Gilbert from comment #4)
> Also, I would expect a developer to actually read the bug before adding a
> comment. Please take care to do so in the future.

That was overly condescending. Sorry.
Comment 6 Mike Gilbert gentoo-dev 2017-06-01 01:17:42 UTC

commit df6e0499df061d5475c32e5bcd567a4e6759a35a
Author: Mike Gilbert <>
Date:   Wed May 31 21:17:04 2017 -0400

    net-misc/networkmanager: add MULTILIB_USEDEP to libndp dependency
    Package-Manager: Portage-2.3.6_p1, Repoman-2.3.2_p69

 net-misc/networkmanager/networkmanager-1.8.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Mike Gilbert gentoo-dev 2017-06-01 02:14:36 UTC
I can confirm the LTO runtime failure.

The problem seems to be here:

>BINUTILS_NM="/usr/bin/x86_64-pc-linux-gnu-nm" "/x/portage/net-misc/networkmanager-1.8.0/work/NetworkManager-1.8.0/tools/" --called-from-make "/x/portage/net-misc/networkmanager-1.8.0/work/NetworkManager-1.8.0"
> /usr/bin/x86_64-pc-linux-gnu-nm: src_libNetworkManager_la-nm-checkpoint-manager.o: plugin needed to handle lto object

Setting BINUTILS_NM=/usr/bin/gcc-nm resolves this.
Comment 8 Mike Gilbert gentoo-dev 2017-06-01 02:26:33 UTC
Reported upstream.
Comment 9 Mike Gilbert gentoo-dev 2017-06-01 14:58:01 UTC
This should be at least partially resolved by this commit.

There's a related bug upstream that shows some test failures that seem to be cause by some bug in gcc.
Comment 10 Matt Turner gentoo-dev 2019-10-19 19:19:36 UTC
Seems to work now.