x86_64-pc-linux-gnu-gcc -pipe -march=native -O2 -Wl,-O1 -Wl,--as-needed paxelf.o paxldso.o paxinc.o security.o xfuncs.o pspax.o -o pspax -lseccomp /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pspax.o: in function `main': pspax.c:(.text.startup+0x227): undefined reference to `cap_init' /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pspax.c:(.text.startup+0x634): undefined reference to `capgetp' /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pspax.c:(.text.startup+0x641): undefined reference to `cap_to_text' /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pspax.c:(.text.startup+0x777): undefined reference to `cap_free' /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pspax.c:(.text.startup+0xa11): undefined reference to `capgetp' /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pspax.c:(.text.startup+0xa1e): undefined reference to `cap_to_text' collect2: error: ld returned 1 exit status make: *** [Makefile:119: pspax] Error 1 Reproducible: Always I am in the process of uninstalling python-2.7. Maybe that has something to do with it.
Created attachment 600980 [details] app-misc:pax-utils.log.gz
Disabling the `caps` USE flag allows it to link.
USE_CAP=$(usex caps) is probably an invalid way to link to libcap. Can you post your emerge --info for completeness?
The build system failed to extract libcpa's flags: make -j4 -l5 USE_CAP=yes USE_DEBUG=no USE_PYTHON=no USE_SECCOMP=yes Name field occurs twice in '/usr/lib64/pkgconfig/libcap.pc' Name field occurs twice in '/usr/lib64/pkgconfig/libcap.pc' Can you post your contents of '/usr/lib64/pkgconfig/libcap.pc' file? It looks broken.
Have the same problem. Here are the contents of libcap.pc: prefix=/usr exec_prefix= libdir=/usr/lib64 includedir=/usr/include Name: libcap Description: libcap - linux capabilities library Version: 2.29 Libs: -L${libdir} -lcap Libs.private: Cflags: -I${includedir} Name: libpsx Description: libpsx - linux posix syscall API for pthreads Version: 2.29 Libs: -L${libdir} -lpsx -lpthread -Wl,-wrap,pthread_create Libs.private: Cflags: -I${includedir}
(In reply to Eugene Shalygin from comment #5) > Have the same problem. Here are the contents of libcap.pc: > > prefix=/usr > exec_prefix= > libdir=/usr/lib64 > includedir=/usr/include > > Name: libcap > Description: libcap - linux capabilities library > Version: 2.29 > Libs: -L${libdir} -lcap > Libs.private: > Cflags: -I${includedir} > > Name: libpsx > Description: libpsx - linux posix syscall API for pthreads > Version: 2.29 > Libs: -L${libdir} -lpsx -lpthread -Wl,-wrap,pthread_create > Libs.private: > Cflags: -I${includedir} Thank you! Can you share 'emerge --info libcap' as well?
CC +base-system@ sys-libs/libcap maintainer.
Should be fixed with =sys-libs/libcap-2.29-r1 Please test
> > Name: libcap > > Name: libpsx Also happens for =sys-libs/libcap-2.29-r1 for me. I think the real bug here is that they should live in two different .pc files.
The simplest reproducer is: $ pkg-config --libs libcap Name field occurs twice in '/usr/lib64/pkgconfig/libcap.pc' It should report at least '-lcap'.
(In reply to Sergei Trofimovich from comment #10) > The simplest reproducer is: > > $ pkg-config --libs libcap > Name field occurs twice in '/usr/lib64/pkgconfig/libcap.pc' > > It should report at least '-lcap'. Fails with dev-util/pkgconfig Works with dev-util/pkgconf Once I find the time I try to separate the two .pc files
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66bea220735842af03e40bfe276f9e0864c54a7f commit 66bea220735842af03e40bfe276f9e0864c54a7f Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-12-28 17:58:00 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-12-28 18:02:24 +0000 sys-libs/libcap: Separate libpsx stuff into own pkgconfig file Bug: https://bugs.gentoo.org/703932 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> sys-devel/gettext/gettext-0.20.1.ebuild | 3 +- .../files/libcap-2.29-libpsx_pkgconfig.patch | 88 ++++++++++++++++++++++ sys-libs/libcap/libcap-2.29-r2.ebuild | 85 +++++++++++++++++++++ 3 files changed, 175 insertions(+), 1 deletion(-)
=sys-libs/libcap-2.29-r2 is enough to make =app-misc/pax-utils-1.2.4 build successfully \o/
-r2 fixes it for me too. Thanks everyone! Happy holidays, happy new year!