Linking problems with pthread
Thomas Ritter
th.ritter at gmx.at
Thu Feb 2 23:22:30 UTC 2006
Reversing the order (I do static linking) fixed my problem:
... -lc -lpthread -lc
Thnx,
Tom
> -----Original Message-----
> From: Peter S. Mazinger [mailto:ps.m at gmx.net]
> Sent: Thursday, February 02, 2006 2:48 PM
> To: Khem Raj
> Cc: Thomas Ritter; uclibc at uclibc.org
> Subject: Re: Linking problems with pthread
>
> On Wed, 1 Feb 2006, Peter S. Mazinger wrote:
>
> > On Wed, 1 Feb 2006, Khem Raj wrote:
> >
> > > Peter S. Mazinger said the following on 02/01/2006 10:17 AM:
> > > > On Wed, 1 Feb 2006, Peter S. Mazinger wrote:
> > > >
> > > >
> > > >> On Wed, 1 Feb 2006, Thomas Ritter wrote:
> > > >>
> > > >>
> > > >>> Hi,
> > > >>>
> > > >>> I tried to use the latest version of uClibc (from
> svn) and ran into a
> > > >>> linking problem.
> > > >>> I have an application (C++) linked with pthread lib -
> and get "multiple
> > > >>> definition" errors:
> > > >>> sigaction, nanosleep, waitpid, __errno_location,
> __h_errno_location
> > > >>>
> > > >>> Gcc is 3.4.5 built form buildroot, and uClibc is
> build with "old" pthread.
> > > >>> With uClibc 0.9.27 the app links fine.
> > > >>>
> > > >>> Any hints what I can fix ?
> > > >>>
> > > >>> Regards,
> > > >>> Thomas
> > > >>>
> > > >> update uClibc to current svn, if it fails, then we/me
> are in great trouble
> > > >> ;-(
> > > >>
> > > >
> > > > I was wrong, if libpthread.a libc.a is the order, it
> fails, reverse it, it
> > > > will work (for now), I don't know yet why this happens
> > > >
> > > Mosltly due to some weak aliased being turned into strong
> aliased might
> > > have slipped in double definitions.
> >
> > It's rather the use of hidden_proto/def within libc.a as
> well (glibc uses
> > it only for libc.so), those listed (I hope I catched all of
> them) were
> > converted to weak_alias within libc.so some days ago.
> > The shared libs do not have trouble w/ each other.
>
> hope I solved it in svn
>
> Peter
>
> --
> Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
> Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
>
More information about the uClibc
mailing list