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 647862 - GLib 2.29.2 fails to cross-compile
GLib 2.29.2 fails to cross-compile
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: build
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-04-15 13:12 UTC by Maarten Bosmans
Modified: 2018-05-24 13:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.52 KB, patch)
2011-04-15 13:12 UTC, Maarten Bosmans
none Details | Review

Description Maarten Bosmans 2011-04-15 13:12:07 UTC
Created attachment 186019 [details] [review]
proposed patch

Error in configure:
checking for qsort_r... configure: error: in `/usr/src/packages/BUILD/glib-2.29.2':
configure: error: cannot run test program while cross compiling

The attached patch adds a check for the qsort_r function. This solves it for my case (win32 cross-compiling using mingw) because qsort_r is not available. In the case of cross-compiling with a host platform that has qsort_r available the test will still fail though. Probably the best thing would be to also add a check for cross-compilation and assume qsort_r just works (i.e. no arguments reversed).
Comment 1 Matthias Clasen 2011-04-27 03:42:58 UTC

*** This bug has been marked as a duplicate of bug 646309 ***
Comment 2 Maarten Bosmans 2011-04-27 07:32:39 UTC
The solution of bug 646309 is not really a fix, but more of a workaround, as you need to set a cache variable. How about combining that method with the detection suggested in the attached patch, or the patch from bug 646737? That way it "just works" for cross-compiling.
Comment 3 Robin 2013-05-26 07:02:35 UTC
Hi all,
    I compile glib by mips cross compile tool.Meeting following problems:

creating libtool
checking for extra flags to get ANSI library prototypes... configure: error: cannot run test program while cross compiling



    My configure method is:
    ./configure --prefix=$PWD/_install --cache-file=mips-linux-gnu.cache --target=mips-linux --host=mips-linux  "CC=mips-linux-gnu-gcc -EL" "LDFLAGS=-EL" 


    Some one can give me some suggest??

    Thanks!!!!!!
Comment 4 GNOME Infrastructure Team 2018-05-24 13:02:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/406.