Created attachment 380550 [details, diff] fix fatal cross-compile issue Actual error on cross compile is: make V=1 -j1 cd ./util ; make subst make[1]: Entering directory `/usr/powerpc-unknown-linux-gnu/tmp/portage/sys-libs/e2fsprogs-libs-1.42.10/work/e2fsprogs-libs-1.42.10-abi_ppc_32.ppc/util' echo "/* fake dirpaths.h for config.h */" > dirpaths.h gcc -c /usr/powerpc-unknown-linux-gnu/tmp/portage/sys-libs/e2fsprogs-libs-1.42.10/work/e2fsprogs-libs-1.42.10/util/subst.c -o subst.o /usr/powerpc-unknown-linux-gnu/tmp/portage/sys-libs/e2fsprogs-libs-1.42.10/work/e2fsprogs-libs-1.42.10/util/subst.c:8:20: fatal error: config.h: No such file or directory compilation terminated. make[1]: *** [subst.o] Error 1 (note, it's a PITA to see this when V=1 is unset on emake!) The reason for the error is that configure.in set BUILD_CFLAGS="... $INCLUDES .." , which contains the path to config.h , but this is only set when 'test cross-compiler = no'. Otherwise, BUILD_CFLAGS is set to nothing. The following patch against the tree fixes the issue. Note it also includes setting CC and BUILD_CC properly in the ebuild (BUILD_CC is just 'gcc' as shown above, instead of the CHOST-CC), and calling emake with V=1 to drop the quiet output.
10 Jul 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org> +files/e2fsprogs-libs-1.42.10-fix-build-cflags.patch, e2fsprogs-libs-1.42.10.ebuild: fixed cross-compiling, bug 516854, with Poly-C's blessing
*** Bug 516894 has been marked as a duplicate of this bug. ***
Commit message: Add missing documentation on build-cflags patch http://sources.gentoo.org/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.42.10.ebuild?r1=1.15&r2=1.16 http://sources.gentoo.org/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.42.12.ebuild?r1=1.9&r2=1.10 http://sources.gentoo.org/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.42.13.ebuild?r1=1.1&r2=1.2 http://sources.gentoo.org/sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.42.10-fix-build-cflags.patch?r1=1.1&r2=1.2 http://sources.gentoo.org/sys-libs/e2fsprogs-libs/files/e2fsprogs-libs-1.42.13-fix-build-cflags.patch?r1=1.1&r2=1.2
Commit message: Add missing documentation on build-cflags patch http://sources.gentoo.org/sys-fs/e2fsprogs/e2fsprogs-1.42.10.ebuild?r1=1.23&r2=1.24 http://sources.gentoo.org/sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild?r1=1.10&r2=1.11 http://sources.gentoo.org/sys-fs/e2fsprogs/e2fsprogs-1.42.13.ebuild?r1=1.1&r2=1.2 http://sources.gentoo.org/sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-fix-build-cflags.patch?r1=1.1&r2=1.2 http://sources.gentoo.org/sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch?r1=1.1&r2=1.2