GNOME Bugzilla – Bug 80577
Missing -lintl
Last modified: 2009-08-21 03:21:31 UTC
Since you now use bind_textdomain_codeset, you must link in -lintl. This blocks all non-glibc platforms. gcc -O2 -g -Wall -I/home/welinder/gnome/include -o .libs/testprint testprint.o -L/home/welinder/gnome/lib -L/usr/local/lib ../libgnomeprintui/.libs/libgnomeprintui-2.so -L/usr/ucblib -L/usr/local/products/freetype/2.0.2/lib /home/welinder/gnome/lib/libgnomeprint-2.so /usr/local/products/freetype/2.0.2/lib/libfreetype.so /home/welinder/gnome/lib/libbonobo-2.so /home/welinder/gnome/lib/libORBitCosNaming-2.so /home/welinder/gnome/lib/libbonobo-activation.so /home/welinder/gnome/lib/libORBit-2.so /home/welinder/gnome/lib/liblinc.so -lresolv /home/welinder/gnome/lib/libgthread-2.0.so -lthread /home/welinder/gnome/lib/libxml2.so -lz -lsocket -lnsl /home/welinder/gnome/lib/libgnomecanvas-2.so /home/welinder/gnome/lib/libart_lgpl_2.so /home/welinder/gnome/lib/libpangoft2-1.0.so /home/welinder/gnome/lib/libgtk-x11-2.0.so /home/welinder/gnome/lib/libgdk-x11-2.0.so /home/welinder/gnome/lib/libgdk_pixbuf-2.0.so -lm /home/welinder/gnome/lib/libpangox-1.0.so /home/welinder/gnome/lib/libpango-1.0.so /home/welinder/gnome/lib/libatk-1.0.so /home/welinder/gnome/lib/libgobject-2.0.so /home/welinder/gnome/lib/libgmodule-2.0.so /home/welinder/gnome/lib/libglib-2.0.so /home/welinder/gnome/lib/libiconv.so /home/welinder/gnome/lib/libpopt.so -R/home/welinder/gnome/lib -R/usr/local/products/freetype/2.0.2/lib /usr/local/gnu/install/gcc/2.9.5.2/bin/gnu-ld: warning: libdga.so.1, needed by /lib/libXext.so.0, not found (try using --rpath) ../libgnomeprintui/.libs/libgnomeprintui-2.so: undefined reference to `bind_textdomain_codeset'
GTK+ has this in configure.in: dnl dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in. dnl gtk_save_LIBS=$LIBS LIBS="$LIBS $GLIB_LIBS" AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS=$gtk_save_LIBS then in main.c: #ifdef HAVE_BIND_TEXTDOMAIN_CODESET #include <libintl.h> #endif ... #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR); # ifdef HAVE_BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); # endif #endif Should we be doing something similar?
See also bug 70627. I'm going to mark this down from high priority, because one can work around this in the build process by adding your own CFLAGS, and both sun and ximian do in their builds. Yes, it should work, and we should take a patch for it, but I can't see this as being a big deal for the community as a whole. Please feel free to disagree :)
Gmorten: Can you provide me with a patch that contains the "right" fix please? I'd like to get this bug out of the way.
The right thing would be for owen to fix glib. The second best thing is something like this in configure.in: dnl FIXME: Does this really belong here? AC_CHECK_FUNC(bind_textdomain_codeset,,[AC_CHECK_LIB(intl,bind_textdomain_codeset)])
Fixed in cvs as per the "second best thing"
This bug was marked RESOLVED without a resolution, which Bugzilla does not allow (and so I am fixing it). It is assumed that the bug was intended to be marked as FIXED. If the bug should have some other resolution, please change its resolution.