LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-15-2003, 08:49 PM   #1
ruchika
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Rep: Reputation: 0
Question Symbol conflict between libc and libpthread


Hi,

I am trying to build a small program that needs both libc and libpthread as follows -

UCLINUXBASE=/usr/local/uClinux
ARMTOOLS=/usr/local/arm-uclinux-tools
CROSS_COMPILE=arm-uclinux
CR_CC=$ARMTOOLS/bin/$CROSS_COMPILE-gcc
CR_LD=$ARMTOOLS/bin/$CROSS_COMPILE-ld
CR_OBJCOPY=$ARMTOOLS/bin/$CROSS_COMPILE-objcopy

$CR_LD -r -T ${ARMTOOLS}/lib/elf2flt.ld \
${UCLINUXBASE}/arm-uclinux/lib/crt0pic.o \
thread.o \
-L${ARMTOOLS}/lib/gcc-lib/arm-uclinux/2.96/soft \
-L${UCLINUXBASE}/arm-uclinux/lib -lpthread -lc -lgcc -m armelf_uclinux \
-o thread.elf

Linker throws the following errors

/usr/local/uClinux//arm-uclinux/lib/libc.a(errno.o): In function '__errno_location': errno.o(.text+0x0): multiple definition of '__errno_location'

/usr/local/uClinux//arm-uclinux/lib/libpthread.a(errno.o)(.text+0x0): firstd efined here

/usr/local/uClinux//arm-uclinux/bin/arm-uclinux-ld: Warning: size of symbol '__errno_location' changed from 100 to 28 in errno.o
Can't open thread.elf

Any clues on why there is a symbol clash between libc and libpthread?

Thanks,
Ruchika
 
Old 09-16-2003, 11:49 PM   #2
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
could you please specify the version and release of the kernel you are using for your compilation....i really doubt if this is the problem but worth a look....
 
Old 09-17-2003, 02:03 AM   #3
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
just as an addon: why are you explicitly linking with libc...i think the compiler(the linker part of it) should be doing it anyway...

have you tried removing the -lc and then compiling it?
 
Old 09-20-2003, 12:12 AM   #4
ram_kb
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
is it solved? or still u r having the same problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
libpthread.so.0? reeseslover531 Linux - Software 1 11-13-2005 05:51 AM
snort failed: snort: symbol lookup error: undefined symbol: usmAES192PrivProtocol Emmanuel_uk Linux - Security 1 07-10-2005 10:29 AM
what's the difference between libpthread.so and libpthread.a? mmiglia Linux - Software 1 09-16-2004 07:53 AM
libc.so verse libc.so.5 markstevens Linux - Software 4 06-19-2003 11:41 AM
UT2003 - anyone know anything about libpthread? kabads Linux - General 1 10-24-2002 09:21 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration