Hi, I'm cross-compiling DirectFB 1.2.3 on an ARC processor
(arc-uclibc-linux).
In the beginning I got a "multiple definition" error with __init() and
__fini(), since 'make' was trying to create libfusion.so-1.2.so.0.3.0,
linking it against crti.o and libdirect.so (which was already linked to
crti.o).
I got rid of this error by modifying my libtool script around line 2800:
# Get the name of the library we link against.
linklib=
for l in $old_library $library_names; do
linklib="$l"
done
if test -z "$linklib"; then
$echo "$modename: cannot find name of link library for
\`$lib'" 1>&2
exit $EXIT_FAILURE
fi
# HACK NOT TO LINK linklib AGAINST crti.o # MODIFIED (ADDED)
found_libfusion="no"
linklib=$linklib\ -nostartfiles # MODIFIED (ADDED)
echo "[ $LINENO ] --> linklib: $linklib" # MODIFIED (ADDED)
# This library was specified with -dlopen.
if test "$pass" = dlopen; then
if test -z "$libdir"; then
(etc...)
This removed crti.o from the linking process... I hope it works.
Now I have another - more annoying - error when making
libdirectfb-1.2.so.0.3.0:
/opt/arc-uclibc-candidate8/bin/arc-linux-uclibc-gcc -shared
.libs/directfb.o .libs/idirectfb.o -Wl,--whole-archive
display/.libs/libdirectfb_display.a media/.libs/libdirectfb_media.a
windows/.libs/libdirectfb_windows.a input/.libs/libdirectfb_input.a
misc/.libs/libdirectfb_misc.a gfx/.libs/libdirectfb_gfx.a
core/.libs/libdirectfb_core.a -Wl,--no-whole-archive -Wl,--rpath
-Wl,/home/piero/vixs/DirectFB-1.2.3/lib/direct/.libs -Wl,--rpath
-Wl,/home/piero/vixs/DirectFB-1.2.3/lib/fusion/.libs -Wl,--rpath
-Wl,/home/piero/vixs/staging/lib -L/opt/arc-uclibc-candidate8/lib -lz
-nostartfiles ../lib/direct/.libs/libdirect.so
../lib/fusion/.libs/libfusion.so -ldl -lpthread -Wl,-soname
-Wl,libdirectfb-1.2.so.0 -o .libs/libdirectfb-1.2.so.0.3.0
../lib/fusion/.libs/libfusion.so: In function `direct_debug_exit':
(.text+0x5c08): multiple definition of `direct_debug_exit'
../lib/direct/.libs/libdirect.so:(.text+0x198c): first defined here
../lib/fusion/.libs/libfusion.so: In function `direct_thread_set_name':
(.text+0x10f04): multiple definition of `direct_thread_set_name'
../lib/direct/.libs/libdirect.so:(.text+0xcc88): first defined here
../lib/fusion/.libs/libfusion.so: In function `direct_trace_print_stack':
(.text+0xfea4): multiple definition of `direct_trace_print_stack'
../lib/direct/.libs/libdirect.so:(.text+0xbc28): first defined here
../lib/fusion/.libs/libfusion.so: In function `direct_thread_cancel':
(.text+0x10a48): multiple definition of `direct_thread_cancel'
../lib/direct/.libs/libdirect.so:(.text+0xc7cc): first defined here
../lib/fusion/.libs/libfusion.so: In function `direct_tree_lookup':
(.text+0x10570): multiple definition of `direct_tree_lookup'
../lib/direct/.libs/libdirect.so:(.text+0xc2f4): first defined here
../lib/fusion/.libs/libfusion.so: In function `direct_hash_create':
(.text+0x66c0): multiple definition of `direct_hash_create'
../lib/direct/.libs/libdirect.so:(.text+0x2444): first defined here
../lib/fusion/.libs/libfusion.so: In function `__divdi3':
(.text+0x12974): multiple definition of `__divdi3'
../lib/direct/.libs/libdirect.so:/tmp/candidate8/gcc/build/gcc/../../src/gcc/libgcc2.c:1063:
first defined here
../lib/fusion/.libs/libfusion.so: In function
`direct_modules_explore_directory':
(.text+0x971c): multiple definition of `direct_modules_explore_directory'
../lib/direct/.libs/libdirect.so:(.text+0x54a0): first defined here
../lib/fusion/.libs/libfusion.so: In function `__SDATA_BEGIN__':
(.bss+0x0): multiple definition of `stdout'
[continues........]
So here's the situation:
sources + crti.o => libdirect.so [MADE]
sources + (crti.o) + libdirect.so => libfusion.so [FIXED
ERRORS]
sources + (crti.o) + libdirect.so + libfusion.so => libdirectfb.so [ERRORS!]
Any suggestion on how can I fix this errors?
Regards,
Piero
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev