dev-scheme/guile-1.8.8-r1 checking whether pthread_attr_getstack works for the main thread... configure: error: in `/var/tmp/portage/dev-scheme/guile-1.8.8-r1/work/guile-1.8.8': configure: error: cannot run test program while cross compiling See `config.log' for more details Reproducible: Always
1) Please post your `emerge --info' output in a comment. 2) Please attach the entire build log to this bug report. 3) Please attach the config.log to this bug report.
1) Relevant: USE="threads" 2) Relevant: checking whether pthread_attr_getstack works for the main thread... configure: error: in `/var/tmp/portage/dev-scheme/guile-1.8.8-r1/work/guile-1.8.8': configure: error: cannot run test program while cross compiling See `config.log' for more details 3) Irrelevant Relevant: configure.in:1374: AC_RUN_IFELSE([AC_LANG_SOURCE([[ ... Skip 25 lines ]])], [works=yes AC_DEFINE(PTHREAD_ATTR_GETSTACK_WORKS, [1], [Define when pthread_att_get_stack works for the main thread])], [works=no], []) This is only run if guile is built with pthreads support. The fourth argument is [] which is the empty string. If the fourth argument of AC_RUN_IFELSE is empty it's replaced with [AC_MSG_FAILURE([cannot run test program while cross compiling])]. If cross-compiling, all AC_RUN_IFELSE evaluate their fourth argument, which in this case is [AC_MSG_FAILURE([cannot run test program while cross compiling])]. Therefore dev-scheme/guile-1.8.8-r1 does not cross-compile with USE="threads". Possible fix: Set the fourth argument of AC_RUN_IFELSE on line 1374 to something other than [], such as the second argument. --- a/configure.in +++ b/configure.in @@ -1400,7 +1400,8 @@ [works=yes AC_DEFINE(PTHREAD_ATTR_GETSTACK_WORKS, [1], [Define when pthread_att_get_stack works for the main thread])], [works=no], -[]) +[works=yes +AC_DEFINE(PTHREAD_ATTR_GETSTACK_WORKS, [1], [Define when pthread_att_get_stack works for the main thread])]) CFLAGS="$old_CFLAGS" AC_MSG_RESULT($works)
The patch in Comment 2 fixes the build for me when cross-compiling on x86_64-pc-linux-gnu for armv6j-hardfloat-linux-gnueabi.