After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671711 - build: link against gthread and gmodule
build: link against gthread and gmodule
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-03-09 11:59 UTC by Víctor Manuel Jáquez Leal
Modified: 2012-03-11 21:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch adds to the LDADD flags the missed libraries. (3.85 KB, patch)
2012-03-09 11:59 UTC, Víctor Manuel Jáquez Leal
needs-work Details | Review
This patch adds to the LDADD flags the missed libraries v2 (3.14 KB, patch)
2012-03-09 14:46 UTC, Víctor Manuel Jáquez Leal
none Details | Review
build: link against gthread and gmodule (3.19 KB, patch)
2012-03-11 21:45 UTC, Matthias Clasen
committed Details | Review

Description Víctor Manuel Jáquez Leal 2012-03-09 11:59:30 UTC
Created attachment 209311 [details] [review]
This patch adds to the LDADD flags the missed libraries.

When cross-compiling with linaro toolchain 4.6.2, I got several linking errors about missing symbols because a couple libraries are not linked. An example of these errors is:
    
/bin/sh ../../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall   -o gdbus-test-cod
libtool: link: gcc -g -O2 -Wall -o .libs/gdbus-test-codegen gdbus-test-codegen.o gd
/home/vjaquez/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4
../../gio/.libs/libgio-2.0.so: undefined reference to `g_module_close'
../../gio/.libs/libgio-2.0.so: undefined reference to `g_module_symbol'
../../gio/.libs/libgio-2.0.so: undefined reference to `g_module_supported'
../../gio/.libs/libgio-2.0.so: undefined reference to `g_module_open'
../../gio/.libs/libgio-2.0.so: undefined reference to `g_module_error'
    
This patch adds to the LDADD flags the missed libraries.
    
This patch applies above the glib-2-30 branch.
Comment 1 Colin Walters 2012-03-09 13:23:06 UTC
Review of attachment 209311 [details] [review]:

I'd prefer not having the whole linker output in the commit message; it's unnecessary.

On the patches to gio/Makefile.am, we should probably make a gio_dependency_libs = libgio-2.0.la $(top_builddir)/glib/libglib-2.0.la $(top_builddir)/gobject/libgobject-2.0.la ...

Then we can just say:

gsettings_LDADD = $(gio_dependency_libs)
Comment 2 Allison Karlitskaya (desrt) 2012-03-09 14:28:36 UTC
Review of attachment 209311 [details] [review]:

gthread is deprecated...
Comment 3 Víctor Manuel Jáquez Leal 2012-03-09 14:35:42 UTC
(In reply to comment #2)
> Review of attachment 209311 [details] [review]:
> 
> gthread is deprecated...

I know, but it is also in the branch 2.30? If so, then it is needed to remove the g_thread_init() calls in those programs (querymodules, gsettings and gdbus) .

But not only gthread fails in linking, but also gmodule.

So, now I don't know how to proceed.
Comment 4 Víctor Manuel Jáquez Leal 2012-03-09 14:46:18 UTC
Created attachment 209319 [details] [review]
This patch adds to the LDADD flags the missed libraries v2
Comment 5 Víctor Manuel Jáquez Leal 2012-03-09 14:47:19 UTC
This patch adds the changes suggested by Colin in comment #1
Comment 6 Allison Karlitskaya (desrt) 2012-03-09 14:47:42 UTC
Sorry -- I didn't see the version tag.  If this is for the 2.30 branch then I have no objections.
Comment 7 Matthias Clasen 2012-03-11 21:44:58 UTC
The following fix has been pushed:
02f5d4e build: link against gthread and gmodule
Comment 8 Matthias Clasen 2012-03-11 21:45:01 UTC
Created attachment 209452 [details] [review]
build: link against gthread and gmodule

When cross-compiling with linaro toolchain 4.6.2, I got several
linking errors about missing symbols because a couple libraries are
not linked.

This patch adds to the LDADD flags the missed libraries.

This patch applies above the glib-2-30 branch.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>