Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 631734 - sys-libs/libcap does not honor custom prefix in pkgconfig file
Summary: sys-libs/libcap does not honor custom prefix in pkgconfig file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-22 17:11 UTC by Olivier Huber
Modified: 2018-11-21 11:27 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Huber 2017-09-22 17:11:29 UTC
Context: I have a gentoo prefix (in /scratch/ohuber/gentoo) on an outdated centos distribution. 

The pkgconfig file installed by libcap does not take into account this information. Excerpt from build.log:

sed -e 's,@prefix@,/usr,' \
        -e 's,@exec_prefix@,,' \
        -e 's,@libdir@,/usr/lib64,' \
        -e 's,@includedir@,/usr/include,' \
        -e 's,@VERSION@,2.25,' \
        -e 's,@deps@,,' \
        libcap.pc.in >libcap.pc

Then some packages that use libcap fail to build (e.g. pax-utils), since -L/usr/lib64 is injected into the arguments to gcc.


emerge --info:
Portage 2.3.10 (python 3.6.1-final-0, prefix/linux-standalone/amd64, gcc-5.4.0, glibc-2.25-r5, 2.6.32-696.3.2.el6.x86_64 x86_64)
=================================================================
System uname: Linux-2.6.32-696.3.2.el6.x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E7-_4850_@_2.00GHz-with-redhat-6.9-Santiago
KiB Mem:   264512724 total, 201742644 free
KiB Swap:  134217724 total, 132716152 free
Timestamp of repository gentoo: Wed, 20 Sep 2017 21:00:01 +0000
Head commit of repository gentoo: f3665a6b15a70598985ce18a6487cffb3c28d90f
sh bash 4.4_p12 
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.2::gentoo
dev-lang/python:          2.7.14::gentoo, 3.4.5::gentoo, 3.5.4::gentoo, 3.6.1-r1::gentoo
dev-util/cmake:           3.9.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.26.1::gentoo, 2.29::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8_p20160608::rap
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r5::gentoo
Repositories:

gentoo  
    location: /scratch/ohuber/gentoo/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    eclass-overrides: rap 
    sync-rsync-extra-opts: 

rap     
    location: /scratch/ohuber/gentoo/usr/portage-stage
    sync-type: git 
    sync-uri: https://anongit.gentoo.org/git/proj/android.git
    masters: gentoo
    eclass-overrides: rap 

x-local 
    location: /scratch/ohuber/gentoo/usr/local/overlays/local
    masters: gentoo
    priority: 0
    eclass-overrides: rap 

science 
    location: /scratch/ohuber/gentoo/usr/local/overlays/sci
    masters: gentoo
    priority: 1
    eclass-overrides: rap

ACCEPT_KEYWORDS="amd64 ~amd64 ~amd64-linux"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /scratch/ohuber/gentoo/etc/gentoo-release"
CXXFLAGS="-O2 -pipe -O2 -pipe"
DISTDIR="/scratch/ohuber/gentoo/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://cosmos.illinois.edu/pub/gentoo/"
LANG="en_US.utf-8"
LC_ALL="en_US.utf-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j30"
PKGDIR="/scratch/ohuber/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/scratch/ohuber/gentoo/"
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"
PORTAGE_TMPDIR="/scratch/ohuber/gentoo/var/tmp"
USE="acl amd64 berkdb bzip2 caps cli cracklib crypt cxx dri fortran gdbm iconv ipv6 lzma metis modules mpi ncurses nls nptl openmp pcre prefix readline seccomp session sqlite ssl tcpd unicode 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="aes mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="libinput keyboard mouse" 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" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Olivier Huber 2018-10-17 09:28:04 UTC
This issue is still present. Would be nice to have a scanner to catch those issue,  I will try to add this to 05prefix
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-11-21 10:21:04 UTC
What would be a proper fix for libcap package in this case?
Comment 3 Larry the Git Cow gentoo-dev 2018-11-21 11:27:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c090a8f5b41f48b6df18275a4cc80d121797731

commit 0c090a8f5b41f48b6df18275a4cc80d121797731
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2018-11-21 11:26:48 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-11-21 11:26:48 +0000

    sys-libs/libcap: pass prefix to make
    
    Also pass build variables instead of using sed.
    
    Closes: https://bugs.gentoo.org/631734
    Package-Manager: Portage-2.3.51_p14, Repoman-2.3.12_p5
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-libs/libcap/libcap-2.26-r1.ebuild | 79 +++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)