Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55346 - pkg-config and sandbox
Summary: pkg-config and sandbox
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-27 11:33 UTC by fbusse
Modified: 2004-07-12 06:30 UTC (History)
1 user (show)

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 fbusse 2004-06-27 11:33:03 UTC
I use FEATURES="userpriv usersandbox" in make.conf and now I have quite often the problem that ebuilds for packages using pkg-config in their configure fail.
E.g. avidemux:
checking for pkg-config... /usr/bin/pkg-config
Failed to open '/usr/lib/pkgconfig/gtk+-2.0.pc': Permission denied
No package 'gtk+-2.0' found
************ Cannot identify gtk2 version ***************
configure: error: *** pkg-config installed incorrectly or gtk2-dev absent ! ***

!!! ERROR: media-video/avidemux-2.0.24 failed.
!!! Function econf, Line 365, Exitcode 1
!!! econf failed

# ls -al /usr/lib/pkgconfig/gtk+-2.0.pc
-rw-r--r--  1 root root 330 May 27 11:17 /usr/lib/pkgconfig/gtk+-2.0.pc

I have to use FEATURES="sandbox" to get the package to emerge correctly.
Is this the only possible workaround?

Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-mm2)
=================================================================
System uname: 2.6.7-mm2 i686 AMD Athlon(TM) XP 2600+
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
Comment 1 Spider (RETIRED) gentoo-dev 2004-07-11 13:45:28 UTC
hmm, I can't reproduce it here, portage devs, any hint?
Comment 2 foser (RETIRED) gentoo-dev 2004-07-11 14:43:12 UTC
are the pkgconfig files readable for your user -> are the dir permissions correct ?
Comment 3 fbusse 2004-07-11 22:47:31 UTC
Good hint:

$ls -al /usr/lib/pkgconfig
total 252
drw-r--r--   2 root root  4096 Jul  8 18:54 .
drwxr-xr-x  40 root root 24576 Jul  8 18:54 ..
-rw-r--r--   1 root root   283 Feb 23 18:20 ImageMagick++.pc
-rw-r--r--   1 root root   523 Feb 23 18:20 ImageMagick.pc
...

The files should be readable for everybody, but portage isnt allowed to change into the directory (forgot that x is responsible for dir-changing, not r).
chmod 655 /usr/lib/pkgconfig fixed it, sorry for the noise.

But shouldn't those permissions get fixed by portage the first time it runs unpriviliged?
I remember seeing something like "Fixing permissions" the first time I started portage with userpriv.
Comment 4 Spider (RETIRED) gentoo-dev 2004-07-11 23:22:33 UTC
Nope, and default ones are/ought to be, 0755
Comment 5 foser (RETIRED) gentoo-dev 2004-07-12 06:30:36 UTC
afaik those permissions should be right by default. We have one other bugreport with a similar problem, but we cannot pinpoint if it's local or not so we can't do much about it (non-reproducable).