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 346531 - GTK 2.20 static build is broken
GTK 2.20 static build is broken
Status: RESOLVED INCOMPLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
2.90.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 346559
 
 
Reported: 2006-07-04 10:23 UTC by Sebastien Bacher
Modified: 2012-08-10 18:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't query immodules for the local tree when building statically or cross-compiling (1.77 KB, patch)
2006-08-14 23:10 UTC, Loïc Minier
none Details | Review
Don't query immodules for the local tree when building statically or cross-compiling v2 (fix typos) (1.78 KB, patch)
2006-08-15 08:46 UTC, Loïc Minier
none Details | Review
Don't query immodules for the local tree when cross-compiling or when --disable-shared was given; v3 (check for shared instead of static) (2.02 KB, patch)
2007-07-09 15:31 UTC, Loïc Minier
none Details | Review

Description Sebastien Bacher 2006-07-04 10:23:15 UTC
$ ./configure --prefix=/usr --disable-shared --enable-static --enable-explicit-deps=yes 
$ make
...
creating im-viqr.la
(cd .libs && rm -f im-viqr.la && ln -s ../im-viqr.la im-viqr.la)
../../gtk/gtk-query-immodules-2.0 im-xim.la  im-am-et.la im-cedilla.la im-cyrillic-translit.la im-inuktitut.la im-ipa.la im-thai-broken.la im-ti-er.la im-ti-et.la im-viqr.la  > gtk.immodules
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-xim.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-xim.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-am-et.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-am-et.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-cedilla.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-cedilla.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-cyrillic-translit.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-cyrillic-translit.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-inuktitut.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-inuktitut.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-ipa.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-ipa.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-thai-broken.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-thai-broken.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-ti-er.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-ti-er.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-ti-et.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-ti-et.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
Cannot load module /tmp/gtk/gtk+-2.10.0/modules/input/im-viqr.la: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
/tmp/gtk/gtk+-2.10.0/modules/input/im-viqr.la does not export GTK+ IM module API: /tmp/gtk/gtk+-2.10.0/modules/input/.libs/: cannot read file data: Is a directory
make[3]: *** [gtk.immodules] Error 1
make[3]: Leaving directory `/tmp/gtk/gtk+-2.10.0/modules/input'


The Debian and Ubuntu packages do a static build, that issue prevents 2.10 to be packaged for now
Comment 1 Sebastien Bacher 2006-07-04 14:45:01 UTC
if I run "make" again after that error it keeps building for some seconds and hits that then:

"...
make[2]: Entering directory `/tmp/gtk/gtk+-2.10.0/demos'
GDK_PIXBUF_MODULE_FILE=../gdk-pixbuf/gdk-pixbuf.loaders ../gdk-pixbuf/gdk-pixbuf-csource --raw --build-list             \
                apple_red  ./apple-red.png      \
                gnome_foot ./gnome-foot.png     \
        > test-inline-pixbufs.h                         \
        || (rm -f test-inline-pixbufs.h && false)
failed to load "./apple-red.png": Couldn't recognize the image file format for file './apple-red.png'
make[2]: *** [test-inline-pixbufs.h] Error 1
make[2]: Leaving directory `/tmp/gtk/gtk+-2.10.0/demos'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/gtk/gtk+-2.10.0'
make: *** [all] Error 2
..."
Comment 2 Sebastien Bacher 2006-07-04 15:33:19 UTC
using --with-included-loaders=png,jpeg is enough to get ride of the png error, and then hits that issue:

"...
../gtk/.libs/libgtk-x11-2.0.a(gtkmarshalers.o): In function `_gtk_marshal_OBJECT__VOID':
/tmp/gtk/gtk+-2.10.0/gtk/gtkmarshalers.c:1160: multiple definition of `_gtk_marshal_OBJECT__VOID'
marshalers.o:/tmp/gtk/gtk+-2.10.0/perf/marshalers.c:58: first defined here
collect2: ld returned 1 exit status
make[3]: *** [testperf] Error 1..."
Comment 3 Matthias Clasen 2006-07-05 13:48:46 UTC
Looks like Federicos performance framework duplicates some marshallers ?
Can you try just removing the offending marshaller from/perf/marshallers.c ?
Comment 4 Sebastien Bacher 2006-07-05 18:14:28 UTC
that bug is sort of confusing because listing different issues, the first issue described has been fixed by using a different set of build options, might be to close as NOTABUG if you consider that's an user issue due to the set of options used (ie: no loader specified). I've opened bug #346559 about the perf directory issue and will try later and comment on the other bug
Comment 5 Loïc Minier 2006-08-14 23:09:35 UTC
I'm reopening this bug for the first build failure Sébastien reported, the gtk.immodules stuff.

(The reason he hit the bug is probably that he tried a static build without the venerable Debian patch collection for Gtk; I'm hitting it because I'm sorting our patches out a little; this dates 2003!)

In modules/input/Makefile.am, there are two gtk.immodules generations: one from the build tree to the installation dir (install-data-hook), and the other local to the build tree (all-local).  The second one is for CVS checkouts builds.

I'll attach a patch which disables the query-immodules call for static linking (exactly like for cross-compiling); this probably fixes the same build failure when cross-compiling.
Comment 6 Loïc Minier 2006-08-14 23:10:41 UTC
Created attachment 70903 [details] [review]
Don't query immodules for the local tree when building statically or cross-compiling
Comment 7 Loïc Minier 2006-08-15 08:46:28 UTC
Created attachment 70922 [details] [review]
Don't query immodules for the local tree when building statically or cross-compiling v2 (fix typos)
Comment 8 Glenn Schrader 2006-08-25 14:07:47 UTC
Since the library won't build statically unless --with-included-loaders is specified it would be really nice if attempting to run configure this way would fail with an appropriate error message.
Comment 9 Matthias Clasen 2006-08-26 00:24:31 UTC
Hmm, but the query-immodules run only fails for --disable-shared builds, no ?
Comment 10 Matthias Clasen 2007-07-09 14:30:00 UTC
Asking some other way, should this check for DISABLE_SHARED rather than ENABLE_STATIC ?
Comment 11 Loïc Minier 2007-07-09 15:08:02 UTC
Oh, right; I understand the question now and I agree: query-modules shouldn't only run if support for modules is enabled / available and when query-modules is built which probably means when DISABLE_SHARED isn't set.
Comment 12 Loïc Minier 2007-07-09 15:31:44 UTC
Created attachment 91501 [details] [review]
Don't query immodules for the local tree when cross-compiling or when --disable-shared was given; v3 (check for shared instead of static)

Proposed patch still fails to build due to a similar issue with the perf/ directory, but fixes the reported issue.
Comment 13 Javier Jardón (IRC: jjardon) 2009-11-16 18:24:19 UTC
Still valid in GTK+ 2.19
Comment 14 Javier Jardón (IRC: jjardon) 2010-03-24 01:01:17 UTC
Still valid in GTK+ 2.20
Comment 15 André Klapper 2012-04-26 12:56:25 UTC
Is this still an issue in 2.24 or can this be closed as OBSOLETE?
Comment 16 Javier Jardón (IRC: jjardon) 2012-08-10 18:47:50 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!