[uClinux-dev] Problem with uclinux-dist-20030305

Jay Vaughan jv at access-music.de
Tue Mar 18 11:03:43 EST 2003


Out of the box, the uclinux-dist-20030305, configured plain vanilla 
for MCF5272 (Motorola Eval board), produces this error when compiling 
the threaddemos:

---------------------------------------------
dev_j:/opt/uClinux-dist # make user/threaddemos_only
[ ! -d "user/threaddemos" ] || make ARCH=m68knommu 
CROSS_COMPILE=m68k-elf- -C user/threaddemos
make[1]: Entering directory `/opt/uClinux-dist/user/threaddemos'
m68k-elf-gcc -m5307 -DCONFIG_COLDFIRE  -o thdm thdm.o
/usr/local/m68k-elf/lib/m5307/crt0.o: In function `_start':
/usr/local/m68k-elf/lib/m5307/crt0.o(.text+0x8): undefined reference 
to `__uClibc_main'
thdm.o: In function `thread_code':
/opt/uClinux-dist/user/threaddemos/thdm.c:12: undefined reference to 
`_current_shared_library_a5_offset_'
/opt/uClinux-dist/user/threaddemos/thdm.c:16: undefined reference to 
`sched_yield'
/opt/uClinux-dist/user/threaddemos/thdm.c:18: undefined reference to 
`pthread_exit'
thdm.o: In function `main':
/opt/uClinux-dist/user/threaddemos/thdm.c:22: undefined reference to 
`_current_shared_library_a5_offset_'
/opt/uClinux-dist/user/threaddemos/thdm.c:31: undefined reference to 
`pthread_create'
/opt/uClinux-dist/user/threaddemos/thdm.c:33: undefined reference to `sleep'
/opt/uClinux-dist/user/threaddemos/thdm.c:36: undefined reference to 
`pthread_join'
/opt/uClinux-dist/user/threaddemos/thdm.c:38: undefined reference to `printf'
/usr/local/lib/gcc-lib/m68k-elf/2.95.3/m5307/libgcc.a(__main.o): In 
function `__do_global_ctors':
/home/davidm/work/uclinux-elf-tools/m68k-elf-gcc/gcc/../../gcc-2.95.3/gcc/libgcc2.c(.text+0x36): 
undefined reference to `__CTOR_LIST__'
/home/davidm/work/uclinux-elf-tools/m68k-elf-gcc/gcc/../../gcc-2.95.3/gcc/libgcc2.c(.text+0x4c): 
undefined reference to `__CTOR_LIST__'
/home/davidm/work/uclinux-elf-tools/m68k-elf-gcc/gcc/../../gcc-2.95.3/gcc/libgcc2.c(.text+0x54): 
undefined reference to `__CTOR_LIST__'
/usr/local/lib/gcc-lib/m68k-elf/2.95.3/m5307/libgcc.a(__main.o): In 
function `__do_global_dtors':
/home/davidm/work/uclinux-elf-tools/m68k-elf-gcc/gcc/../../gcc-2.95.3/gcc/libgcc2.c(.data+0x0): 
undefined reference to `__DTOR_LIST__'
collect2: ld returned 1 exit status
make[1]: *** [thdm] Error 1
make[1]: Leaving directory `/opt/uClinux-dist/user/threaddemos'
make: *** [user/threaddemos_only] Error 2
dev_j:/opt/uClinux-dist #
--------------------------------------------------------------

Working POSIX threads on 5272 has *always* been a pain in the ass for 
me, as far as uClinux is concerned.  One of these days, the -dist 
releases will *just work* for libpthreads/m5272, but until then I'm 
compelled to be stupid about it and just ask you guys, since there 
always seem to be hidden gotchas.

Maybe I've just not configured something properly with this release, 
but what I did was a) download the tarball, b) make menuconfig to set 
things up exactly as I had them in my older (-20030226) uClinux 
system, c) 'make dep ; make' ...

Seems to me one of the big reasons for this release was to make 
libpthread available for 5272 users wanting to take advantage of the 
XIP fixes also done as part of the m68k-elf-tools-20030314.sh 
release, but alas ... threads are *still* broken, config-wise, with 
this -dist.

It would appear, anyway.  Please correct me if I'm completely missing 
something ...


-- 

;

Jay Vaughan
r&d>>music:technology:synthesizers - www.access-music.de/



More information about the uClinux-dev mailing list