The ebuild tries to call _check_build_dir, but does not inherit the eclass where that is defined (autotools-utils). It gets called later anyway, but not before the ebuild tries to use BUILD_DIR to set the DOCDIR cmake variable: -DDOCDIR="${BUILD_DIR}/doc" Which, since BUILD_DIR is not yet defined at that point, ends up setting DOCDIR=/doc, which then causes sandbox violations during the build. Build log snippet: [...] >>> Source prepared. >>> Configuring source in /var/tmp/portage/media-libs/vigra-1.10.0/work/vigra-1.10.0 ... /var/tmp/portage/media-libs/vigra-1.10.0/temp/environment: line 4077: _check_build_dir: command not found >>> Working in BUILD_DIR: "/var/tmp/portage/media-libs/vigra-1.10.0/work/vigra-1.10.0_build" cmake --no-warn-unused-cli -C /var/tmp/portage/media-libs/vigra-1.10.0/work/vigra-1.10.0_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DAUTOEXEC_TESTS=OFF -DDOCDIR=/doc -DDOCINSTALL=share/doc/vigra-1.10.0 -DLIBDIR_SUFFIX=64 -DWITH_VALGRIND=OFF -DENABLE_DOC=OFF -DWITH_FFTW3=ON -DWITH_HDF5=OFF -DWITH_JPEG=ON -DWITH_MPI=OFF -DWITH_PNG=ON -DWITH_OPENEXR=ON -DWITH_VIGRANUMPY=OFF -DWITH_TIFF=ON -DBUILD_TESTING=OFF -DCREATE_CTEST_TARGETS=OFF -DAUTOBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/media-libs/vigra-1.10.0/work/vigra-1.10.0_build/gentoo_rules.cmake -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-libs/vigra-1.10.0/work/vigra-1.10.0_build/gentoo_toolchain.cmake /var/tmp/portage/media-libs/vigra-1.10.0/work/vigra-1.10.0 [...] * ACCESS DENIED: mkdir: /doc CMake Error at docsrc/CMakeLists.txt:56 (file): file problem creating directory: /doc/vigra [...] Reproducible: Always Steps to Reproduce: 1. emerge =media-libs/vigra-1.10.0 Actual Results: Build fails Expected Results: Build succeeds Portage 2.2.27 (python 2.7.11-final-0, hardened/linux/amd64, gcc-5.3.0, glibc-2.22-r1, 4.3.3-hardened-r4 x86_64) ================================================================= System uname: Linux-4.3.3-hardened-r4-x86_64-Intel-R-_Core-TM-_i7-3820QM_CPU_@_2.70GHz-with-gentoo-2.2 KiB Mem: 32843992 total, 17290152 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Fri, 29 Jan 2016 09:45:01 +0000 sh bash 4.3_p42-r1 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.2.4 [disabled] app-shells/bash: 4.3_p42-r1::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.1::gentoo dev-lang/python: 2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo dev-util/ccache: 3.2.4::gentoo dev-util/cmake: 3.4.3::gentoo dev-util/pkgconfig: 0.29::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.20.2::gentoo sys-apps/sandbox: 2.10-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo, 5.3.0::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.22-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.jp.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: --timeout=180 AniDBUdpClient-overlay location: /var/lib/layman/AniDBUdpClient-overlay sync-type: git sync-uri: http://aptx.org/git/anidbudpclient-overlay.git masters: gentoo priority: 50 bumblebee location: /var/lib/layman/bumblebee masters: gentoo priority: 50 klondike location: /var/lib/layman/klondike sync-type: git sync-uri: git://anongit.gentoo.org/user/klondike.git masters: gentoo priority: 50 proaudio location: /var/lib/layman/proaudio sync-type: svn sync-uri: svn://svn.tuxfamily.org/svnroot/proaudio/proaudio/trunk/overlays/proaudio masters: gentoo priority: 50 science location: /var/lib/layman/science sync-type: git sync-uri: git://anongit.gentoo.org/proj/sci.git masters: gentoo priority: 50 steam-overlay location: /var/lib/layman/steam-overlay sync-type: git sync-uri: git://github.com/anyc/steam-overlay.git masters: gentoo priority: 50 local location: /usr/local/portage masters: gentoo priority: 100 Installed sets: @system ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA Google-TOS ut2003 PUEL Q3AEULA Introversion dlj-1.1 skype-eula cadsoft AdobeFlash-10.1 AdobeFlash-10 AdobeFlash-9.0.31.0 googleearth google-talkplugin Oracle-BCLA-JavaSE AdobeFlash-10.3 AdobeFlash-11.x skype-4.0.0.7-copyright google-chrome NVIDIA-CUDA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/themes/oxygen-gtk/gtk-2.0" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.gg3.net/ ftp://ftp.iij.ad.jp/pub/linux/gentoo/ ftp://ftp.jaist.ac.jp/pub/Linux/Gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--timeout=180" 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 --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="7zip X a52 aac aalib acl acpi addbookmarks additions addressbook akode alias alsa amarok amd64 amd64codecs anthy apache2 apng artswrappersuid asf aspell audiofile autoreplace avahi avi bash-completion berkdb bitmap-fonts bittorrent-external blender-game bluetooth bonjour branding bzip2 bzlib cairo calendar canna cdda cddb cdio cdparanoia cdr cgi chm cjk clamav cli connectionstatus consolekit contactnotes cracklib crypt css ctype cups curl cvs cxx daap dba dbus declarative device-mapper dillo djvu dlloader dri dts dv dvb dvd dvdr dvdread embedded enca encode equalizer examples exif faad fam fasttrack fbcondecor fcitx ffmpeg firefox3 flac flash fluidsynth font-server foomaticdb frei0r ftdi ftp g3dvl gallium gcrypt gd gdbm gif git glamor glitz gmp gnutella go gphoto2 gpm gs gsm gtk gtk2 h323 hackrf hardened hash highlight history httpd iconv icu id3tag ieee1394 imagemagick imap immqt-bc inifile inkjar innodb ipv6 irc ithreads jabber jack jadetex java java6 javascript jingle jit joystick jpeg jpeg2k justify kate kde kipi kpathsea kqemu kvm ladspa laptop lcms lensfun libass libnotify libsamplerate libtiger libv4l2 lisamplerate llvm lm_sensors logrotate lv2 lvm lzma m17n-lib mad maildir matroska mbox mbrola mdnsresponder-compat melt midi mikmod mjpeg mmx mmxext mng mod modplug modules moodbar moviepack moviesounds mozbranding mozcalendar mozdevelop mozsvg mozxmlterm mp3 mp4 mpeg mpeg4 mplayer msn mtp multilib musicbrainz mysql mysqli mythtv ncurses network networkmanager nfs nls nodrm nowlistening nptl nptlonly ntp numa nvidia offensive ogg oggvorbis openal opencl openct openexr opengl openmp opus oscar otr pam pango parted pax_kernel pcap pcre pcsc-lite pdf perl phonon pie plasma plotutils png policykit posix postproc ppds prime projectm protutils pulseaudio pyqt4 python qemu qemu-ifup qt qt3support qt4 qt5 quicktime rar readline realtime resolvconf rt2500pci rtc rtlsdr rtsp samba scanner sdk sdl seccomp session shout skins slang sna sndfile soap sockets sox speex spell sql sqlite srt sse sse2 ssl ssp startup-notification statistics stream subtitles subversion svg swat system-libvncserver taglib tcpd test-programs texteffect tga theora threads tiff tk transcode transmitter truetype truetype-fonts twolame type1-fonts udev udisks unicode upnp upower urandom usb utempter utf8 uxa v4l v4l2 video vim-syntax virt-network visualization vlm vorbis vpx wavpack webkit webpresence wifi wininst wmf wxwidgets wxwindows x264 xattr xcb xcomposite xforms xinerama xml xmlreader xmlrpc xmlwriter xmp xprint xpsmall xscreensaver xsl xtpax xulrunner xv xvid yahoo yv12 zeroconf zip zlib zsh-completion zvbi" ABI_X86="64" ALSA_CARDS="usb-audio virmidi loopback hda-intel" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias slotmem_shm unixd" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 avx sse4_1 sse4_2" ELIBC="glibc" FOO2ZJS_DEVICES="sa315" 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" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="evdev keyboard mouse wacom synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US es es_ES ja ja_JP" LIRC_DEVICES="serial devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 arm armeb ppc ppc64 mips mipsel s390x aarch64" QEMU_USER_TARGETS="x86_64 s390x arm armeb mips mipsel ppc ppc64 ppc64abi32 aarch64" RUBY_TARGETS="ruby23 ruby22 ruby21 ruby20" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="intel" 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" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
It's not a missing eclass, it's because cmake-utils.eclass has some internal functions renamed. Changing _check_build_dir into _cmake_check_build_dir makes the ebuild work again.
I've fixed the function call for now, but we need to find a proper fix because _cmake_check_build_dir is a private function and shouldn't be called in ebuilds. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c8c406e43ced399e8bdea50766d7722e6216ee8
Looks like _cmake_check_build_dir isn't in use any more, so this can be closed.