GNOME Bugzilla – Bug 647862
GLib 2.29.2 fails to cross-compile
Last modified: 2018-05-24 13:02:43 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).
*** This bug has been marked as a duplicate of bug 646309 ***
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.
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!!!!!!
-- 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.