Skip to contentSkip to conversation

New: failed to compile libglib2

Buildroot bugzilla at busybox.net 1 participant 5 messages Nov 14, 2010 – Nov 17, 2010

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=2809

Summary: failed to compile libglib2
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: oilehus at yahoo.com
CC: buildroot at uclibc.org
Estimated Hours: 0.0

I turned on libglib2, I got the following comipler error

libtool: compile:
/local/home/src/buildroot-2010.11-rc1/output/staging/usr/bin/i386-unknown-linux-uclibc-gcc --sysroot=/local/home/src/buildroot-2010.11-rc1/output/staging -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -DG_DISABLE_SINGLE_INCLUDES -pthread -pipe -Os -mtune=i386 -march=i386 -I/local/home/src/buildroot-2010.11-rc1/output/staging/usr/include -I/local/home/src/buildroot-2010.11-rc1/output/staging/include -Wall -MT gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c gatomic.c -fPIC -DPIC -o .libs/gatomic.o
gatomic.c:885: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gatomic.c: In function 'g_atomic_int_exchange_and_add':
gatomic.c:906: warning: implicit declaration of function 'g_mutex_lock' gatomic.c:906: error: 'g_atomic_mutex' undeclared (first use in this function) gatomic.c:906: error: (Each undeclared identifier is reported only once gatomic.c:906: error: for each function it appears in.)
gatomic.c:909: warning: implicit declaration of function 'g_mutex_unlock' gatomic.c: In function 'g_atomic_int_add':
gatomic.c:928: error: 'g_atomic_mutex' undeclared (first use in this function) gatomic.c: In function 'g_atomic_int_compare_and_exchange':
gatomic.c:954: error: 'g_atomic_mutex' undeclared (first use in this function) gatomic.c: In function 'g_atomic_pointer_compare_and_exchange':
gatomic.c:988: error: 'g_atomic_mutex' undeclared (first use in this function) gatomic.c: In function '_g_atomic_thread_init':
gatomic.c:1155: error: 'g_atomic_mutex' undeclared (first use in this function) gatomic.c:1155: warning: implicit declaration of function 'g_mutex_new' make[5]: *** [gatomic.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
mv -f .deps/garray.Tpo .deps/garray.Plo
make[5]: Leaving directory `/local/home/src/buildroot-2010.11-rc1/output/build/libglib2-2.26.0/glib' make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/local/home/src/buildroot-2010.11-rc1/output/build/libglib2-2.26.0/glib' make[3]: *** [all] Error 2
make[3]: Leaving directory `/local/home/src/buildroot-2010.11-rc1/output/build/libglib2-2.26.0/glib' make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/local/home/src/buildroot-2010.11-rc1/output/build/libglib2-2.26.0' make[1]: *** [all] Error 2
make[1]: Leaving directory `/local/home/src/buildroot-2010.11-rc1/output/build/libglib2-2.26.0'

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 2809] failed to compile libglib2

https://bugs.busybox.net/show_bug.cgi?id=2809

--- Comment #1 from Lionel Landwerlin <[email protected]> --- It should be fixed in git :

http://git.buildroot.org/buildroot/commit/?id=6c01ef20ee96f770bf7fc0fede90b3861d529015

Do you have this commit in your tree ?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 2809] failed to compile libglib2

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=2809

--- Comment #2 from oilehus at yahoo.com ---
I can see the patch file in the tree, but somehow it didn't automatically apply this patch, if I manually applied the patch, it can build without problem.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 2809] failed to compile libglib2

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=2809

--- Comment #3 from oilehus at yahoo.com ---
is it a typo for the patch file's name ?
Should "libglib-2.26.0-fix-compilation-with-no-builtin-atomic.patch" be "libglib2-2.26.0-fix-compilation-with-no-builtin-atomic.patch"?

After I made that change, I don't see that error any more but I saw another one:

./.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[5]: *** [gsettings] Error 1
make[5]: *** Waiting for unfinished jobs.... ../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[5]: *** [gio-querymodules] Error 1

if I enable "IPv6" in toolchain, it's ok. It seems like libglib2 2.26.0 is not compatible with IPv4 any more.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 2809] failed to compile libglib2

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=2809

Peter Korsgaard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Peter Korsgaard <[email protected]> --- Fixed in git, thanks

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.