[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: guile-gnome-platform build failure on hppa



On Thu, Jul 16, 2009 at 1:42 PM, Andreas Rottmann<a.rottmann@gmx.at> wrote:
> "Carlos O'Donell" <carlos@systemhalted.org> writes:
>
>> On Tue, Jul 14, 2009 at 12:27 PM, Carlos
>> O'Donell<carlos@systemhalted.org> wrote:
>>> I'll fix this manually and try a dpkg-buildpackage run.
>>
>> I'm bringing in Andreas, the guile-gnome-platform maintainer, to this
>> conversation
>>
>> Andreas, the problem on hppa with guile-gnome-platform is that one of
>> the tests in the testsuite fails with:
>> ~~~
>> test-wrapset-api: exception in test: (misc-error "dynamic-link" "file:
>> ~S, message: ~S" ("libgw-guile-gnome-gtk" "file not found") #f)
>> ~~~
>>
> Yes, I'm aware of that problem; however I've not yet had time to
> investigate.

This turns out to be a bug in guile-gnome-platform. It is *not*
specific to hppa, and will effect all targets that execute the code
path that calls scm_to_cairo.

The analysis and solution follows:
~~~
This failure is because the native dynamic loader fails to resolve the
symbol scm_to_cairo.

The source file
guile-gnome-platform-2.16.1/gtk/gnome/gw/guile-gnome-gw-gtk.c calls
"scm_to_cairo" on line 26258.

The symbol scm_to_cairo is defined in libguile-cairo.so (guile-cairo package).

The shared library
guile-gnome-platform-2.16.1/gtk/gnome/gw/.libs/libgw-guile-gnome-gtk.so.0
does not list libguile-cairo.so as a required library (DT_NEEDED
entry).

Failing to list a required library is a bug.
~~~

Does the bug exist on other targets?

Yes, this bug exists on x86, but because this particular code path
isn't executed, the symbol lookup does not fail, and the test passes.

Remember that shared libraries are *allowed* to have undefined
symbols, therefore it is not a toolchain bug to allow the link to
complete.

Testing a solution:
~~~
cd guile-gnome-platform-2.16.1/gtk/gnome/gw
<Run libtool again to relink libgw-guile-gnome-gtk.so.0 with -lgnome-cairo>
cd ../../../gtk/tests/gtk/
<Rerun the failing test>

Running test suite: main-suite ----------------------------------------

Running test suite: <test-wrapset-api>-suite --------------------------
Running test case: test-wrapset-api
WARNING: (gnome gtk): imported module (gnome gobject generics)
overrides core binding `connect'
WARNING: (gnome gtk): `re-export-modules' imported from both (gnome
gobject utils) and (gnome gw support modules)
WARNING: (gnome gw generics): imported module (gnome gobject generics)
overrides core binding `connect'

1 run, 0 failed

Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.
~~~

And now the test passes.

Solution:
~~~
Please fix guile-gnome-platform to correctly add -lgnome-cairo to the
libtool link line used to link libgw-guile-gnome-gtk.la
~~~
For your reference the correct link line is this (with -lguile-cairo added):
/bin/sh ../../../libtool --tag=CC   --mode=link cc
-I../../../glib/gnome/gobject -I../../../glib/gnome/gobject -I. -I.
-Wall -g -D_REENTRANT -I/usr/include/guile-cairo -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/directfb -I/usr/include/libpng12   -D_REENTRANT
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/directfb -I/usr/include/libpng12
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -std=gnu99
-g -O2 -g -Wall -O2 -module  -o libgw-guile-gnome-gtk.la -rpath
/usr/lib/guile-gnome-2
libgw_guile_gnome_gtk_la-guile-gtk-tree-model.lo
libgw_guile_gnome_gtk_la-gtk-support.lo
libgw_guile_gnome_gtk_la-guile-gnome-gw-gtk.lo -lgtk-x11-2.0
-lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm
-lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig
-lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lguile -lltdl -lgmp -lcrypt
-lm -lltdl -lgwrap-guile-runtime -lgwrap-core-runtime -lguile -lgmp
-lcrypt -lm -lltdl -lguile-cairo
../../../glib/gnome/gobject/libguile-gnome-gobject-2.la -D_REENTRANT
-I/usr/include/guile-cairo -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/directfb -I/usr/include/libpng12
~~~

Please tell me if that helps?

Cheers,
Carlos.


Reply to: