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 665607 - ./configure is there for fiddling with cross-compile environment but fails due to qsort_r check. And I want a pony
./configure is there for fiddling with cross-compile environment but fails du...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-12-05 16:37 UTC by Daniel Mack
Modified: 2011-12-06 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix #665607 (1.29 KB, patch)
2011-12-05 16:41 UTC, Daniel Mack
rejected Details | Review
Make the qsort_r check cross-compile friendly (808 bytes, patch)
2011-12-06 12:45 UTC, Matthias Clasen
committed Details | Review

Description Daniel Mack 2011-12-05 16:37:21 UTC
I', getting the following configure error when trying to cross-build glib2:

      checking for qsort_r... yes
      checking if qsort_r uses glibc compatible argument order... configure:
      error: in `/home/daniel/src/glib':
      configure: error: cannot run test program while cross compiling
      See `config.log' for more details

Attached is a patch to fix this.
Comment 1 Daniel Mack 2011-12-05 16:41:40 UTC
Created attachment 202845 [details] [review]
patch to fix #665607
Comment 2 Colin Walters 2011-12-05 18:00:02 UTC
Review of attachment 202845 [details] [review]:

Note that the correct way to do cross builds is to use "site files" to tell configure about the platform.  You should checkout http://www.yoctoproject.org - they know what they're doing with respect to cross builds, and this exact issue was just fixed there.

It's wrong to default this to yes if cross compiling, since it would break BSD cross builds.

You could default it to no, but really - use site files.  And at a higher level, replacing whatever build system you're using with Yocto would probably save you a lot of time.
Comment 3 Colin Walters 2011-12-05 18:01:51 UTC
Review of attachment 202845 [details] [review]:

See comment above.
Comment 4 Daniel Mack 2011-12-05 18:09:30 UTC
I'm using buildroot, which works just great for everything I'm doing, and this bug hit me there. Also note that this breakage is new: the version buildroot currently uses is 2.28.8 which works fine, but I needed to update it for recently added GIO functionality.

WRT the default, I would be fine in changing it to =no, just to have a good fallback. Otherwise, we have to carry this very patch in buildroot from now on, which just increases the maintainance effort.
Comment 5 Matthias Clasen 2011-12-06 12:45:05 UTC
The following fix has been pushed:
6bb8fda Make the qsort_r check cross-compile friendly
Comment 6 Matthias Clasen 2011-12-06 12:45:08 UTC
Created attachment 202910 [details] [review]
Make the qsort_r check cross-compile friendly

Pointed out by Daniel Mack.
Comment 7 Daniel Mack 2011-12-06 12:54:04 UTC
Thanks a lot.