After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 511750 - Configure of prereleases 15.2-15.4 fail in OpenEmbedded MIPSEL Crosscompiler
Configure of prereleases 15.2-15.4 fail in OpenEmbedded MIPSEL Crosscompiler
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-24 10:35 UTC by Andreas Frisch
Modified: 2008-01-24 23:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
config.log of the 0.10.15 build, which works (101.85 KB, text/plain)
2008-01-24 10:39 UTC, Andreas Frisch
  Details
config.log of the failing 0.10.15.4 build (95.17 KB, text/plain)
2008-01-24 10:40 UTC, Andreas Frisch
  Details
BitBake-Package for OpenEmbedded (982 bytes, text/plain)
2008-01-24 10:40 UTC, Andreas Frisch
  Details
use AC_TRY_COMPILE instead of AC_TRY_RUN (2.09 KB, patch)
2008-01-24 13:22 UTC, Tim-Philipp Müller
none Details | Review
same as before, just get the text for the second #error right (2.10 KB, patch)
2008-01-24 16:17 UTC, Tim-Philipp Müller
committed Details | Review

Description Andreas Frisch 2008-01-24 10:35:08 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
Comment 1 Andreas Frisch 2008-01-24 10:39:32 UTC
Created attachment 103622 [details]
config.log of the 0.10.15 build, which works
Comment 2 Andreas Frisch 2008-01-24 10:40:09 UTC
Created attachment 103623 [details]
config.log of the failing 0.10.15.4 build
Comment 3 Andreas Frisch 2008-01-24 10:40:37 UTC
Created attachment 103624 [details]
BitBake-Package for OpenEmbedded
Comment 4 Jan Schmidt 2008-01-24 12:59:42 UTC
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
Comment 5 Tim-Philipp Müller 2008-01-24 13:06:24 UTC
> 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).


Comment 6 Tim-Philipp Müller 2008-01-24 13:22:49 UTC
Created attachment 103635 [details] [review]
use AC_TRY_COMPILE instead of AC_TRY_RUN

Something like this (note: only did minimal testing).
Comment 7 Jan Schmidt 2008-01-24 14:24:04 UTC
ooh, cunning - I like it
Comment 8 Tim-Philipp Müller 2008-01-24 16:17:31 UTC
Created attachment 103642 [details] [review]
same as before, just get the text for the second #error right
Comment 9 Jan Schmidt 2008-01-24 19:27:19 UTC
Brilliant, works for me.

Andreas: If you can confirm that this patch fixes things for you on openembedded, I'll mark it for committing.
Comment 10 Andreas Frisch 2008-01-24 21:54:50 UTC
Works perfectly! Thanks for the fast response
Comment 11 Jan Schmidt 2008-01-24 22:09:07 UTC
Stand back, Tim-Philipp Müller knows regular expressions :)
Comment 12 Tim-Philipp Müller 2008-01-24 23:36:47 UTC
 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.