When ragel-6.7-r1 is cross-compiled, it fails in configure phase because AC_CHECK_FILES used in configure.in does not work with cross-compiling. A fix is to replace AC_CHECK_FILES with 'test -r'. Note that AC_CHECK_FILES is meant to check for the presence of a host file as opposed to a build file in the source / build directory. ragel's configure.in uses it to check the presence of DIST file in the source directory. Reproducible: Always Steps to Reproduce: 1. Run 'emerge-arm-generic ragel' inside Chrome OS chroot 2. 3. Actual Results: emerge fails in configure.phase. Expected Results: emerge succeeds and ragel is built for arm-generic. I only tried it to build ragel for Chrome OS, but it should happen whenever ragel is cross-compiled because AC_CHECK_FILES bails out whenever it's invoked by autoconf for cross-compilation. See http://lists.gnu.org/archive/html/autoconf/2000-10/msg00018.html about AC_CHECK_FILES. You'll find a suggested patch. (I'll attach this patch as well). https://gerrit.chromium.org/gerrit/#/c/59299/3/dev-util/ragel/files/ragel-6.7-config.patch
Created attachment 351496 [details, diff] suggested patch This replaces AC_CHECK_FILES with 'test -r'. I also tried adding AC_CHECK_BUILD_FILE to m4 directory and I also tried a more sophisticated method, but it didn't work well. I copied the definition of AC_CHECK_FILE from /usr/share/autoconf/autoconf/general.m4 and removed the check for cross-compile, put it in m4/check-file.m4, replaced AC_CHECK_FILE with AC_CHECK_BUILD_FILE in configure.in and ran 'autoreconf -Im4 --force'. However, for a mysterious reason, "aclocal -I m4" (actually m4 processor) went into a seemingly infinite loop. The same happened when I tried with 'AT_M4DIR="m4" eautoreconf' in ebuild. I believe just using 'test -r' is sufficient in this case.
Created attachment 351498 [details] output of emerge --info =dev-util/ragel-6.7-r2 emerge -pqv =dev-util/ragel-6.7-r2 has the following: [ebuild N ] dev-util/ragel-6.7-r2 USE="-vim-syntax" BTW, don't be confused by 'r2' instead of 'r1'. I meant to make a local change in r2, but 'emerge ragel' was run without any change. r2 is exactly the same as r1.
Created attachment 351500 [details] ragel-6.7-r2 build log
I also reported this to the ragel's developer by email.
AC_CHECK_FILES($srcdir/DIST) fails with the following error when cross-compiling : checking for ./DIST... configure: error: cannot check for file existence when cross compiling
(In reply to jshin from comment #1) i can take care of merging if people are ok with it
(In reply to SpanKY from comment #6) > (In reply to jshin from comment #1) > > i can take care of merging if people are ok with it That'd be great (well, I'm nobody here :-)). BTW, I haven't heard back from the upstream developer of ragel.
should be all set now in the tree; thanks for the report! Commit message: Fix by Jungshik Shin for cross-compiling http://sources.gentoo.org/dev-util/ragel/files/ragel-6.7-cross-compile.patch?rev=1.1 http://sources.gentoo.org/dev-util/ragel/ragel-6.7-r1.ebuild?r1=1.12&r2=1.13 http://sources.gentoo.org/dev-util/ragel/ragel-6.8.ebuild?r1=1.1&r2=1.2