Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 540476 - dev-embedded/u-boot-tools-2015.01 - sandbox violation in ln -fsn .../work/u-boot-2015.01 [/usr/src/build-3.14.25-hardened-r1/]source
Summary: dev-embedded/u-boot-tools-2015.01 - sandbox violation in ln -fsn .../work/u-b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-18 11:51 UTC by Francesco Riosa
Modified: 2015-03-02 10:05 UTC (History)
3 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 Francesco Riosa 2015-02-18 11:51:00 UTC
u-boot-tools try to access (and link) stuff from the kernel build directory in /usr/src



* Package:    dev-embedded/u-boot-tools-2015.01
 * Repository: gentoo
 * Maintainer: dev-embedded@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   compressdebug sandbox splitdebug userpriv usersandbox
>>> Unpacking source...
>>> Unpacking u-boot-2015.01.tar.bz2 to /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work
>>> Source unpacked in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work
>>> Preparing source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
make -j12 -s defconfig 
ln: failed to create symbolic link ‘source’: Permission denied
/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/Makefile:402: recipe for target 'outputmakefile' failed
make[1]: *** [outputmakefile] Error 1
make[1]: *** Waiting for unfinished jobs....
/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/scripts/basic/fixdep.c:466:1: fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied
 }
 ^
compilation terminated.
scripts/Makefile.host:91: recipe for target 'scripts/basic/fixdep' failed
make[2]: *** [scripts/basic/fixdep] Error 1
/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/Makefile:390: recipe for target 'scripts_basic' failed
make[1]: *** [scripts_basic] Error 2
Makefile:145: set di istruzioni per l'obiettivo "sub-make" non riuscito
make: *** [sub-make] Errore 2
 * ERROR: dev-embedded/u-boot-tools-2015.01::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-embedded/u-boot-tools-2015.01::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-embedded/u-boot-tools-2015.01::gentoo'`.
 * The complete build log is located at '/var/log/portage/dev-embedded:u-boot-tools-2015.01:20150218-113044.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
 * S: '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
 (null)*(null) --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 (null)*(null) LOG FILE: "/var/log/sandbox/sandbox-19189.log"
 (null)*(null) 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: symlink
S: deny
P: source
A: /usr/src/build-3.14.25-hardened-r1/source
R: /usr/src/linux-3.14.25-hardened-r1
C: ln -fsn /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 source 

F: open_wr
S: deny
P: scripts/basic/.fixdep.d
A: /usr/src/build-3.14.25-hardened-r1/scripts/basic/.fixdep.d
R: /usr/src/build-3.14.25-hardened-r1/scripts/basic/.fixdep.d
C: /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.2/cc1 -quiet -I scripts/basic -MD scripts/basic/.fixdep.d /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/scripts/basic/fixdep.c -fno-strict-overflow -quiet -dumpbase fixdep.c -mtune=generic -march=x86-64 -auxbase fixdep -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer -fPIE -fstack-protector-all -fstack-check=specific -o /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/ccolsihr.s 
 (null)*(null) --------------------------------------------------------------------------------
cp: impossibile eseguire stat di "/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/build.log": File o directory non esistente







Portage 2.2.17 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.9.2, glibc-2.20-r2, 3.16.0-24-generic x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.16.0-24-generic-x86_64-Intel-R-_Core-TM-_i7_CPU_X_980_@_3.33GHz-with-gentoo-2.2
KiB Mem:    24681796 total,  12471392 free
KiB Swap:    2097148 total,   1977108 free
Timestamp of repository gentoo: Wed, 18 Feb 2015 09:15:01 +0000
sh bash 4.3_p33-r1
ld ld di GNU (Gentoo 2.25 p1.0) 2.25
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.2.1 [disabled]
app-shells/bash:          4.3_p33-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo, 3.4.2::gentoo
dev-util/ccache:          3.2.1-r1::gentoo
dev-util/cmake:           3.1.0::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.9::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.8.4::gentoo, 4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

x11
    location: /g/ovl/x11
    sync-type: git
    sync-uri: git://git.overlays.gentoo.org/proj/x11
    masters: gentoo
    priority: 1000

kde
    location: /g/ovl/kde
    sync-type: git
    sync-uri: https://github.com/gentoo/kde.git
    masters: gentoo
    priority: 4000

gentoo
    location: /g/portage
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo-portage-rsync-mirror
    priority: 5000

vivovl
    location: /g/ovl/tmp
    masters: gentoo
    priority: 5100

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=westmere -pipe -frecord-gcc-switches -fdiagnostics-color=never -ggdb3 -gdwarf-4 -fvar-tracking-assignments -Wdate-time -mno-3dnow -mno-sse4a -mno-movbe -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=12288 -mtune=westmere -mno-bmi2 -mno-avx2 -mno-lzcnt -mrdrnd --param=l1-cache-size=32 -mno-rtm -mno-hle -mno-rdseed -mno-prfchw -mno-adx "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/conf.d /etc/init.d /usr/share/config /usr/share/config/kdm /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/skel /etc/terminfo"
CXXFLAGS="-O2 -march=westmere -pipe -frecord-gcc-switches -fdiagnostics-color=never -ggdb3 -gdwarf-4 -fvar-tracking-assignments -Wdate-time -mno-3dnow -mno-sse4a -mno-movbe -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=12288 -mtune=westmere -mno-bmi2 -mno-avx2 -mno-lzcnt -mrdrnd --param=l1-cache-size=32 -mno-rtm -mno-hle -mno-rdseed -mno-prfchw -mno-adx -fvisibility-inlines-hidden -fabi-version=8 -std=c++11 -ffor-scope -fstrict-enums -fuse-cxa-atexit -ffat-lto-objects"
DISTDIR="/g/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --quiet-build=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync metadata-transfer news noinfo notitles parallel-fetch protect-owned sandbox sfperms skiprocheck splitdebug strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="it_IT.utf8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--build-id"
MAKEOPTS="-j12 -s"
PKGDIR="/g/packages"
PORTAGE_COMPRESS="/usr/bin/xz"
PORTAGE_COMPRESS_FLAGS="-3"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac accessibility acl acpi aiglx aim alsa amd64 artswrappersuid audiofile avahi avx bash-completion berkdb bidi bluetooth bzip2 c++0x cairo cdda cddb cdr cjk cli cpudetection cracklib crypt cups cxx dbus declarative dga dri dts dv dvb dvd dvdr dvdread dvi efi egl emboss encode exif fam fame fat ffmpeg firefox flac foomatic-db freetype gcj gdbm gif gimpprint glamor gles2 gmp gnutls gphoto2 gpm gsm gtk hardened harfbuzz hfs iconv icq ieee1394 imap inotify ipod ipv6 irc irda jabber jack jfs joystick jpeg justify kde kdeenablefinal kdehiddenvisibility kerberos kipi lame lcd lcms ldap libnotify live lm_sensors lz4 lzo mad mail matroska mjpeg mmx mng modules mozdevelop mp3 mp3rtp mp4 mpeg msn mtp multilib musepack musicbrainz ncurses network nls nptl nsplugin ntfs ogg openal opencl opengl openmp pam pango pax_kernel pcmcia pcre pda pdf perl phonon plasma png policykit ppds pulseaudio pypy python qt3support qt4 r600-llvm-compiler rar rdesktop readline real reiserfs rss scanner sdl semantic-desktop session slp smpeg speex spell sse sse2 sse4_1 ssl ssse3 startup-notification stream svg sysfs systemd tcpd theora threads tiff truetype udev udisks unicode upower urandom usb v4l v4l2 visualization vorbis wifi win32codecs wmf wxwidgets x264 xattr xcb xcomposite xfs xine xinerama xml xmp xpm xprint xscreensaver xtpax xulrunner xv xvid xvmc yahoo zeroconf zlib" ABI_X86="64" ALSA_CARDS="emu10k1x darla20 darla24 emu10k1 gina20 gina24 hdsp hdspm ice1712 indigo indigoio layla20 layla24 mia mixart mona pcxhr rme32 rme96 sb16 sbawe sscape usbusx2y vx222 usb-usx2y" 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" APACHE2_MPMS="worker" CALLIGRA_FEATURES="krita braindump flow stage words sheets karbon* kexi plan author" CAMERAS="agfa_cl20 casio_qv dimagev dimera3500 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica_qm150 panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh_g3 sipix_blink sipix_blink2 sipix_web2 sony_dscf1 sony_dscf55 toshiba_pdrm11 adc65 aox barbie canon clicksmart310 digigr8 digita directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 konica largan lg_gsm mars mustek pccam300 pccam600 ptp2 ricoh samsung sierra smal sonix soundvision spca50x sq905 stv0674 stv0680 sx330z template" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DRACUT_MODULES="caps cifs dmsquash-live livenet mdraid nfs ssh-client syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en en_US" LIRC_DEVICES="audio audio_alsa serial pctv" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi fancyindex" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 pypy pypy3" QEMU_SOFTMMU_TARGETS="arm cris m68k microblaze mips mips64 mips64el mipsel ppc ppc64 ppcemb sh4 sh4eb sparc sparc64 x86_64" QEMU_USER_TARGETS="arm x86_64" RUBY_TARGETS="ruby22" SANE_BACKENDS="kvs40xx mustek_usb2" USERLAND="GNU" VIDEO_CARDS="fbdev vesa intel modesetting i915 nouveau radeon" 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"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-embedded/u-boot-tools-2014.01::gentoo was built with the following:
USE="" ABI_X86="64"
CFLAGS="-O2 -march=westmere -pipe -frecord-gcc-switches -ggdb3 -gdwarf-4 -fvar-tracking-assignments -mno-3dnow -mno-sse4a -mno-movbe -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=12288 -mtune=westmere -mno-bmi2 -mno-avx2 -mno-lzcnt -mrdrnd --param=l1-cache-size=32 -mno-rtm -mno-hle -mno-rdseed -mno-prfchw -mno-adx"
CXXFLAGS="-O2 -march=westmere -pipe -frecord-gcc-switches -ggdb3 -gdwarf-4 -fvar-tracking-assignments -mno-3dnow -mno-sse4a -mno-movbe -mno-sha -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=12288 -mtune=westmere -mno-bmi2 -mno-avx2 -mno-lzcnt -mrdrnd --param=l1-cache-size=32 -mno-rtm -mno-hle -mno-rdseed -mno-prfchw -mno-adx -fvisibility-inlines-hidden -fabi-version=6 -std=c++11 -ffor-scope -fstrict-enums -fuse-cxa-atexit -ffat-lto-objects"
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2015-02-18 12:59:58 UTC
I will have a look. Very strange. I did not see that problem when I merged that into my system.
Comment 2 Francesco Riosa 2015-02-18 14:12:55 UTC
(In reply to Markos Chandras from comment #1)
> I will have a look. Very strange. I did not see that problem when I merged
> that into my system.

even if this is run in an lxc container there is a fully built kernel (required for other pkgs)

gentoo src # ls -l
totale 52
drwxr-xr-x 10 root root  11  6 feb 10.32 ABI
lrwxrwxrwx  1 root root  25  3 dic 14.37 build -> build-3.14.25-hardened-r1
drwxrwxr-x 23 vivo users 45 10 dic 23.16 build-3.14.25-hardened-r1
drwxr-xr-x  5 root root   5  6 dic 06.02 debug
lrwxrwxrwx  1 root root  25  2 dic 23.13 linux -> linux-3.14.25-hardened-r1
drwxr-xr-x 24 root root  34  2 dic 20.08 linux-3.14.25-hardened-r1
drwxrwxr-x  3 vivo root   5  3 dic 15.14 plugin
drwxr-xr-x  4 root root   6  5 dic 05.35 spl-0.6.3
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2015-02-21 10:57:36 UTC
Sorry I can't reproduce it
Comment 4 Joe Harvell 2015-02-27 23:45:10 UTC
(In reply to Markos Chandras from comment #3)
> Sorry I can't reproduce it

It's broken for me too.  What info do you want from me to help debugging this?
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2015-02-28 08:05:53 UTC
The original bug report from Francesco Riosa has -s in MAKEOPTS so i can't see much in the build.log. So a proper build.log would be a good first step. Alternatively, you can try build yourself, without using the ebuild and see if you can identify the offending Makefile rule that does the symlink.
Comment 6 Martin Gysel (bearsh) 2015-02-28 13:05:50 UTC
not much more infos without '-s'...

$ MAKEOPTS="" sudo -E ebuild u-boot-tools-2015.01.ebuild compile 
 * u-boot-2015.01.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                    [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                              [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                             [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                            [ ok ]
>>> Unpacking source...
>>> Unpacking u-boot-2015.01.tar.bz2 to /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work
>>> Source unpacked in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work
>>> Preparing source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
make defconfig 
make[1]: Entering directory '/var/cache/build_kernel'
  HOSTCC  scripts/basic/fixdep
 * ACCESS DENIED:  open_wr:      /var/cache/build_kernel/scripts/basic/.fixdep.d
/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/scripts/basic/fixdep.c:466:1: fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied
 }
 ^
compilation terminated.
scripts/Makefile.host:91: recipe for target 'scripts/basic/fixdep' failed
make[2]: *** [scripts/basic/fixdep] Error 1
/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/Makefile:390: recipe for target 'scripts_basic' failed
make[1]: *** [scripts_basic] Error 2
make[1]: Leaving directory '/var/cache/build_kernel'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
 * ERROR: dev-embedded/u-boot-tools-2015.01::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-embedded/u-boot-tools-2015.01::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-embedded/u-boot-tools-2015.01::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
 * S: '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-31915.log"
 * 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: scripts/basic/.fixdep.d
A: /var/cache/build_kernel/scripts/basic/.fixdep.d
R: /var/cache/build_kernel/scripts/basic/.fixdep.d
C: /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.4/cc1 -quiet -I scripts/basic -MD scripts/basic/.fixdep.d /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/scripts/basic/fixdep.c -quiet -dumpbase fixdep.c -mtune=generic -march=x86-64 -auxbase fixdep -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer -fstack-protector -o /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/ccioQkPo.s 
 * --------------------------------------------------------------------------------
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2015-03-01 09:59:54 UTC
anyone brave enough to try this patch?

diff -u -B -u -r1.1 u-boot-tools-2015.01.ebuild
--- u-boot-tools-2015.01.ebuild 11 Feb 2015 17:50:59 -0000      1.1
+++ u-boot-tools-2015.01.ebuild 1 Mar 2015 09:57:29 -0000
@@ -19,7 +19,7 @@
 S=${WORKDIR}/${MY_P}
 
 src_compile() {
-       emake defconfig
+       emake O="${S}" defconfig
        emake \
                HOSTSTRIP=: \
                HOSTCC="$(tc-getCC)" \

Alternatively, you could try the following one

diff -u -B -u -r1.1 u-boot-tools-2015.01.ebuild
--- u-boot-tools-2015.01.ebuild 11 Feb 2015 17:50:59 -0000      1.1
+++ u-boot-tools-2015.01.ebuild 1 Mar 2015 09:57:29 -0000
@@ -19,7 +19,7 @@
 S=${WORKDIR}/${MY_P}
 
 src_compile() {
+       export KBUILD_OUTPUT="${S}"
        emake defconfig
        emake \
                HOSTSTRIP=: \
                HOSTCC="$(tc-getCC)" \
Comment 8 Martin Gysel (bearsh) 2015-03-01 11:30:51 UTC
for the 1. patch I get the following:

$ MAKEOPTS="" sudo -E ebuild u-boot-tools-2015.01.ebuild clean compile
 * u-boot-2015.01.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                    [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                              [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                             [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                            [ ok ]
>>> Unpacking source...
>>> Unpacking u-boot-2015.01.tar.bz2 to /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work
>>> Source unpacked in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work
>>> Preparing source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
make O=/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 defconfig 
make[1]: Entering directory '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
*** Default configuration is based on 'sandbox_defconfig'
make[1]: Leaving directory '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
make HOSTSTRIP=: HOSTCC=x86_64-pc-linux-gnu-gcc 'HOSTCFLAGS=-O2 -march=core2 -pipe -msse4.1  $(HOSTCPPFLAGS)' HOSTLDFLAGS=-Wl,--as-needed CONFIG_ENV_OVERWRITE=y tools-all 
make[1]: Entering directory '/var/cache/build_kernel'
/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/Makefile:506: /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/arch//Makefile: No such file or directory
 * ACCESS DENIED:  open_wr:      /var/cache/build_kernel/.31698.tmp
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/.31698.tmp
rm: cannot remove ‘.31698.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/.31698.o
rm: cannot remove ‘.31698.o’: Permission denied
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/.31698.su
rm: cannot remove ‘.31698.su’: Permission denied
 * ACCESS DENIED:  open_wr:      /var/cache/build_kernel/31703.su
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/31703
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/31703.su
rm: cannot remove ‘31703’: Permission denied
rm: cannot remove ‘31703.su’: Permission denied
 * ACCESS DENIED:  open_wr:      /var/cache/build_kernel/.31708.tmp
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/.31708.tmp
 * rm: cannot remove ‘.31708.tmp’: Permission denied
ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/.31708.o
rm: cannot remove ‘.31708.o’: Permission denied
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/.31708.su
rm: cannot remove ‘.31708.su’: Permission denied
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/.31713.tmp
 * ACCESS DENIED:  unlinkatrm: cannot remove ‘.31713.tmp’: Permission denied
:     /var/cache/build_kernel/.31713.o
rm: cannot remove ‘.31713.o’: Permission denied
 * ACCESS DENIED:  unlinkat:     /var/cache/build_kernel/.31713.su
rm: cannot remove ‘.31713.su’: Permission denied
make[1]: *** No rule to make target '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/arch//Makefile'.  Stop.
make[1]: Leaving directory '/var/cache/build_kernel'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
 * ERROR: dev-embedded/u-boot-tools-2015.01::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-embedded/u-boot-tools-2015.01::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-embedded/u-boot-tools-2015.01::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
 * S: '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-31518.log"
 * 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: .31698.tmp
A: /var/cache/build_kernel/.31698.tmp
R: /var/cache/build_kernel/.31698.tmp
C: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/../../../../x86_64-pc-linux-gnu/bin/as --64 -o .31698.tmp /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/ccDPYno3.s 

F: unlinkat
S: deny
P: .31698.tmp
A: /var/cache/build_kernel/.31698.tmp
R: /var/cache/build_kernel/.31698.tmp
C: rm -f .31698.tmp .31698.o .31698.su 

F: unlinkat
S: deny
P: .31698.o
A: /var/cache/build_kernel/.31698.o
R: /var/cache/build_kernel/.31698.o
C: rm -f .31698.tmp .31698.o .31698.su 

F: unlinkat
S: deny
P: .31698.su
A: /var/cache/build_kernel/.31698.su
R: /var/cache/build_kernel/.31698.su
C: rm -f .31698.tmp .31698.o .31698.su 

F: open_wr
S: deny
P: 31703.su
A: /var/cache/build_kernel/31703.su
R: /var/cache/build_kernel/31703.su
C: /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.4/cc1 -quiet - -quiet -dumpbase - -mtune=generic -march=x86-64 -auxbase-strip 31703 -Werror -fstack-usage -fstack-protector -o /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/cckPTlJ2.s 

F: unlinkat
S: deny
P: 31703
A: /var/cache/build_kernel/31703
R: /var/cache/build_kernel/31703
C: rm -f 31703 31703.su 

F: unlinkat
S: deny
P: 31703.su
A: /var/cache/build_kernel/31703.su
R: /var/cache/build_kernel/31703.su
C: rm -f 31703 31703.su 

F: open_wr
S: deny
P: .31708.tmp
A: /var/cache/build_kernel/.31708.tmp
R: /var/cache/build_kernel/.31708.tmp
C: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/../../../../x86_64-pc-linux-gnu/bin/as --64 -o .31708.tmp /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/cctfzQp4.s 

F: unlinkat
S: deny
P: .31708.tmp
A: /var/cache/build_kernel/.31708.tmp
R: /var/cache/build_kernel/.31708.tmp
C: rm -f .31708.tmp .31708.o .31708.su 

F: unlinkat
S: deny
P: .31708.o
A: /var/cache/build_kernel/.31708.o
R: /var/cache/build_kernel/.31708.o
C: rm -f .31708.tmp .31708.o .31708.su 

F: unlinkat
S: deny
P: .31708.su
A: /var/cache/build_kernel/.31708.su
R: /var/cache/build_kernel/.31708.su
C: rm -f .31708.tmp .31708.o .31708.su 

F: unlinkat
S: deny
P: .31713.tmp
A: /var/cache/build_kernel/.31713.tmp
R: /var/cache/build_kernel/.31713.tmp
C: rm -f .31713.tmp .31713.o .31713.su 

F: unlinkat
S: deny
P: .31713.o
A: /var/cache/build_kernel/.31713.o
R: /var/cache/build_kernel/.31713.o
C: rm -f .31713.tmp .31713.o .31713.su 

F: unlinkat
S: deny
P: .31713.su
A: /var/cache/build_kernel/.31713.su
R: /var/cache/build_kernel/.31713.su
C: rm -f .31713.tmp .31713.o .31713.su 
 * --------------------------------------------------------------------------------
Comment 9 Martin Gysel (bearsh) 2015-03-01 11:31:26 UTC
for the 2nd:

$ MAKEOPTS="" sudo -E ebuild u-boot-tools-2015.01.ebuild clean compile
 * u-boot-2015.01.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                    [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                              [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                             [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                            [ ok ]
>>> Unpacking source...
>>> Unpacking u-boot-2015.01.tar.bz2 to /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work
>>> Source unpacked in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work
>>> Preparing source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 ...
make defconfig 
make[1]: Entering directory '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
*** Default configuration is based on 'sandbox_defconfig'
make[1]: Leaving directory '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
make HOSTSTRIP=: HOSTCC=x86_64-pc-linux-gnu-gcc 'HOSTCFLAGS=-O2 -march=core2 -pipe -msse4.1  $(HOSTCPPFLAGS)' HOSTLDFLAGS=-Wl,--as-needed CONFIG_ENV_OVERWRITE=y tools-all 
make[1]: Entering directory '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  HOSTCC  tools/env/fw_env.o
  HOSTCC  tools/env/fw_env_main.o
  HOSTCC  tools/env/crc32.o
  HOSTCC  tools/env/ctype.o
  HOSTCC  tools/env/linux_string.o
  HOSTCC  tools/env/env_attr.o
  HOSTCC  tools/env/env_flags.o
  HOSTCC  tools/env/aes.o
  HOSTLD  tools/env/fw_printenv
  STRIP   tools/env/fw_printenv
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  Using /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 as source for U-Boot
  /var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01 is not clean, please run 'make mrproper'
  in the '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01' directory.
/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01/Makefile:1125: recipe for target 'prepare3' failed
make[1]: *** [prepare3] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
 * ERROR: dev-embedded/u-boot-tools-2015.01::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-embedded/u-boot-tools-2015.01::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-embedded/u-boot-tools-2015.01::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
 * S: '/var/tmp/portage/dev-embedded/u-boot-tools-2015.01/work/u-boot-2015.01'
Comment 10 Martin Gysel (bearsh) 2015-03-01 11:36:26 UTC
and if I modify the 1. patch to also include the 'O="${S}"' in the second emake call (the actual compilation) the output looks the same as from your second patch
Comment 11 Francesco Riosa 2015-03-01 12:11:38 UTC
thank bearsh for putting time on it, I'm rather busy at the moment and not using actively the package
Comment 12 Markos Chandras (RETIRED) gentoo-dev 2015-03-01 14:12:00 UTC
I have no idea what is going on to be honest. Seems like certain KBUILD variables are being overwritten in your environment and confuses the build system. Most likely KBUILD_SRC. How about that

diff -u -B -u -r1.1 u-boot-tools-2015.01.ebuild
--- u-boot-tools-2015.01.ebuild 11 Feb 2015 17:50:59 -0000      1.1
+++ u-boot-tools-2015.01.ebuild 1 Mar 2015 14:11:29 -0000
@@ -19,6 +19,7 @@
 S=${WORKDIR}/${MY_P}
 
 src_compile() {
+       unset KBUILD_SRC
        emake defconfig
        emake \
                HOSTSTRIP=: \
Comment 13 Martin Gysel (bearsh) 2015-03-01 19:02:49 UTC
doesn't work but made me try other things and got it to work...
I assume most users don't have KBUILD_OUTPUT set in make.conf but unsetting it solves it

--- u-boot-tools-2015.01.ebuild.old     2015-03-01 19:58:41.393411138 +0100
+++ u-boot-tools-2015.01.ebuild 2015-03-01 19:59:09.084064957 +0100
@@ -19,6 +19,7 @@
 S=${WORKDIR}/${MY_P}
 
 src_compile() {
+       unset KBUILD_OUTPUT
        emake defconfig
        emake \
                HOSTSTRIP=: \
Comment 14 Markos Chandras (RETIRED) gentoo-dev 2015-03-01 19:55:02 UTC
Why do you have such a variable defined in make.conf? What kind of package/scenario requires it? I don't see this variable being set in Francesco's report so maybe we are talking about two different problems here?
Comment 15 Martin Gysel (bearsh) 2015-03-01 21:47:53 UTC
AFAIK some packages/ebuild/buildsystems read the kernel config in some ebuild phase which is located in KBUILD_OUTPUT if you do out of source building of the kernel. maybe this can be achieved in another way but for me it works fine.
Maybe Francesco set up the variable in another way that it doesn't appear in his emerge --info
Comment 16 Francesco Riosa 2015-03-02 09:25:01 UTC
# grep -B1  KBUILD /etc/portage/make.conf
# for linux kernel
KBUILD_OUTPUT="/usr/src/build"

for the exact same reasons Martin explained in #c15 I _do_ have it enabled, no idea why it didn't show up
Comment 17 Markos Chandras (RETIRED) gentoo-dev 2015-03-02 10:05:05 UTC
Ok then I applied the following patch.

RCS file: /var/cvsroot/gentoo-x86/dev-embedded/u-boot-tools/u-boot-tools-2015.01.ebuild,v
retrieving revision 1.1
diff -u -B -u -r1.1 u-boot-tools-2015.01.ebuild
--- u-boot-tools-2015.01.ebuild 11 Feb 2015 17:50:59 -0000      1.1
+++ u-boot-tools-2015.01.ebuild 2 Mar 2015 10:03:16 -0000
@@ -19,6 +19,8 @@
 S=${WORKDIR}/${MY_P}
 
 src_compile() {
+       # Unset a few KBUILD variables. Bug #540476
+       unset KBUILD_OUTPUT KBUILD_SRC
        emake defconfig
        emake \
                HOSTSTRIP=: \


Thanks

+  02 Mar 2015; Markos Chandras <hwoarang@gentoo.org>
+  u-boot-tools-2015.01.ebuild:
+  unset a few KBUILD variables. Bug #540476
+