Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys-devel/distcc-3.3.3 fails to configure with LTO #437

Open
evilbulgarian opened this issue Nov 6, 2019 · 6 comments
Open

sys-devel/distcc-3.3.3 fails to configure with LTO #437

evilbulgarian opened this issue Nov 6, 2019 · 6 comments

Comments

@evilbulgarian
Copy link

evilbulgarian commented Nov 6, 2019

 * Package:    sys-devel/distcc-3.3.3
 * Repository: gentoo
 * Maintainer: [email protected] [email protected]
 * USE:        abi_x86_64 amd64 elibc_glibc ipv6 kernel_linux python_single_target_python3_6 python_targets_python3_6 userland_GNU zeroconf
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * 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'
 * CFLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * CXXFLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * FFLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * FCFLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * F77FLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * LDFLAGS='-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32'
 * MAKEOPTS='-j12 -l4'
 * gcc (Gentoo 9.2.0-r1 p2) 9.2.0
 * Linux grendel 5.3.8 #1 SMP PREEMPT Mon Nov 4 09:46:11 PST 2019 x86_64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz GenuineIntel GNU/Linux
sys-devel/distcc: 53 seconds average for 16 merges
sys-devel/distcc: 32 seconds
sys-devel/distcc: 31 seconds
sys-devel/distcc: 30 seconds
sys-devel/distcc: 35 seconds
sys-devel/distcc: 51 seconds
sys-devel/distcc: 55 seconds
sys-devel/distcc: 1 minute, 8 seconds
sys-devel/distcc: 1 minute, 40 seconds
sys-devel/distcc: 3 minutes, 46 seconds
sys-devel/distcc: 16 seconds
sys-devel/distcc: 40 seconds
sys-devel/distcc: 19 seconds
sys-devel/distcc: 36 seconds
sys-devel/distcc: 50 seconds
sys-devel/distcc: 45 seconds
sys-devel/distcc: 28 seconds
 * Applying distcc-3.0-xinetd.patch ...
 [ ok ]
 * Applying distcc-3.3.2-freedesktop.patch ...
 [ ok ]
 * Applying distcc-3.2_rc1-socks5.patch ...
 [ ok ]
 * Fixing shebang in update-distcc-symlinks.py.
 * Fixing shebang in /var/tmp/portage/sys-devel/distcc-3.3.3/temp/distcc-config.
 * Running eautoreconf in '/var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3' ...
 * Running aclocal ...
 [ ok ]
 * Running autoconf --force ...
 [ ok ]
 * Running autoheader ...
 [ ok ]
 * Running elibtoolize in: distcc-3.3.3/
configure: loading site script /usr/share/config.site
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking for socklen_t... yes
checking if building on Android... no
checking whether /usr/bin/python3.6 version is >= 3.1... yes
checking for /usr/bin/python3.6 version... 3.6
checking for /usr/bin/python3.6 platform... linux
checking for /usr/bin/python3.6 script directory... ${prefix}/lib64/python3.6/site-packages
checking for /usr/bin/python3.6 extension module directory... ${exec_prefix}/lib64/python3.6/site-packages
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... (cached) none needed
configure: Adding gcc options: -march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wmissing-declarations -Wuninitialized
checking for library containing strerror... none required
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c
checking for inline... inline
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for unistd.h... (cached) yes
checking for sys/types.h... (cached) yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for netinet/in.h... yes
checking for arpa/nameser.h... yes
checking for resolv.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking mcheck.h usability... yes
checking mcheck.h presence... yes
checking for mcheck.h... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking fnmatch.h usability... yes
checking fnmatch.h presence... yes
checking for fnmatch.h... yes
checking for in_port_t... yes
checking for in_addr_t... yes
checking for library containing gethostent... none required
checking for library containing setsockopt... none required
checking for library containing hstrerror... none required
checking for library containing inet_aton... none required
checking for poptGetContext in -lpopt... yes
checking popt.h usability... yes
checking popt.h presence... yes
checking for popt.h... yes
checking whether to use included libpopt... no
checking for poptGetContext in -lpopt... (cached) yes
checking for expandargv in -liberty... no
configure: error: Cannot find libiberty

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3/config.log
 * ERROR: sys-devel/distcc-3.3.3::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  125:  Called src_configure
 *             environment, line 5545:  Called econf '--disable-Werror' '--libdir=/usr/lib' '--enable-rfc2553' '--without-gtk' '--without-gnome' '--without-auth' '--with-avahi'
 *        phase-helpers.sh, line  681:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/distcc-3.3.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/distcc-3.3.3::gentoo'`.
 * The complete build log is located at '/var/log/portage/sys-devel:distcc-3.3.3:20191106-033643.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-devel/distcc-3.3.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/distcc-3.3.3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3'
 * S: '/var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3'
@evilbulgarian
Copy link
Author

https://bugs.gentoo.org/697712 fixed by re-building binutils-libs

@elsandosgrande
Copy link
Contributor

elsandosgrande commented Nov 7, 2019

For future reference, if something fails in the configuration script, it is not as a result of enabling link-time optimization. The only GCC flag that ever broke any configuration script directly was "-Wall", but that was in the "Checking C++ compiler" step. Some other flags may possibly influence other configuration scripts in this way, but I have not personally come across any such flags other than the one presented above.

@InBetweenNames
Copy link
Owner

Edited for formatting -- @evilbulgarian has this been resolved? It looks like libiberty wasn't installed correctly, based on the log.

@InBetweenNames
Copy link
Owner

InBetweenNames commented Apr 13, 2020

@elsandosgrande FYI: your CFLAGS can indeed cause things to fail in packages configure scripts. Typically the reason is a poorly written test in those scripts that hasn't been touched in a decade or two (or three). That does include -flto as well. Just in case you run into issues with getting past the configure stage. cmake and meson projects seem to have much less trouble here.

@PeeJay
Copy link
Contributor

PeeJay commented May 10, 2020

I just had the same problem after upgrading to GCC 10.1. Re-building binutils-libs fixes the configure problem, but now it breaks on linking with no error message.

@elsandosgrande
Copy link
Contributor

@InBetweenNames

  1. I didn't know that even link-time optimization can break configuration scripts. I have never had that happen before though.
  2. I know that my CFLAGS can cause issues with scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants