I use /home/tmp instead of /tmp (/tmp is symlink to /home/tmp) due to quota restrictions. borisych@dgap-gw borisych $ cat /etc/make.conf | grep PORTAGE_TMPDIR # PORTAGE_TMPDIR is the location portage will use for compilations and PORTAGE_TMPDIR=/var/tmp borisych@dgap-gw borisych $ ls -l /var/tmp lrwxrwxrwx 1 root root 11 May 31 20:25 /var/tmp -> ../home/tmp borisych@dgap-gw borisych$ after emerge perl-5.8.0-r12.ebuild (r10 or r11) I get: gcc -o a2p -L/usr/local/lib hash.o str.o util.o walk.o a2p.o -lpthread -lnsl - lndbm -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil ../miniperl -I../lib find2perl.PL Extracting find2perl (with variable substitutions) make[1]: Leaving directory `/home/tmp/portage/perl-5.8.0-r12/work/perl- 5.8.0/x2p' Making B (dynamic) opendir(./../../../../../../..): Permission denied at ../../lib/File/Find.pm line 573 Use of chdir('') or chdir(undef) as chdir() is deprecated at ../../lib/File/Find.pm line 716. opendir(./../../..): Permission denied at ../../lib/ExtUtils/MakeMaker.pm line 231 Couldn't change to directory /home/tmp/portage/homedir/C: No such file or directory at Makefile.PL line 18 Running '/home/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0/miniperl "- I../../lib" ../../lib/ExtUtils/xsubpp -v 2>&1' exits with status 2 at ../../lib/ExtUtils/MM_Unix.pm line 3826. Running '/home/tmp/portage/perl-5.8.0-r12/work/perl- 5.8.0/miniperl ../../lib/ExtUtils/xsubpp temp000 2>&1' exits with status 2 at ../../lib/ExtUtils/MM_Unix.pm line 3852. Writing Makefile for B Warning: No Makefile! make[1]: Entering directory `/home/tmp/portage/perl-5.8.0-r12/work/perl- 5.8.0/ext/B' make[1]: *** No rule to make target `config'. Stop. make[1]: Leaving directory `/home/tmp/portage/perl-5.8.0-r12/work/perl- 5.8.0/ext/B' make config failed, continuing anyway... make[1]: Entering directory `/home/tmp/portage/perl-5.8.0-r12/work/perl- 5.8.0/ext/B' make[1]: *** No rule to make target `all'. Stop. make[1]: Leaving directory `/home/tmp/portage/perl-5.8.0-r12/work/perl- 5.8.0/ext/B' make: *** [lib/auto/B/B.so] Error 2 !!! ERROR: dev-lang/perl-5.8.0-r12 failed. !!! Function src_compile, Line 192, Exitcode 2 !!! Unable to make dgap-gw perl # If I change PORTAGE_TMPDIR=/var/tmp to PORTAGE_TMPDIR=/var/tmp1 (/var/tmp1 is not a symlink) all works.
Having PORTAGE_TMPDIR be a symlink to somewhere else isn't supported, because it messes up the stat calls made by portage. Define it to its final destination.