[gcompris-devel] [Bugs] Porting to Mac Os 10.2

Bruno Coudoin bruno.coudoin at free.fr
Mon Dec 9 10:25:03 UTC 2002


Looking at the doc for libtool I found.
I have to tell that I just started to port gcompris to gnome 2.
I this quest ;), I found out that I add to add -export-dynamic to the
gcompris bin link or the plugin failed to load and was not able to load
the internal gcompris functions.
It was strange to me because for some obscure reason, it works fine
without it on gnome 1.2.

----

http://www.delorie.com/gnu/docs/libtool/libtool_42.html

On some operating systems, a program symbol must be specially declared
in order to be dynamically resolved with the dlsym (or equivalent)
function.

Libtool provides the `-export-dynamic' and `-module' link flags (see
section Link mode), which do this declaration. You need to use these
flags if you are linking an application program that dlopens other
modules or a libtool library that will also be dlopened.

For example, if we wanted to build a shared library, `libhello', that
would later be dlopened by an application, we would add `-module' to the
other link flags:


burger$ libtool gcc -module -o libhello.la foo.lo \
                hello.lo -rpath /usr/local/lib -lm
burger$

If symbols from your executable are needed to satisfy unresolved
references in a library you want to dlopen you will have to use the flag
`-export-dynamic'. You should use `-export-dynamic' while linking the
executable that calls dlopen:


burger$ libtool gcc -export-dynamic -o hell-dlopener main.o
burger$

Le lun 09/12/2002 à 08:58, Christophe Trophime a écrit :
> Last week I report on a problem with loading plugins
> on Mac Os X 10.2. I found out that "get_bplugin_info"
> as to be changed to "_get_bplugin_info" to make dlsym work
> correctly in pluginenum.c
> 
> However gcompris still doesn't work. dlsym reports that multiple
> definitions of various symbols in the dynamic library (the plugins).
> I am stuck at this point.
> 
> I tried to check what is done in xmms pluginenum.c. I found out that the
> plugins are "Mach bundle ppc" type whereas the plugins in gcompris are 
> "Mach dynamically library". I guess that we should add a specific option
> during the building of plugins to get the same type as in xmms which
> seems to be working.





More information about the Gcompris-devel mailing list