__cxa_atexit and __cxa_finalize implementation

Stephen Warren swarren at wwwdotorg.org
Sun Sep 25 03:32:10 UTC 2005


Stephen Warren wrote:
> If I manually create the libc/libc.so file with appropriate content, and 
> create a new uClibc source tarball with this file, and give that as 
> input to buildroot, the things start building. I'll let you know what 
> happens once it's finished!

Hard-coding stuff doesn't seem to work (I guess at least partially 
because buildroot runs uClibc's make with a number of times, sometimes 
with different values for e.g. DEVEL_PREFIX. I'll see if I can take a 
look at hooking up the dependencies tomorrow if you haven't.

The strange this is, the build fails linking libdl.so, links against 
libc using "-lc". However, by that time, there is no libc.so.0 nor 
uclibc_nonshared.a for the libc.so to reference?! I guess I'll have to 
compare a working build log from a completely unpatched build to see how 
this would usually work, and where things diverge...

FYI, here's the end of a (sorry, badly formatted!) failing build log, 
just in case you can see something obvious here:

/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/build_i486/staging_dir/bin/i486-linux-uclibc-gcc 
  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing 
-march=i486  -fno-builtin -nostdinc
  -D_LIBC -I../../include -I.  -mpreferred-stack-boundary=2 
-falign-jumps=0 -falign-loops=0 -Os -funit-at-a-time   -isystem 
/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/build_i486/staging_dir/li
b/gcc/i486-linux-uclibc/3.4.3/include -DNDEBUG -fPIC 
-I../../libpthread/linuxthreads/sysdeps/pthread 
-I../../libpthread/linuxthreads/sysdeps/i386 
-I../../libc/sysdeps/linux/i386 -DLIBPTHREAD_SO="\"lib
pthread.so.0\"" -c td_thr_tls_get_addr.c -o td_thr_tls_get_addr.o
/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/build_i486/staging_dir/bin/i486-linux-uclibc-strip 
-x -R .note -R .comment td_thr_tls_get_addr.o
/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/build_i486/staging_dir/bin/i486-linux-uclibc-ar 
cr ../libthread_db.a td_init.o td_log.o td_ta_delete.o 
td_ta_get_nthreads.o td_ta_get_ph.o td_ta_map
_id2thr.o td_ta_map_lwp2thr.o td_ta_new.o td_ta_thr_iter.o 
td_ta_tsd_iter.o td_thr_get_info.o td_thr_getfpregs.o td_thr_getgregs.o 
td_thr_getxregs.o td_thr_getxregsize.o td_thr_setfpregs.o td_thr_setg
regs.o td_thr_setprio.o td_thr_setsigpending.o td_thr_setxregs.o 
td_thr_sigsetmask.o td_thr_tsd.o td_thr_validate.o td_thr_dbsuspend.o 
td_thr_dbresume.o td_ta_setconcurrency.o td_ta_enable_stats.o td_
ta_reset_stats.o td_ta_get_stats.o td_ta_event_addr.o 
td_thr_event_enable.o td_thr_set_event.o td_thr_clear_event.o 
td_thr_event_getmsg.o td_ta_set_event.o td_ta_event_getmsg.o 
td_ta_clear_event.o td_
symbol_list.o td_thr_tls_get_addr.o
make[3]: Leaving directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/libpthread/linuxthreads_db'
install -d ../lib
rm -f ../lib/libpthread.a
install -m 644 libpthread.a ../lib
install -d ../lib
rm -f ../lib/libthread_db.a
install -m 644 libthread_db.a ../lib
make[2]: Leaving directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/libpthread'

Building shared libraries ...

make -C  ldso shared
make[2]: Entering directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/ldso'
make -C ldso
make[3]: Entering directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/ldso/ldso'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/ldso/ldso'
make -C libdl
make[3]: Entering directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/ldso/libdl'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/ldso/libdl'
make -C libdl shared
make[3]: Entering directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/ldso/libdl'
/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/build_i486/staging_dir/bin/i486-linux-uclibc-ld 
  -shared --warn-common --warn-once -z combreloc -z defs -s 
-soname=libdl.so.0 \
-o libdl-0.9.28.so -fini dl_cleanup --whole-archive libdl_pic.a \
--no-whole-archive ../..//libc/misc/internals/interp.o \
-L../..//lib -lc  ../../lib/ld-uClibc.so.0 
/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/build_i486/staging_dir/lib/gcc/i486-linux-uclibc/3.4.3/libgcc.a;
/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/build_i486/staging_dir/bin/i486-linux-uclibc-ld: 
cannot find /lib/libc.so.0
make[3]: *** [shared] Error 1
make[3]: Leaving directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/ldso/libdl'
make[2]: *** [shared] Error 2
make[2]: Leaving directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/ldso'
make[1]: *** [_shared_dir_ldso] Error 2
make[1]: Leaving directory 
`/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn'
make: *** 
[/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn/toolchain_build_i486/uClibc-svn/lib/libc.a] 
Error 2

SEVERN:/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn$
find -name '*.so'
./toolchain_build_i486/uClibc-svn/lib/libc.so
./toolchain_build_i486/uClibc-svn/lib/ld-uClibc-0.9.28.so
./toolchain_build_i486/uClibc-svn/ldso/ldso/ld-uClibc-0.9.28.so
./toolchain_build_i486/uClibc_dev/usr/lib/libc.so
./toolchain_build_i486/uClibc_dev/usr/lib/libthread_db.so

SEVERN:/mnt/severn_home_nobackup/swarren/tmp/buildroot-svn$
find -name '*.a'|grep nonshared
<<finds nothing>>

-- 
Stephen Warren, Software Engineer, NVIDIA, Fort Collins, CO
swarren at wwwdotorg.org     http://www.wwwdotorg.org/pgp.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20050924/436782cc/attachment.pgp 


More information about the uClibc mailing list