Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35836 - kdebase 3.2 fails to compile: genkdmconf tries to make a dir out of PORTAGE_TMPDIR
Summary: kdebase 3.2 fails to compile: genkdmconf tries to make a dir out of PORTAGE_T...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: InVCS
: 41218 42095 42306 43230 44602 (view as bug list)
Depends on: 42048
Blocks:
  Show dependency tree
 
Reported: 2003-12-14 15:07 UTC by qube99
Modified: 2004-04-27 05:29 UTC (History)
11 users (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 qube99 2003-12-14 15:07:11 UTC
Compiling kdebase 3.2-beta2 succeeds until the following:

./genkdmconf --in /mnt/large/portage/tmp/portage/kdebase-3.2.0_beta2/image//usr/kde/3.2/share/config/kdm --face-src ./pics
Cannot create parent /mnt/large of target directory /mnt/large/portage/tmp/portage/kdebase-3.2.0_beta2/image//usr/kde/3.2/share/config/kdm: Permission denied
make[4]: *** [install-data-local] Error 1
make[4]: Leaving directory `/mnt/large/portage/tmp/portage/kdebase-3.2.0_beta2/work/kdebase-3.1.94/kdm/kfrontend'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/mnt/large/portage/tmp/portage/kdebase-3.2.0_beta2/work/kdebase-3.1.94/kdm/kfrontend'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/mnt/large/portage/tmp/portage/kdebase-3.2.0_beta2/work/kdebase-3.1.94/kdm/kfrontend'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/mnt/large/portage/tmp/portage/kdebase-3.2.0_beta2/work/kdebase-3.1.94/kdm'
make: *** [install-recursive] Error 1

!!! ERROR: kde-base/kdebase-3.2.0_beta2 failed.
!!! Function kde_src_install, Line 162, Exitcode 2
!!! died running make install, kde_src_install:make


Reproducible: Always
Steps to Reproduce:
1. Unmask kdebase-3.2-beta2
2. emerge kdebase-3.2-beta2




Gentoo Base System version 1.4.3.8p1 
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.2.5-r2,2.3.2-r1, 
2.4.21kuw3) 
================================================================= 
System uname: 2.4.21kuw3 i686 AMD Athlon(tm) Processor 
ccache version 2.2 [enabled] 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="no" 
CFLAGS="-Os -march=athlon-xp -pipe" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/
share/config /usr/share/texmf/tex/generic/config /usr/share/texmf/tex/platex/
config /usr/X11R6/lib/X11/xkb /usr/kde/3.2/share/config /usr/kde/3.1/share/
config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /
usr/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="-Os -march=athlon-xp -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="sandbox autoaddcvs ccache fixpackages userpriv" 
GENTOO_MIRRORS="http://gentoo.seren.com/gentoo ftp://mirrors.tds.net/
gentoo http://mirrors.tds.net/gentoo ftp://csociety-ftp.ecn.purdue.edu/pub/
gentoo/ http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/mnt/large/portage/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad 
mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib 
directfb gtkhtml gdbm berkdb slang readline arts tetex aalib bonobo svga ggi 
tcltk java guile ruby mysql X sdl gpm tcpd pam libwww ssl perl python esd imlib 
oggvorbis gnome gtk qt kde motif opengl mozilla ldap cdr scanner acl dga doc 
evo gtk2 nas samba sse usb Xaw3d xinerama -alsa dvd dvdr"
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2003-12-17 05:22:26 UTC
emailed Ossi @ kde -> I think it's a problem there

as a workaround, set PORTAGE_TMPDIR to some other location , like a local partition.
Comment 2 Thomas Heiserowski 2003-12-19 05:18:56 UTC
> as a workaround, set PORTAGE_TMPDIR to some other location ,
> like a local partition.

That does not work -- at least not for me. I already had moved PORTAGE_TMPDIR to another partition and thought this error is caused by my settings.
Comment 3 Heiko Wundram 2004-01-04 12:39:56 UTC
If, for the duration of emerging kde-base, you set FEATURES="-sandbox", the emerge works successfully, just as a temporary workaround. I guess that the problem is, is simply that genkdmconfig tries to create the paths from the bottom up and can't cope with the error 'no permission', as generally you install as root, not as a user. It can obviously cope with the error 'path exists', in which case it does nothing... This is obviously a KDE installer bug.
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-06 11:16:40 UTC
This is still present in 3.2.0.  /usr/local/tmp/portage is local for me.  I'm bumping this up to critical. msg me on IRC if you need more real-time feedback and help squashing this.

  /bin/sh ../../libtool --silent --mode=install /bin/install -c -p  krootimage /usr/local/tmp/portage/kdebase-3.2.0/image//usr/kde/3.2/bin/krootimage
  /bin/sh ../../libtool --silent --mode=install /bin/install -c -p  genkdmconf /usr/local/tmp/portage/kdebase-3.2.0/image//usr/kde/3.2/bin/genkdmconf
/bin/sh ../../admin/mkinstalldirs /usr/local/tmp/portage/kdebase-3.2.0/image//usr/kde/3.2/lib/kde3
 /bin/sh ../../libtool --silent --mode=install /bin/install -c -p  kgreet_classic.la /usr/local/tmp/portage/kdebase-3.2.0/image//usr/kde/3.2/lib/kde3/kgreet_classic.la
libtool: install: warning: remember to run `libtool --finish /usr/kde/3.2/lib/kde3'
./genkdmconf --in /usr/local/tmp/portage/kdebase-3.2.0/image//usr/kde/3.2/share/config/kdm --face-src ./pics 
Cannot create parent /usr/local of target directory /usr/local/tmp/portage/kdebase-3.2.0/image//usr/kde/3.2/share/config/kdm: Permission denied
make[4]: *** [install-data-local] Error 1
make[4]: Leaving directory `/usr/local/tmp/portage/kdebase-3.2.0/work/kdebase-3.2.0/kdm/kfrontend'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/usr/local/tmp/portage/kdebase-3.2.0/work/kdebase-3.2.0/kdm/kfrontend'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/local/tmp/portage/kdebase-3.2.0/work/kdebase-3.2.0/kdm/kfrontend'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/local/tmp/portage/kdebase-3.2.0/work/kdebase-3.2.0/kdm'
make: *** [install-recursive] Error 1

!!! ERROR: kde-base/kdebase-3.2.0 failed.
!!! Function kde_src_install, Line 185, Exitcode 2
!!! died running make install, kde_src_install:make
Comment 5 Caleb Tennis (RETIRED) gentoo-dev 2004-02-06 11:35:24 UTC
The problem is that genkdmconf attempts to do a mkdir on the directory tree, to make sure that the final directory exists.  That is, it tries to:

mkdir /usr
mkdir /usr/local
mkdir /usr/local/tmp
mkdir /usr/local/tmp/portage

This behavior is reasonable.  The problem is that in the sandbox, the mkdir may fail.  We committed some fixes for this months ago, but apparently it's not all encompassing.  I believe it's due to the fact that the failure SHOULD be -EEXIST, but that's not happening.  The fix in the meantime is to set up permissions differently on the directories, or to emerge out of the sandbox.
Comment 6 Derk W te Bokkel 2004-02-10 10:08:17 UTC
umm ... as a for instance what permissions would you recommend to prevent this .. it is annoying to have to specifically FEATURES='-sandbox' emerge kdebase-3.2.0 on every machine I'm (re)installing it on.  Or if I forget do an   FEATURES='-sandbox' ebuild kdebase-3.2.0 install qmerge .. in the appropriate place.
Comment 7 Caleb Tennis (RETIRED) gentoo-dev 2004-02-10 10:13:01 UTC
Can you tell me what the permissions are of

/usr
/usr/local/
/usr/local/tmp
/usr/local/tmp/portage

and if any of them are symlinks?
Comment 8 Caleb Tennis (RETIRED) gentoo-dev 2004-02-10 10:14:12 UTC
(or whatever your directory chain is that is failing...)
Comment 9 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-10 10:45:45 UTC
$ ls -ld /usr /usr/local /usr/local/tmp /usr/local/tmp/portage
drwxr-xr-x   24 root     root         4096 Feb 10 04:04 /usr
drwxr-xr-x   16 root     root          440 Feb 10 04:03 /usr/local
drwxrwxrwt    4 root     root          120 Feb 10 10:44 /usr/local/tmp
drwxr-xr-x    4 portage  portage        96 Feb 10 10:44 /usr/local/tmp/portage
Comment 10 Derk W te Bokkel 2004-02-10 12:56:09 UTC
doesn't work .. 
mine are like that already in most cases, different trees but same principle
and in some cases more permissive all the way down starting at the top 
entire tree including tmp/portage rwx rwx rwx

and it consistently fails unless I do as I mentioned in comment #6
Comment 11 Caleb Tennis (RETIRED) gentoo-dev 2004-02-10 13:03:18 UTC
what i find most strange about this is that it succeeds for people whose PORTAGE_TMPDIR is the default /var/tmp/portage...
Comment 12 Caleb Tennis (RETIRED) gentoo-dev 2004-02-10 13:11:41 UTC
It's gotta be some strange problem with portage then.  The sandbox code will fail with an -EEXISTS if the directory already exists.  This is done via an lstat on the directory.  Since it succeeds using a normal PORTAGE_TMPDIR setup, and only is failing for people who have changed it, maybe something is hard-coded in emerge or ebuild.sh that is overriding the behavior somehow.
Comment 13 Caleb Tennis (RETIRED) gentoo-dev 2004-02-10 13:13:37 UTC
Maybe try this:

run /usr/lib/portage/bin/sandbox (as root)

try doing a:

mkdir /
mkdir /usr
mkdir /usr/local
mkdir /usr/local/tmp
mkdir /usr/local/tmp/portage

does it fail as "File exists" each time (it should)?
Comment 14 Derk W te Bokkel 2004-02-10 13:31:54 UTC
no problem there .. it gives
zwift bin # mkdir /
mkdir: cannot create directory `/': File exists
zwift bin # mkdir /usr
mkdir: cannot create directory `/usr': File exists

 my actual PORTAGE_TMPDIR == /mnt/bigdisk/tmp
zwift bin # mkdir /mnt
mkdir: cannot create directory `/mnt': File exists
zwift bin # mkdir /mnt/bigdisk1
mkdir: cannot create directory `/mnt/bigdisk1': File exists
zwift bin # mkdir /mnt/bigdisk1/tmp
mkdir: cannot create directory `/mnt/bigdisk1/tmp': File exists
zwift bin # mkdir /mnt/bigdisk1/tmp/portage
mkdir: cannot create directory `/mnt/bigdisk1/tmp/portage': File exists
zwift bin # mkdir /usr/local
mkdir: cannot create directory `/usr/local': File exists
zwift bin # mkdir /usr/local/tmp
ACCESS DENIED  mkdir:     /usr/local/tmp
mkdir: cannot create directory `/usr/local/tmp': Permission denied

#comment (/usr/local/tmp  does not exist )

actually I have one machine which uses /var/tmp as the 
PORTAGE_TMPDIR and I believe it also failed that last time I emerge'd kdebase .. I'm checking again .. but it's a slow machine ..


Comment 15 Derk W te Bokkel 2004-02-10 14:12:18 UTC
nope .. I must have a faulty personal memory or changed something ..  build succeeded this time on the standard /var/tmp setup .. even with the PORTAGE_TMPDIR=/var/tmp
uncommented,  first I thought the failure might be because of the un-commenting of the line.



Comment 16 Derk W te Bokkel 2004-02-10 14:26:34 UTC
found this when I exited the sandbox afer testing

zwift bin # exit
exit
>>> shell process failed to spawn
Cleaning up sandbox process
Cleaning up pids file.
========================== Gentoo linux path sandbox ===========================The protected environment has been shut down.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------LOG FILE = "/tmp/sandbox-7214.log"
 
mkdir:     /usr/local/tmp
-------------------------------------------------------------------------------- 


/tmp/sandbox-7214.log

just contained ... mkdir:     /usr/local/tmp

fyi
Comment 17 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-11 01:43:10 UTC
It gave me 'doesn't exist' messages for / /usr ... /usr/local/tmp/portage
Comment 18 Caleb Tennis (RETIRED) gentoo-dev 2004-02-11 04:49:04 UTC
*** Bug 41218 has been marked as a duplicate of this bug. ***
Comment 19 Caleb Tennis (RETIRED) gentoo-dev 2004-02-11 05:13:20 UTC
I'm curious what your SANDBOX_WRITE environment variable is being set as if PORTAGE_TMPDIR gets changed.

How about this:

in the ebuild, just before kde_src_install, try adding an

addwrite $PORTAGE_TMPDIR

and seeing if that helps with the problem
Comment 20 Priit Laes (IRC: plaes) 2004-02-11 11:14:38 UTC
The addwrite $PORTAGE_TMPDIR workaround didn't work for me :(
Comment 21 Caleb Tennis (RETIRED) gentoo-dev 2004-02-11 13:07:47 UTC
Here's the proposed fix (for the portage folks):

libsandbox.c, line 477:

-	lstat(canonic, &st);
-	if (0 == errno) {
+       if ((0 == lstat(canonic, &st))) {


Comment 22 Priit Laes (IRC: plaes) 2004-02-12 00:59:33 UTC
The portage patch seems to work.
Thanks :D
Comment 23 Robert Kroes 2004-02-13 15:18:08 UTC
I think my problem is probably related. My kdebase build also fails.

checking for KDE... libraries /usr/kde/3.2/lib, headers /usr/kde/3.2/include
checking if UIC has KDE plugins available... no
configure: error: you need to install kdelibs first.
died running ./configure, kde_src_compile:configure
 *
 * Your KDE program installation died while running the configure script
 *

!!! ERROR: kde-base/kdebase-3.2.0 failed.
!!! Function configure_die, Line 170, Exitcode 0
!!! (no error message)

# emerge info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22-gentoo-r5)
=================================================================
System uname: 2.4.22-gentoo-r5 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirror.aarnet.edu.au/pub/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl apache2 apm arts avi berkdb crypt cups encode esd foomaticdb freetds gdbm gif gnome gpm gtk gtk2 imap imlib innodb java jpeg kde libg++ libwww mad maildir mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcltk tcpd truetype x86 xml xml2 xmms xv zlib"
Comment 24 Robert Kroes 2004-02-18 03:25:21 UTC
What's happening with this bug? Is anyone looking into this? I haven't been able to fully build kdebase now for about a week now...

Thanks,
-Rob-
Comment 25 Caleb Tennis (RETIRED) gentoo-dev 2004-02-18 04:54:17 UTC
turn off the sandbox in your features.  I'm waiting for the portage folks to pick up the fix and apply it to a new version of portage.
Comment 26 Caleb Tennis (RETIRED) gentoo-dev 2004-02-20 12:46:57 UTC
*** Bug 42095 has been marked as a duplicate of this bug. ***
Comment 27 Caleb Tennis (RETIRED) gentoo-dev 2004-02-22 11:31:03 UTC
*** Bug 42306 has been marked as a duplicate of this bug. ***
Comment 28 Caleb Tennis (RETIRED) gentoo-dev 2004-02-29 08:10:31 UTC
*** Bug 43230 has been marked as a duplicate of this bug. ***
Comment 29 Donnie Berkholz (RETIRED) gentoo-dev 2004-02-29 11:48:48 UTC
Caleb, maybe you should just reassign it to dev-portage and CC kde, since it doesn't seem to be your problem anymore.
Comment 30 Caleb Tennis (RETIRED) gentoo-dev 2004-02-29 11:58:27 UTC
I've got Bug #42048 open for dev-portage for this topic, as a dep for this bug.
Comment 31 catking 2004-03-08 16:34:09 UTC
I dont understand why a patch is only being applied to sandbox. Surely the issue here is that the ebuild is incorrectly assuming default locations and not using PORTAGE_TMPDIR as required.

Comment 32 Caleb Tennis (RETIRED) gentoo-dev 2004-03-08 16:47:24 UTC
Nothing to do with the ebuild; it is how the genkdmconf attempts to make a directory within the sandbox, and the sandbox incorrectly returns a value when doing the mkdir.
Comment 33 Wilbur Pan 2004-03-11 17:20:49 UTC
I'd like to report that this is an issue with kdebase-3.2.1 as well:

 /bin/sh ../../libtool --silent --mode=install /bin/install -c -p  genkdmconf /home/var/tmp/portage/kdebase-3.2.1/image//usr/kde/3.2/bin/genkdmconf
/bin/sh ../../admin/mkinstalldirs /home/var/tmp/portage/kdebase-3.2.1/image//usr/kde/3.2/lib/kde3
 /bin/sh ../../libtool --silent --mode=install /bin/install -c -p  kgreet_classic.la /home/var/tmp/portage/kdebase-3.2.1/image//usr/kde/3.2/lib/kde3/kgreet_classic.la
libtool: install: warning: remember to run `libtool --finish /usr/kde/3.2/lib/kde3'
./genkdmconf --in /home/var/tmp/portage/kdebase-3.2.1/image//usr/kde/3.2/share/config/kdm --face-src ./pics
Cannot create parent /home/var of target directory /home/var/tmp/portage/kdebase-3.2.1/image//usr/kde/3.2/share/config/kdm: Permission denied
make[4]: *** [install-data-local] Error 1
make[4]: Leaving directory `/home/var/tmp/portage/kdebase-3.2.1/work/kdebase-3.2.1/kdm/kfrontend'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/var/tmp/portage/kdebase-3.2.1/work/kdebase-3.2.1/kdm/kfrontend'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/var/tmp/portage/kdebase-3.2.1/work/kdebase-3.2.1/kdm/kfrontend'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/var/tmp/portage/kdebase-3.2.1/work/kdebase-3.2.1/kdm'
make: *** [install-recursive] Error 1

!!! ERROR: kde-base/kdebase-3.2.1 failed.
!!! Function kde_src_install, Line 153, Exitcode 2
!!! died running make install, kde_src_install:make
Comment 34 Nils 2004-03-13 04:32:07 UTC
make[4]: *** [install-data-local] Error 1
make[4]: Leaving directory `/home/var/tmp/portage/kdebase-3.2.1/work/kdebase-3.2.1/kdm/kfrontend'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/var/tmp/portage/kdebase-3.2.1/work/kdebase-3.2.1/kdm/kfrontend'
make[2]: *** [install-recursive] Error 1
Same here (and i am always angry after hours of compiling this fat package ...)

make[2]: Leaving directory `/home/var/tmp/portage/kdebase-3.2.1/work/kdebase-3.2.1/kdm/kfrontend'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/var/tmp/portage/kdebase-3.2.1/work/kdebase-3.2.1/kdm'
make: *** [install-recursive] Error 1

!!! ERROR: kde-base/kdebase-3.2.1 failed.
!!! Function kde_src_install, Line 153, Exitcode 2
!!! died running make install, kde_src_install:make

Here's is a fast work around :
-> /etc/make.conf : Add the Line :
	FEATURES="-sandbox"
-> cd /usr/portage/kde-base/kdebase
-> ebuild kdebase-3.2.1.ebuild install
-> ebuild kdebase-3.2.1.ebuild qmerge
-> emerge -C kdebase-3.2.0
-> etc-update
everything is fine.

It's really a workaround, please fix the sandbox or install bug.
Comment 35 Nils 2004-03-13 05:13:03 UTC
I can reproduce the error. If I set make.conf PORTAGE_TMPDIR="/other_partition/tmp" it doesn't work.
If I set PORTAGE_TMPDIR="/root_partition/tmp" it is working.
I hope it helps somebody.
Comment 36 Caleb Tennis (RETIRED) gentoo-dev 2004-03-15 06:28:07 UTC
*** Bug 44602 has been marked as a duplicate of this bug. ***
Comment 37 Caleb Tennis (RETIRED) gentoo-dev 2004-03-22 15:31:11 UTC
This bug may quite possibly be fixed in the latest version of portage (2.0.50-r2).  Anyone wanna try it out?
Comment 38 Nicholas Jones (RETIRED) gentoo-dev 2004-04-11 15:43:50 UTC
It's almost fixed... There was a closely related bug.
portage-2.0.50-r5 and above will have this fixed. Due out later today.
Comment 39 Caleb Tennis (RETIRED) gentoo-dev 2004-04-27 05:29:20 UTC
This can be closed now - it's fixed in kdebase 3.2.2, and portage now handles it properly too it seems.