[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Problem linking threads
Hi Keith,
Zambrano, Keith I(GE Infrastructure) wrote:
>
>>Hello List,
>>I am trying to build the latest distribution with threading and having link problems (Full Source Distribution 20040408). I have selected the PTHREAD option using MENUCONFIG on both the uClinux-dist configuration and uClibc. The following is the link error that I get.
>>
>>mb-gcc -Os -g -fomit-frame-pointer -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/kzambrano/src/uClinux-dist/lib/uClibc/include -I/home/kzambrano/src/uClinux-dist/lib/libm -I/home/kzambrano/src/uClinux-dist/lib/libcrypt_old -I/home/kzambrano/src/uClinux-dist -fno-builtin -mno-xl-soft-mul -mno-xl-soft-div -mxl-barrel-shift -I/home/kzambrano/src/uClinux-dist/linux-2.4.x/include -Wl,-elf2flt -nostartfiles /home/kzambrano/src/uClinux-dist/lib/uClibc/lib/crt0.o -nostdlib -L/home/kzambrano/src/uClinux-dist/lib/uClibc/. -L/home/kzambrano/src/uClinux-dist/lib/uClibc/lib -L/home/kzambrano/src/uClinux-dist/lib/libm -L/home/kzambrano/src/uClinux-dist/lib/libnet -L/home/kzambrano/src/uClinux-dist/lib/libdes -L/home/kzambrano/src/uClinux-dist/lib/libaes -L/home/kzambrano/src/uClinux-dist/lib/libpcap -L/home/kzambrano/src/uClinux-dist/lib/libssl -L/home/kzambrano/src/uClinux-dist/lib/libcrypt_old -L/home/kzambrano/src/uClinux-dist/lib/zlib -o plserver plserver.o cipher.o d
es.o tables.o connectctl.o debuglog.o utility.o picctl.o -lc /opt/ublaze/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/./../../../../microblaze/lib/libc_hard_shift.a /opt/ublaze/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/./libgcc.a -Wl,--start-group -Wl,-lc -Wl,-lm -Wl,-lgcc -Wl,--end-group -lc
>>plserver.elf2flt: In function `demoMain':
>>/home/kzambrano/src/uClinux-dist/user/nx590/plserver.c:405: undefined reference to `pthread_create'
>>/home/kzambrano/src/uClinux-dist/user/nx590/plserver.c:405: undefined reference to `pthread_create'
the pthreads library is not linked by default, try adding $(LIBPTHREAD)
to your Makefile build rule, such as:
$(CC) $(LDFLAGS) -o $@ $< $(LIBPTHREAD) $(LDLIBS)
There's also thread demos in the uClinux-dist, in menuconfig ->
customise vendor -> misc apps ->pthread demos.
That should at least build and run cleanly.
Cheers,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/