This bug is present while cross compiling for ARM. The bug can be replicated by simply emerging x11-apps/xinit-1.0.8-r10 The bug presents the following error resulting in a failure to emerge: ///////////////////////////////////////////////////////////////////////////////////// DXINITDIR=/etc/X11/xinit -DXRDB=xrdb -DXMODMAP=xmodmap -DTWM=twm -DXCLOCK=xclock -DXTERM=xterm -DXSERVER=/usr/bin/X -DXAUTH=xauth -DXINIT=xinit -DLIBDIR=/usr/lib -DSHELL_CMD=/bin/sh -DHAS_COOKIE_MAKER -DMK_COOKIE="/usr/bin/mcookie" -D__libexecdir__="/usr/libexec" -D__bindir__="/usr/bin" < startx.cpp | /bin/sed -e '/^# *[0-9][0-9]* *.*$/d' -e '/^#line *[0-9][0-9]* *.*$/d' -e '/^[ ]*XCOMM$/s/XCOMM/#/' -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' -e '/^[ ]*XHASH/s/XHASH/#/' -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' -e '/\@\@$/s/\@\@$/\\/' > startx /bin/sh: -DXRDB=xrdb: command not found make[1]: *** No rule to make target `startx.@APP_MAN_SUFFIX@', needed by `all-am'. Stop. make[1]: Leaving directory `/usr/armv6l-softfloat-linux-gnueabi/tmp/portage/x11-apps/xinit-1.0.8-r10/work/xinit-1.0.8' make: *** [all] Error 2 * * ERROR: x11-apps/xinit-1.0.8-r10 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3305: Called x-modular_src_compile * environment, line 4110: Called x-modular_src_make * environment, line 4149: Called die * The specific snippet of code: * emake || die "emake failed" * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/usr/armv6l-softfloat-linux-gnueabi/tmp/portage/x11-apps/xinit-1.0.8-r10/temp/build.log'. * The ebuild environment file is located at '/usr/armv6l-softfloat-linux-gnueabi/tmp/portage/x11-apps/xinit-1.0.8-r10/temp/environment'. * ///////////////////////////////////////////////////////////////////////////////////// Further investigation of this issue shows that the Makefile has the following lines: ///////////////////////////////////////////////////////////////////////////////////// .cpp: $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ ///////////////////////////////////////////////////////////////////////////////////// When trying to locate the contents of the variables RAWCPP and RAWCPPFLAGS none were found, these variables are undeclared. This results in the error above as CPP_FILES_FLAG contents are valid as well as $< and CPP_SED_MAJIC. Causing the Makefile to attempt to execute the first part of CPP_FILES_FLAGS that results in the error "/bin/sh: -DXRDB=xrdb: command not found" As per http://bugs.gentoo.org/show_bug.cgi?id=134789#c2 (Comment #2 From Donnie Berkholz 2006-05-29 12:32:27 0000) Setting RAWCPP to /usr/bin/cpp does not resolve the issue but results in a target failure ///////////////////////////////////////////////////////////////////////////////////// make all-am make[1]: Entering directory `/usr/armv6l-softfloat-linux-gnueabi/tmp/portage/x11-apps/xinit-1.0.8-r10/work/xinit-1.0.8' armv6l-softfloat-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I/usr/armv6l-softfloat-linux-gnueabi/usr/include -DXINITDIR=\"/etc/X11/xinit\" -DBINDIR=\"/usr/bin\" -Os -pipe -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=softfp -fomit-frame-pointer -I/usr/armv6l-softfloat-linux-gnueabi/usr/include/ -I/usr/armv6l-softfloat-linux-gnueabi/include/ -ftree-vectorize -MT xinit-xinit.o -MD -MP -MF .deps/xinit-xinit.Tpo -c -o xinit-xinit.o `test -f 'xinit.c' || echo './'`xinit.c mv -f .deps/xinit-xinit.Tpo .deps/xinit-xinit.Po armv6l-softfloat-linux-gnueabi-gcc -I/usr/armv6l-softfloat-linux-gnueabi/usr/include -DXINITDIR=\"/etc/X11/xinit\" -DBINDIR=\"/usr/bin\" -Os -pipe -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=softfp -fomit-frame-pointer -I/usr/armv6l-softfloat-linux-gnueabi/usr/include/ -I/usr/armv6l-softfloat-linux-gnueabi/include/ -ftree-vectorize -L/usr/armv6l-softfloat-linux-gnueabi/lib -L/usr/armv6l-softfloat-linux-gnueabi/usr/lib -o xinit xinit-xinit.o -L/usr/armv6l-softfloat-linux-gnueabi/usr/lib -lX11 /usr/bin/cpp -DXINITDIR=/etc/X11/xinit -DXRDB=xrdb -DXMODMAP=xmodmap -DTWM=twm -DXCLOCK=xclock -DXTERM=xterm -DXSERVER=/usr/bin/X -DXAUTH=xauth -DXINIT=xinit -DLIBDIR=/usr/lib -DSHELL_CMD=/bin/sh -DHAS_COOKIE_MAKER -DMK_COOKIE="/usr/bin/mcookie" -D__libexecdir__="/usr/libexec" -D__bindir__="/usr/bin" < startx.cpp | /bin/sed -e '/^# *[0-9][0-9]* *.*$/d' -e '/^#line *[0-9][0-9]* *.*$/d' -e '/^[ ]*XCOMM$/s/XCOMM/#/' -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' -e '/^[ ]*XHASH/s/XHASH/#/' -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' -e '/\@\@$/s/\@\@$/\\/' > startx make[1]: *** No rule to make target `startx.@APP_MAN_SUFFIX@', needed by `all-am'. Stop. make[1]: Leaving directory `/usr/armv6l-softfloat-linux-gnueabi/tmp/portage/x11-apps/xinit-1.0.8-r10/work/xinit-1.0.8' make: *** [all] Error 2 ///////////////////////////////////////////////////////////////////////////////////// This bug is not considered to be a duplicate of http://bugs.gentoo.org/show_bug.cgi?id=134789 due to the different versions as well as the proposed solutions not working Build environment: armv6l-softfloat-linux-gnueabi-emerge --info ///////////////////////////////////////////////////////////////////////////////////// Portage 2.1.6.13 (!/usr/local/portage/layman/gentoo-arm/profiles/default/linux/arm/10.0/beagle/minimal, gcc-4.4.1, glibc-2.9_p20081201-r3, 2.6.23-gentoo-r3 i686) ================================================================= System uname: Linux-2.6.23-gentoo-r3-i686-Intel-R-_Core-TM-2_Quad_CPU____Q6600__@_2.40GHz-with-gentoo-1.12.9 Timestamp of tree: Wed, 21 Oct 2009 05:45:02 +0000 ACCEPT_KEYWORDS="arm ~arm" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -pipe -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=softfp -fomit-frame-pointer -I/usr/armv6l-softfloat-linux-gnueabi/usr/include/ -I/usr/armv6l-softfloat-linux-gnueabi/include/ -ftree-vectorize" CHOST="armv6l-softfloat-linux-gnueabi" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-Os -pipe -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=softfp -fomit-frame-pointer -I/usr/armv6l-softfloat-linux-gnueabi/usr/include/ -I/usr/armv6l-softfloat-linux-gnueabi/include/ -ftree-vectorize" DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg distlocks fixpackages nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo" LDFLAGS="-L/usr/armv6l-softfloat-linux-gnueabi/lib -L/usr/armv6l-softfloat-linux-gnueabi/usr/lib" MAKEOPTS="-j1" PKGDIR="/usr/armv6l-softfloat-linux-gnueabi/packages/" PORTAGE_CONFIGROOT="/usr/armv6l-softfloat-linux-gnueabi/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/usr/armv6l-softfloat-linux-gnueabi/tmp/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="alsa aotuv arm bindist bzip2 compat cups dbus fbcondecor fbdev gif gpm gstreamer jpeg justify kdrive make-symlinks minimal mng modules multicall nonfsv4 nptl nptlonly pda png sdl sysfs threads threadsafe truetype unicode xorg xsettings zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse touchscreen" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev dummy" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ///////////////////////////////////////////////////////////////////////////////////// Cross compile make.conf ///////////////////////////////////////////////////////////////////////////////////// CHOST=armv6l-softfloat-linux-gnueabi CBUILD=i686-pc-linux-gnu ARCH=arm HOSTCC=i686-pc-linux-gnu-gcc E_MACHINE=EM_ARM ROOT=/usr/${CHOST}/ ACCEPT_KEYWORDS="arm ~arm" USE="${ARCH} zlib bindist make-symlinks minimal" #MARCH_TUNE="-march=armv4t -mtune=arm9tdmi" #arm-softfloat-linux-uclibc #MARCH_TUNE="-march=armv5t -mtune=xscale" #armv5teb-softfloat-linux-gnueabi MARCH_TUNE="-march=armv6 -mtune=arm1176jzf-s -mfloat-abi=softfp" CFLAGS="-Os -pipe ${MARCH_TUNE} -fomit-frame-pointer -I${ROOT}usr/include/ -I${ROOT}include/ -ftree-vectorize" CXXFLAGS="${CFLAGS}" LDFLAGS="-L${ROOT}lib -L${ROOT}usr/lib" FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc" # Be sure we dont overwrite pkgs from another repo.. PKGDIR=${ROOT}packages/ PORTAGE_TMPDIR=${ROOT}tmp/ ELIBC="glibc" PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/" #PORTDIR_OVERLAY="/usr/portage/local/" LIBDIR_${ARCH}="lib" LIBDIR_amd64=lib64 UCLIBC_CPU_DEFAULT="GENERIC_ARM" MAKEOPTS=-j1 PORTDIR_OVERLAY="/usr/local/portage" GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo" ///////////////////////////////////////////////////////////////////////////////////// GNU GCC Version: armv6l-softfloat-linux-gnueabi-gcc -v ///////////////////////////////////////////////////////////////////////////////////// Using built-in specs. Target: armv6l-softfloat-linux-gnueabi Configured with: /var/tmp/cross/armv6l-softfloat-linux-gnueabi/portage/cross-armv6l-softfloat-linux-gnueabi/gcc-4.4.1/work/gcc-4.4.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/armv6l-softfloat-linux-gnueabi/gcc-bin/4.4.1 --includedir=/usr/lib/gcc/armv6l-softfloat-linux-gnueabi/4.4.1/include --datadir=/usr/share/gcc-data/armv6l-softfloat-linux-gnueabi/4.4.1 --mandir=/usr/share/gcc-data/armv6l-softfloat-linux-gnueabi/4.4.1/man --infodir=/usr/share/gcc-data/armv6l-softfloat-linux-gnueabi/4.4.1/info --with-gxx-include-dir=/usr/lib/gcc/armv6l-softfloat-linux-gnueabi/4.4.1/include/g++-v4 --host=i686-pc-linux-gnu --target=armv6l-softfloat-linux-gnueabi --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --with-float=soft --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-multilib --disable-libmudflap --disable-libssp --disable-libgomp --enable-cld --with-python-dir=/share/gcc-data/armv6l-softfloat-linux-gnueabi/4.4.1/python --disable-libgcj --enable-languages=c,c++,fortran --with-sysroot=/usr/armv6l-softfloat-linux-gnueabi --disable-bootstrap --disable-libgomp --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.1 p1.0' Thread model: posix gcc version 4.4.1 (Gentoo 4.4.1 p1.0) /////////////////////////////////////////////////////////////////////////////////////
Okay so it seems this issue is caused because the macro required to be executed /usr/share/aclocal/xorg-macros.m4 has to exist on the host system too. On my system i had installed the macro (x11-misc/util-macros) to /usr/armv6l-softfloat-linux-gnueabi/usr/share/aclocal/xorg-macros.m4 i then copied over this file to /usr/share/aclocal and was able to cross compile this package successfully.
Then it's a portage bug because the dep is correctly defined by the eclass in DEPEND. Thanks
Did you use the --root-deps emerge option? If so, then this is normal. When the --root-deps option is enabled, dependencies are never installed to the host. That's how it's designed to work. Don't use it if you want dependencies installed to the host.
(In reply to comment #3) > Did you use the --root-deps emerge option? If so, then this is normal. When > the --root-deps option is enabled, dependencies are never installed to the > host. That's how it's designed to work. Don't use it if you want > dependencies installed to the host. I'm assuming that you used --root-deps.