Author Login
Post Reply
Adam Williamson <awilliamson@(protected):
> Okay, I really don't understand this underlinking stuff. And yes, I read
> the Wiki. But I still don't get it, or at least, how to fix problems.
>
> It's breaking Brasero's build:
>
> Making all in cdrdao
> make[4]: Entering directory `/home/adamw/rpm/BUILD/brasero-0.7.90/src/plugins/cdrdao'
> /bin/sh ../../../libtool --tag=CC --mode=link gcc -g -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -module -avoid-version -Wl,--as-needed -Wl,--no-undefined -o libbrasero-cdrdao.la -rpath /usr/lib/brasero/plugins burn-cdrdao.lo -lgconf-2 -lglib-2.0 -Wl,--as-needed -Wl,--no-undefined
> gcc -shared -Wl,--as-needed .libs/burn-cdrdao.o /usr/lib/libgconf-2.so /usr/lib/libglib-2.0.so -march=i586 -mtune=generic -Wl,--as-needed -Wl,--as-needed -Wl,--no-undefined -Wl,-soname -Wl,libbrasero-cdrdao.so -o .libs/libbrasero-cdrdao.so
> .libs/burn-cdrdao.o: In function `brasero_cdrdao_finalize':
> /home/adamw/rpm/BUILD/brasero-0.7.90/src/plugins/cdrdao/burn-cdrdao.c:528: undefined reference to `g_type_check_class_cast'
> .libs/burn-cdrdao.o: In function `brasero_cdrdao_class_init':
> /home/adamw/rpm/BUILD/brasero-0.7.90/src/plugins/cdrdao/burn-cdrdao.c:510: undefined reference to `g_type_check_class_cast'
> /home/adamw/rpm/BUILD/brasero-0.7.90/src/plugins/cdrdao/burn-cdrdao.c:511: undefined reference to `brasero_process_get_type'
> [...]
> how do I fix this?
first, try to see if it's a --no-undefined or --as-needed issue by
removing each of option. If removing --as-needed helps, then the
problem is in a library used. If removing --no-undefined helps, then
it's either a missing library, or a plugin.
then, look at the previous package. Here it tries to build
"libbrasero-cdrdao.so", so:
% rpm -qpl /contrib/release/brasero-0.7.9-0.815.1mdv2009.0.i586.rpm | grep libbrasero-cdrdao.so
/usr/lib/brasero/plugins/libbrasero-cdrdao.so
and one can see it's a plugin.
a plugin should be built using libtool options "-module -avoid-version".
(and in that case, libtool will ensure --no-undefined is removed)
you can also check from where symbol "brasero_process_get_type" comes
from. In the build directory:
% for i in $(grep -rl brasero_process_get_type .); do objdump -t $i | grep brasero_process_get_type && echo $i; done
or
% for i in $(grep -rl brasero_process_get_type .); do objdump -t $i | fgrep -v '*UND*' | grep brasero_process_get_type && echo $i; done
0809a0a0 g F .text 00000089 brasero_process_get_type
./src/brasero
=> the symbol is defined in the binary, which is truly the typical
plugin case. so --no-undefined must somehow be removed:
- either ensure "-module -avoid-version" is passed to libtool
- or use %_disable_ld_no_undefined
(and please do not try to remove the option by patch. patches are
allowed only if the patch can go upstream. otherwise, use
%_disable_ld_no_undefined)
adam, if you can enhance the wiki page using this, please do ;)