x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fno-strict-aliasing -fPIC -I../ -I/usr/include/python3.5m -c lxc.c -o /var/tmp/portage/app-emulation/lxc-2.1.1/work/lxc-2.1.1-python3_5/temp.linux-x86_64-3.5/lxc.o x86_64-pc-linux-gnu-gcc -shared -Wl,-O1 -Wl,--as-needed -O2 -pipe -march=native -fno-strict-aliasing /var/tmp/portage/app-emulation/lxc-2.1.1/work/lxc-2.1.1-python3_5/temp.linux-x86_64-3.5/lxc.o -L../lxc -L/usr/lib64 -llxc -lpython3.5m -o /var/tmp/portage/app-emulation/lxc-2.1.1/work/lxc-2.1.1-python3_5/lib/_lxc.cpython-35m-x86_64-linux-gnu.so /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -llxc collect2: error: ld returned 1 exit status error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1 * ERROR: app-emulation/lxc-2.1.1::gentoo failed (compile phase): ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0-no-multilib_20180202-195308 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-7.3.0 * Available Python interpreters, in order of preference: [1] python3.5 [2] python2.7 (fallback) [3] pypy (fallback) Available Ruby profiles: [1] ruby22 (with Rubygems) [2] ruby23 (with Rubygems) * java-config: The following VMs are available for generation-2: *) IcedTea JDK 3.6.0 [icedtea-bin-8] Available Java Virtual Machines: [1] icedtea-bin-8 system-vm emerge -qpv app-emulation/lxc [ebuild N ] app-emulation/lxc-2.0.9 USE="python seccomp -cgmanager -examples -lua (-selinux)" PYTHON_TARGETS="python3_5 -python3_4 -python3_6"
Created attachment 518004 [details] emerge-info.txt
Created attachment 518006 [details] app-emulation:lxc-2.1.1:20180205-134621.log
Created attachment 518008 [details] emerge-history.txt
Created attachment 518010 [details] environment
Created attachment 518012 [details] etc.portage.tbz2
The fix is to call `emake` instead of setup.py in the compile() and install() functions. The Makefile.ams already contain the correct include paths and library paths to link against the libraries being build.
Functions from distutils-r1.eclass can be more suited for calling setup.py than some Makefile(.am). Fix was described in https://bugs.gentoo.org/631624#c2 but it was not noticed when adding this version. python_compile() { - distutils-r1_python_compile build_ext -I ../ -L ../${PN} + distutils-r1_python_compile build_ext -I.. -L../lxc/.libs --no-pkg-config }
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f80bedd48d58dcfa3b12b41b650bd3d0ac875a40 commit f80bedd48d58dcfa3b12b41b650bd3d0ac875a40 Author: Matthias Maier <tamiko@gentoo.org> AuthorDate: 2018-04-04 21:04:19 +0000 Commit: Matthias Maier <tamiko@gentoo.org> CommitDate: 2018-04-04 21:04:58 +0000 app-emulation/lxc: fix compilation with USE=+python Thanks to Arfrever for pointing this out! Closes: https://bugs.gentoo.org/646702 Bug: https://bugs.gentoo.org/631624#c2 Package-Manager: Portage-2.3.28, Repoman-2.3.9 app-emulation/lxc/lxc-2.1.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)