Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646702 - app-emulation/lxc-2.1.1[python] fails to build with app-emulation/lxc not previously installed: ld: cannot find -llxc
Summary: app-emulation/lxc-2.1.1[python] fails to build with app-emulation/lxc not pre...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-05 18:37 UTC by Toralf Förster
Modified: 2018-04-04 21:05 UTC (History)
5 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.96 KB, text/plain)
2018-02-05 18:38 UTC, Toralf Förster
Details
app-emulation:lxc-2.1.1:20180205-134621.log (app-emulation:lxc-2.1.1:20180205-134621.log,234.24 KB, text/plain)
2018-02-05 18:38 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,153.97 KB, text/plain)
2018-02-05 18:38 UTC, Toralf Förster
Details
environment (environment,199.02 KB, text/plain)
2018-02-05 18:38 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,11.62 KB, application/x-bzip)
2018-02-05 18:38 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-02-05 18:37:57 UTC
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"
Comment 1 Toralf Förster gentoo-dev 2018-02-05 18:38:01 UTC
Created attachment 518004 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-02-05 18:38:04 UTC
Created attachment 518006 [details]
app-emulation:lxc-2.1.1:20180205-134621.log
Comment 3 Toralf Förster gentoo-dev 2018-02-05 18:38:07 UTC
Created attachment 518008 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-02-05 18:38:11 UTC
Created attachment 518010 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-02-05 18:38:14 UTC
Created attachment 518012 [details]
etc.portage.tbz2
Comment 6 Dennis Schridde 2018-03-18 13:25:52 UTC
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.
Comment 7 Arfrever Frehtes Taifersar Arahesis 2018-04-04 20:17:17 UTC
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
 }
Comment 8 Larry the Git Cow gentoo-dev 2018-04-04 21:05:34 UTC
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(-)