GNOME Bugzilla – Bug 665607
./configure is there for fiddling with cross-compile environment but fails due to qsort_r check. And I want a pony
Last modified: 2011-12-06 12:54:04 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.
Created attachment 202845 [details] [review] patch to fix #665607
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.
Review of attachment 202845 [details] [review]: See comment above.
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.
The following fix has been pushed: 6bb8fda Make the qsort_r check cross-compile friendly
Created attachment 202910 [details] [review] Make the qsort_r check cross-compile friendly Pointed out by Daniel Mack.
Thanks a lot.