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 313368 - linking failure in gswitchit build
linking failure in gswitchit build
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: general
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 313491 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-13 00:32 UTC by Mark Drago
Modified: 2005-08-24 00:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add missing AC_SUBST lines to configure.in (1.00 KB, patch)
2005-08-23 11:20 UTC, Rodrigo Moya
none Details | Review

Description Mark Drago 2005-08-13 00:32:37 UTC
Distribution/Version: Fedora Core 4

gnome-applets is failing to build as part of jhbuild for me.  I get the
following error:

/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o gnome-keyboard-applet
gnome_keyboard_applet-switch.o -L/opt/gnome2/lib -lxklavier -lxml2 -lz -lm  
-L/opt/gnome2/lib -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lfreetype -lz -lcairo
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -L/usr/X11R6/lib  -lSM -lICE -lX11
 -pthread -L/opt/gnome2/lib -L/usr/X11R6/lib -lpanel-applet-2 -lgnomeui-2 -lSM
-lICE -lbonoboui-2 -lxml2 -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2
-lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0
-lpangocairo-1.0 -lpango-1.0 -lfreetype -lz -lcairo -lgobject-2.0 -lgnomevfs-2
-lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 -ldl
-lgthread-2.0 -lglib-2.0   ../gswitchit/libgswitchit-applet.a
../libgswitchit/libgswitchit.a ../libkbdraw/libkbdraw.a
gcc -g -O2 -o gnome-keyboard-applet gnome_keyboard_applet-switch.o -pthread 
-L/opt/gnome2/lib /opt/gnome2/lib/libxklavier.so -lxkbfile -L/usr/X11R6/lib
/opt/gnome2/lib/libpanel-applet-2.so -L/usr/kerberos/lib
/opt/gnome2/lib/libglade-2.0.so /opt/gnome2/lib/libgnomeui-2.so
/opt/gnome2/lib/libgnome-keyring.so /usr/lib/libjpeg.so
/opt/gnome2/lib/libbonoboui-2.so -lSM -lICE /opt/gnome2/lib/libgnomecanvas-2.so
/opt/gnome2/lib/libgnome-2.so /opt/gnome2/lib/libesd.so -lasound
/opt/gnome2/lib/libaudiofile.so /opt/gnome2/lib/libart_lgpl_2.so
/opt/gnome2/lib/libgtk-x11-2.0.so /opt/gnome2/lib/libgdk-x11-2.0.so
/opt/gnome2/lib/libatk-1.0.so /opt/gnome2/lib/libgdk_pixbuf-2.0.so
/opt/gnome2/lib/libpangocairo-1.0.so /opt/gnome2/lib/libpangoft2-1.0.so
/opt/gnome2/lib/libpango-1.0.so /opt/gnome2/lib/libcairo.so
/opt/gnome2/lib/libXrender.so -lX11 -lpng12 /opt/gnome2/lib/libfontconfig.so
/usr/lib/libexpat.so /usr/lib/libfreetype.so /opt/gnome2/lib/libgnomevfs-2.so
/opt/gnome2/lib/libxml2.so -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err
-lk5crypto -lz /opt/gnome2/lib/libhowl -lresolv -lrt
/opt/gnome2/lib/libbonobo-2.so /opt/gnome2/lib/libgconf-2.so
/opt/gnome2/lib/libbonobo-activation.so /opt/gnome2/lib/libORBitCosNaming-2.so
/opt/gnome2/lib/libORBit-2.so /usr/lib/libpopt.so
/opt/gnome2/lib/libgobject-2.0.so -lm /opt/gnome2/lib/libgmodule-2.0.so -ldl
/opt/gnome2/lib/libgthread-2.0.so -lpthread /opt/gnome2/lib/libglib-2.0.so
../gswitchit/libgswitchit-applet.a ../libgswitchit/libgswitchit.a
../libkbdraw/libkbdraw.a -Wl,--rpath -Wl,/opt/gnome2/lib -Wl,--rpath
-Wl,/opt/gnome2/lib
../libkbdraw/libkbdraw.a(keyboard-drawing.o)(.text+0x5ed): In function
`draw_layout':
/home/mdrago/rpmbuild/BUILD/gnome-applets/libkbdraw/keyboard-drawing.c:666:
undefined reference to `pango_xft_set_default_substitute'
../libkbdraw/libkbdraw.a(keyboard-drawing.o)(.text+0x5fe):/home/mdrago/rpmbuild/BUILD/gnome-applets/libkbdraw/keyboard-drawing.c:670:
undefined reference to `pango_xft_substitute_changed'
../libkbdraw/libkbdraw.a(keyboard-drawing.o)(.text+0x2728): In function
`keyboard_drawing_init':
/home/mdrago/rpmbuild/BUILD/gnome-applets/libkbdraw/keyboard-drawing.c:1594:
undefined reference to `pango_xft_get_context'
collect2: ld returned 1 exit status
make[3]: *** [gnome-keyboard-applet] Error 1
make[3]: Leaving directory
`/home/mdrago/rpmbuild/BUILD/gnome-applets/gswitchit'make[2]: ***
[all-recursive] Error 1
make[2]: Leaving directory
`/home/mdrago/rpmbuild/BUILD/gnome-applets/gswitchit'make[1]: ***
[all-recursive] Error 1
make[1]: Leaving directory `/home/mdrago/rpmbuild/BUILD/gnome-applets'
make: *** [all] Error 2

I see that keyboard-drawing.c calls pango_xft_set_default_substitute,
pango_xft_substitute_changed, and pango_xft_get_context.  I see that
libpangoxft-1.0.so provides all three of these symbols.  I also see that the
'-lpangoxft' bit is missing from the command I included above.  However, my
autofoo knowledge failed me and I was not able to figure out what had to be done
to fix it.
Comment 1 Sergey V. Udaltsov 2005-08-13 10:37:18 UTC
That's very strange. In may case, /usr/lib/gdk-2.0.pc requires pangoxft. Also,
/usr/lib/pangoxft.pc has Libs: -L${libdir} -lpangoxft-1.0. Is it same in your case?
Comment 2 Mark Drago 2005-08-13 12:33:16 UTC
Nope.  Here is the gdk-2.0.pc file that jhbuild built for me just yesterday:

prefix=/opt/gnome2
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
target=x11

Name: GDK
Description: GIMP Drawing Kit (${target} target)
Version: 2.7.6
Requires: gdk-pixbuf-2.0 pango pangocairo
Libs: -L${libdir} -lgdk-${target}-2.0
Cflags: -I${includedir}/gtk-2.0 -I${libdir}/gtk-2.0/include

I tried adding a 'pangoxft' requirement to the gdk-2.0.pc file and the build
still failed.  I then took a look at my gdk-x11-2.0.pc file and that looked very
similar to the gdk-2.0.pc file.  Here is the contents of the gdk-x11-2.0.pc file:

prefix=/opt/gnome2
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
target=x11

Name: GDK
Description: GIMP Drawing Kit (${target} target)
Version: 2.7.6
Requires: gdk-pixbuf-2.0 pango pangocairo
Libs: -L${libdir} -lgdk-${target}-2.0
Cflags: -I${includedir}/gtk-2.0 -I${libdir}/gtk-2.0/include

Adding a 'pangoxft' requirement to this file however _did_ solve the problem. 
So, should this bug be reassigned to gtk?  I would think that since libkbdraw is
making calls to pangoxft itself that it should depend on pangoxft directly and
not lean on gdk.  
Comment 3 Sergey V. Udaltsov 2005-08-13 13:25:58 UTC
Well, I'd reassign it to gtk. Probably some of them would give comments on this
- whether we should put pangoxft explicitly in configure. in - or is it really
bug in gtk. Letting them know would not hurt anyway.
Comment 4 Sergey V. Udaltsov 2005-08-14 21:29:58 UTC
well, I added pangoxft to g-c-c and g-a explicitly, in CVS
Comment 5 Allison Karlitskaya (desrt) 2005-08-14 23:17:19 UTC
*** Bug 313491 has been marked as a duplicate of this bug. ***
Comment 6 Rodrigo Moya 2005-08-23 11:20:40 UTC
Created attachment 51180 [details] [review]
Patch to add missing AC_SUBST lines to configure.in
Comment 7 Rodrigo Moya 2005-08-23 11:21:30 UTC
Attached patch is still needed, until GTK does fix it itself
Comment 8 Owen Taylor 2005-08-23 12:10:12 UTC
pangoxft was used internally in GTK+-2.6, but is no longer used. If apps
want to use its facilities, they have to pull it in themselves. (And
pay the performance penalty of not sharing fonts with GTK+)

What libkbdraw is doing is awful and really needs to be replaced with the
facilities availalbe in GTK+-2.6 or newer; see the rotated_text example in
gtk-demo.

(Or you could rewrite to Cairo, which would be even cleaner, but 
a bigger change.)

Comment 9 Sergey V. Udaltsov 2005-08-23 18:02:02 UTC
Owen, the problem with pangoxft in kbdraw is real. It is not only matter of
linking - it simply does not work (while it was working with gtk 2.6). Could you
advise something less than rewriting it from pangoxft to just pango (or, from
the scratch, to cairo)? Unfortunately the code is not mine, it was Noah who
created it - I am trying to support it but I don't know much about pango as such.
Comment 10 Owen Taylor 2005-08-23 19:31:30 UTC
I odn't have time to rewrite it for you. If you read the gtk-demo I pointed
to, it shows how to do rotated text much more simply than the way Noah
hacked up for GTK+-2.4.
Comment 11 Sergey V. Udaltsov 2005-08-23 20:15:23 UTC
Sure you don't have time, I did not ask you. I just hoped you could give me a
hint regarding what was broken in pangoxft (or gtk) lately so g-k-p does not
work anymore. Ok, thanks, I'll have a look at the demo.
Comment 12 Owen Taylor 2005-08-23 20:38:42 UTC
The change was simply that libkbdraw was just assuming blindly that rendering
an Xft layout through GDK would work, and GDK now deals with Cairo layouts
not Xft layouts.

You could conceivably drop down to Pango Xft directly for drawing, but just
using the standard API for rotating text will be vastly cleaner and simpler.
Comment 13 Sergey V. Udaltsov 2005-08-23 23:56:41 UTC
Fixed in CVS. Pangoxft is not used any more.