Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 268647

Summary: dev-libs/glib-2.18.4-r1: fix uclibc cross-compilation
Product: Gentoo Linux Reporter: Bertrand Jacquin <bertrand>
Component: [OLD] DevelopmentAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: bertrand, bugzie
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.gnome.org/show_bug.cgi?id=581354
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Makefile.am fix
Makefile.in fix
dev-libs/glib-2.18.4-r1.ebuild.diff

Description Bertrand Jacquin 2009-05-04 18:40:05 UTC
glib doesn't build glib/test/strfuncs.c while cross-compilated with uclibc :

i586-geode-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../.. -g -I../.. -I../../glib -DG_DISABLE_CAST_CHECKS  -DG_DISABLE_SINGLE_INCLUDES -pthread  -Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-uclibc/usr/include/ -I/usr/i586-geode-linux-uclibc/include/ -Wall -MT strfuncs.o -MD -MP -MF .deps/strfuncs.Tpo -c -o strfuncs.o strfuncs.c
strfuncs.c: In function `check_strtod_string':
strfuncs.c:877: warning: implicit declaration of function `isnan'
mv -f .deps/strfuncs.Tpo .deps/strfuncs.Po
/bin/sh ../../libtool --tag=CC   --mode=link i586-geode-linux-uclibc-gcc  -Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-uclibc/usr/include/ -I/usr/i586-geode-linux-uclibc/include/ -Wall   -o strfuncs strfuncs.o ../../glib/libglib-2.0.la  -lm -lintl  
libtool: link: i586-geode-linux-uclibc-gcc -Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-uclibc/usr/include/ -I/usr/i586-geode-linux-uclibc/include/ -Wall -o .libs/strfuncs strfuncs.o  ../../glib/.libs/libglib-2.0.so -lm /usr/i586-geode-linux-uclibc/usr/lib/libintl.so -liconv -lc -Wl,-rpath -Wl,/usr/i586-geode-linux-uclibc/usr/lib
strfuncs.o: In function `check_strtod_string':
/usr/i586-geode-linux-uclibc/tmp/portage/dev-libs/glib-2.18.4-r1/work/glib-2.18.4/glib/tests/strfuncs.c:877: undefined reference to `isnan'
/usr/i586-geode-linux-uclibc/tmp/portage/dev-libs/glib-2.18.4-r1/work/glib-2.18.4/glib/tests/strfuncs.c:877: undefined reference to `isnan'
/usr/i586-geode-linux-uclibc/tmp/portage/dev-libs/glib-2.18.4-r1/work/glib-2.18.4/glib/tests/strfuncs.c:880: undefined reference to `isnan'
/usr/i586-geode-linux-uclibc/tmp/portage/dev-libs/glib-2.18.4-r1/work/glib-2.18.4/glib/tests/strfuncs.c:880: undefined reference to `isnan'
strfuncs.o: In function `test_strtod':
/usr/i586-geode-linux-uclibc/tmp/portage/dev-libs/glib-2.18.4-r1/work/glib-2.18.4/glib/tests/strfuncs.c:929: undefined reference to `isnan'
collect2: ld returned 1 exit status
make[4]: *** [strfuncs] Error 1

isnan is actually defined in math.h, but by default _POSIX_SOURCE doesn't define "isnan define". Adding -D_C99_SOURCE to strfuncs.c compile line correct issue.

Here is patch for glib/tests/Makefile.am and glib/tests/Makefile.in. Only glib/tests/Makefile.in should be applied here as Makefile.in is not regenreted.



Reproducible: Always

Steps to Reproduce:
1. crossdev -t i586-geode-linux-uclibc
2. emerge-wrapper --init
3. i586-geode-linux-uclibc -vat glib
Comment 1 Bertrand Jacquin 2009-05-04 18:41:36 UTC
Created attachment 190335 [details, diff]
Makefile.am fix
Comment 2 Bertrand Jacquin 2009-05-04 18:41:57 UTC
Created attachment 190337 [details, diff]
Makefile.in fix
Comment 3 Bertrand Jacquin 2009-05-04 18:43:08 UTC
Created attachment 190338 [details, diff]
dev-libs/glib-2.18.4-r1.ebuild.diff
Comment 4 Bertrand Jacquin 2009-05-04 19:04:35 UTC
Fixes have been reported upstream as : http://bugzilla.gnome.org/show_bug.cgi?id=581354
Comment 5 Pacho Ramos gentoo-dev 2010-10-17 14:51:42 UTC
This should be fixed in 2.26