glib-2.0_2.24.1.bb: Fix build when DISTRO_FEATURES lacks ipv6.
PATCH 1/1 glib-2.0_2.24.1.bb: Fix build when DISTRO_FEATURES lacks ipv6.
mipsel-oe-linux-uclibc-libtool: link: mipsel-oe-linux-uclibc-gcc -march=mips32 -isystem/mnt/oe/tmp/sysroots/mipsel-oe-linux-uclibc/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -Wall -Wl,-rpath-link -Wl,/mnt/oe/tmp/sysroots/mipsel-oe-linux-uclibc/lib -Wl,-O1 -o .libs/gio-querymodules gio-querymodules.o -L/mnt/oe/tmp/sysroots/mipsel-oe-linux-uclibc/lib ../glib/.libs/libglib-2.0.so ../gobject/.libs/libgobject-2.0.so ../gmodule/.libs/libgmodule-2.0.so ./.libs/libgio-2.0.so /mnt/oe/tmp/work/mipsel-oe-linux-uclibc/glib-2.0-2.24.1-r2/glib-2.24.1/gobject/.libs/libgobject-2.0.so /mnt/oe/tmp/work/mipsel-oe-linux-uclibc/glib-2.0-2.24.1-r2/glib-2.24.1/gthread/.libs/libgthread-2.0.so -lpthread /mnt/oe/tmp/work/mipsel-oe-linux-uclibc/glib-2.0-2.24.1-r2/glib-2.24.1/gmodule/.libs/libgmodule-2.0.so -ldl /mnt/oe/tmp/work/mipsel-oe-linux-uclibc/glib-2.0-2.24.1-r2/glib-2.24.1/glib/.libs/libglib-2.0.so /mnt/oe/tmp/sysroots/mipsel-oe-linux-uclibc/lib/libz.so /mnt/ oe/tmp/sysroots/mipsel-oe-linux-uclibc/lib/libintl.so /mnt/oe/tmp/sysroots/mipsel-oe-linux-uclibc/lib/libiconv.so -lc
../glib/.libs/libglib-2.0.so: warning: the use of OBSOLESCENT utime' is discouraged, use utimes'
./.libs/libgio-2.0.so: undefined reference to `in6addr_loopback'
./.libs/libgio-2.0.so: undefined reference to `in6addr_any'
collect2: ld returned 1 exit status
make[4]: *** [gio-querymodules] Error 1
--- .../glib-2.0/glib-2.0-2.24.1/disable-ipv6.patch | 26 ++++++++++++++++++++ recipes/glib-2.0/glib-2.0_2.24.1.bb | 4 +++ 2 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 recipes/glib-2.0/glib-2.0-2.24.1/disable-ipv6.patch
recipes/glib-2.0/glib-2.0-2.24.1/disable-ipv6.patch new file +26 -0
@@ -0,0 +1,26 @@ +--- glib-2.24.1/gio/ginetaddress.c.orig 2010-11-29 14:54:17.000000000 +1030 ++++ glib-2.24.1/gio/ginetaddress.c 2010-11-29 14:55:03.000000000 +1030 +@@ -485,7 +485,11 @@ + return g_inet_address_new_from_bytes (addr, family); + } + else ++#ifdef DISABLE_IPV6 ++ return NULL; ++#else + return g_inet_address_new_from_bytes (in6addr_loopback.s6_addr, family); ++#endif + } + + /** +@@ -512,7 +516,11 @@ + return g_inet_address_new_from_bytes (addr, family); + } + else ++#ifdef DISABLE_IPV6 ++ return NULL; ++#else + return g_inet_address_new_from_bytes (in6addr_any.s6_addr, family); ++#endif + } + +
recipes/glib-2.0/glib-2.0_2.24.1.bb +4 -0
@@ -21,8 +21,12 @@ SRC_URI = "\ file://gio.patch \ file://60_wait-longer-for-threads-to-die.patch \ file://glib-mkenums-interpreter.patch \ + file://disable-ipv6.patch \ " +noipv6 = "${@base_contains('DISTRO_FEATURES', 'ipv6', '', '-DDISABLE_IPV6', d)}" +EXTRA_OEMAKE_append = "'CFLAGS=${CFLAGS} ${noipv6}'" + SRC_URI[archive.md5sum] = "6a7db81c9a2cffe6a34dadb57d7ba2d2" SRC_URI[archive.sha256sum] = "014c3da960bf17117371075c16495f05f36501db990851ceea658f15d2ea6d04"
Signature · 1 line
1.7.1
recipes/glib-2.0/glib-2.0-2.24.1/disable-ipv6.patch
Quoted 10 lines · Graham Gower
Signed-off-by Graham Gower <[email protected]>---
.../glib-2.0/glib-2.0-2.24.1/disable-ipv6.patch | 26 ++++++++++++++++++++ recipes/glib-2.0/glib-2.0_2.24.1.bb | 4 +++2 files changed, 30 insertions(+), 0 deletions(-)create mode 100644
recipes/glib-2.0/glib-2.0-2.24.1/disable-ipv6.patchrecipes/glib-2.0/glib-2.0-2.24.1/disable-ipv6.patch new file +0
-0
...
Graham,
thx for the patch.
However I did not encounter this failure, instead
http://tinderbox.openembedded.org/builds/107121/
(gconvert.c:55:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv)
I could fix it with EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu " but I'm not sure about the real cause and the best fix.
Opinions?
Andrea