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"
emailed Ossi @ kde -> I think it's a problem there as a workaround, set PORTAGE_TMPDIR to some other location , like a local partition.
> 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.
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.
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
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.
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.
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?
(or whatever your directory chain is that is failing...)
$ 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
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
what i find most strange about this is that it succeeds for people whose PORTAGE_TMPDIR is the default /var/tmp/portage...
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.
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)?
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 ..
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.
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
It gave me 'doesn't exist' messages for / /usr ... /usr/local/tmp/portage
*** Bug 41218 has been marked as a duplicate of this bug. ***
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
The addwrite $PORTAGE_TMPDIR workaround didn't work for me :(
Here's the proposed fix (for the portage folks): libsandbox.c, line 477: - lstat(canonic, &st); - if (0 == errno) { + if ((0 == lstat(canonic, &st))) {
The portage patch seems to work. Thanks :D
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"
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-
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.
*** Bug 42095 has been marked as a duplicate of this bug. ***
*** Bug 42306 has been marked as a duplicate of this bug. ***
*** Bug 43230 has been marked as a duplicate of this bug. ***
Caleb, maybe you should just reassign it to dev-portage and CC kde, since it doesn't seem to be your problem anymore.
I've got Bug #42048 open for dev-portage for this topic, as a dep for this bug.
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.
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.
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
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.
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.
*** Bug 44602 has been marked as a duplicate of this bug. ***
This bug may quite possibly be fixed in the latest version of portage (2.0.50-r2). Anyone wanna try it out?
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.
This can be closed now - it's fixed in kdebase 3.2.2, and portage now handles it properly too it seems.