[gcompris-devel] how to use libgnomecanvas and libart in gcompris

Patrick GOLDBRONN pgoldbronn at free.fr
Tue Sep 25 20:37:11 UTC 2007


Second test : perhaps a limitation with attachment ?

Bruno Coudoin a écrit :
> Le dimanche 23 septembre 2007 à 21:31 +0200, Patrick GOLDBRONN a écrit :
>> Hi,
>>
>> When I compile gcompris I get some undefined symbol when gcompris load 
>> libpython.so (from libgnomecanvas and libart)
>>
>> To solve, I added ../libibgnomecanvas/libgnomecanvas-2.a and 
>> ../libart_lgpl/libart_lgpl_2.a in libpython_la_LIBADD in 
>> src/board/Makefile.am
>>
>> I don't know if it is right or if I did another mistake.
> 
> I had the same and fixed these in the gcomprixo branch this week end. I
> just ported my hack back in trunk. Please have a test.
> 
> Your fix proposal makes sense but I am not sure it's the good way
> because we would link staticaly libgnomecanvas with gcompris binary and
> the libpython binding. That probably works but it's strange.

Why do that ? dynamic link is for that, no ?

> I made a hack to force missing symbols to be included in gcompris core.
> Their is probably a better way but at least, we don't have the code
> twice. If somebody understand the issue, a clean solution is welcome.
> 
> What happens is that we compile statically gcompris and libgnomecanvas
> but some unused symbols are stripped. But our python binding needs them
> and we fail to dlopen it.

Well, when you had a static library, linker takes all symbols it needs
in it, so (I don't think it takes all). I suppose it works because all
activities, in C and python, use the same symbols.

I have change makefile in src to use dynamic link (with libgnomecanvas
and libart_lgpl). Libtool and automake do that fine. the result gcompris
executable and libpython.so are dynamicaly linked to this library with
rpath option, so they use the rigth ones, not another version that could
be install some where else.

I have briefly test all activity which seem work :-)

My Makefile are joined in tar ball, if you want to test.

I remove $(top_builddir)/intl, an old directory ?

I have also a question : what is libgnomecanvas_2_la_headers in
src/libgnomecanvas/Makefile.am ? If you want to install header, the
simpliest is to add this file into libgnomecanvas_2_la_SOURCES, or in
include_HEADERS (same for other Makefile.am). To build a distribution
(make dist), headers files are so automaticaly added.

I'd like to have a fonctional 'make dist', are you interested ? I could
try to do it.

Another remark (and I stop her ;-) ), INCLUDES is an older variable,
prefer AM_CPPFLAGS (for pre processing) and AM_CFLAGS for C compilation
(as CXXFLAGS for C++ and FFLAGS for fortran compilation)

Patrick.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile_am_in_src.tar.gz
Type: application/x-gzip
Size: 3659 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/gcompris-devel/attachments/20070925/f7aadac9/attachment.gz>


More information about the Gcompris-devel mailing list