GNOME Bugzilla – Bug 511750
Configure of prereleases 15.2-15.4 fail in OpenEmbedded MIPSEL Crosscompiler
Last modified: 2008-01-24 23:36:47 UTC
Created an Openembedded Bitbake-Package for 0.10.15.2 and 0.10.15.4 prereleases of gstreamer core. They fail in the configure step. It appears that enhanced checking in the configure.ac added in release 1.517 (compared to 0.10.15 release, where it worked) might have caused this. http://webcvs.freedesktop.org/gstreamer/gstreamer/configure.ac?r1=1.515&r2=1.517 excerpt from config.log: configure:28182: checking for clock_gettime configure:28239: ccache mipsel-linux-gcc -o conftest -I/media/Devel/7025/build/tmp/staging/mipsel-linux/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -I/media/Devel/7025/build/tmp/staging/mipsel-linux/include -L/media/Devel/7025/build/tmp/staging/mipsel-linux/lib -Wl,-rpath-link,/media/Devel/7025/build/tmp/staging/mipsel-linux/lib -Wl,-O1 conftest.c >&5 /tmp/ccO0SFzj.o: In function `main': conftest.c:(.text+0x10): undefined reference to `clock_gettime' /tmp/ccO0SFzj.o:(.data.rel+0x0): undefined reference to `clock_gettime' collect2: ld returned 1 exit status configure:28245: $? = 1 configure: failed program was: | /* confdefs.h. */ there's another two undefined references (shl_load and dlopen), but those two were also there in 0.10.15 and they're not causing it to fail
Created attachment 103622 [details] config.log of the 0.10.15 build, which works
Created attachment 103623 [details] config.log of the failing 0.10.15.4 build
Created attachment 103624 [details] BitBake-Package for OpenEmbedded
It looks to me like the actual error is this: configure:28358: checking for posix timers configure:28365: error: cannot run test program while cross compiling ie, that openembedded can't handle the AC_TRY_RUN macros being used to check for POSIX_TIMER and MONOTONIC_CLOCK #defines. In the long run, a better fix is probably to put these tests in the source code and switch things at compile time, but I'm reluctant to tackle that in the pre-release. A simpler quick-fix is to add flags to configure to avoid the tests, like --have-posix-timers=yes/no/auto --have-monotonic-clock=yes/no/auto
> ie, that openembedded can't handle the AC_TRY_RUN macros being used to check > for POSIX_TIMER and MONOTONIC_CLOCK #defines. > > In the long run, a better fix is probably to put these tests in the source code > and switch things at compile time, but I'm reluctant to tackle that in the > pre-release. > > A simpler quick-fix is to add flags to configure to avoid the tests, like > --have-posix-timers=yes/no/auto > --have-monotonic-clock=yes/no/auto Alternatively, it should be fairly straight-forward to change the AC_TRY_RUN to AC_TRY_COMPILE (like #ifdef bla && bla > 0 ... #else #error "nope" #endif).
Created attachment 103635 [details] [review] use AC_TRY_COMPILE instead of AC_TRY_RUN Something like this (note: only did minimal testing).
ooh, cunning - I like it
Created attachment 103642 [details] [review] same as before, just get the text for the second #error right
Brilliant, works for me. Andreas: If you can confirm that this patch fixes things for you on openembedded, I'll mark it for committing.
Works perfectly! Thanks for the fast response
Stand back, Tim-Philipp Müller knows regular expressions :)
2008-01-24 Tim-Philipp Müller <tim at centricular dot net> * configure.ac: Use AC_TRY_COMPILE instead of AC_TRY_RUN to check for _POSIX_TIMER, _POSIX_MONOTONIC_CLOCK, etc. Makes configure not fail when trying to crosscompile on OpenEmbedded (#511750). Not really sure where the HAVE_UNISTD_H thing is supposed to come from, but I'm going to treat that as a don't-fix-it-if-it-ain't-broken thing for now.