Missing POSIX threads functions in GNU C library.

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Misha
Location: Florence.
Posts: 73
Joined: Mon Nov 22, 2004 4:15 pm

Missing POSIX threads functions in GNU C library.

Mon Jun 20, 2005 2:15 pm

I am using C lib 2.95.23: while it is possible to compile sources using pthread_attr_setattr() or pthread_setschedparam() functions, it is not possible collect them from the library because of undefined references...
Even if I use the due -lpthread compilation flag.

Any idea to solve this problem ?
Other methods to customize thread priority and policy ?

Thank you for your attention.
Onitake
Location: Switzerland
Posts: 18
Joined: Fri Mar 11, 2005 2:46 pm

Mon Jun 27, 2005 2:35 pm

what kind of c library is that?
the gnu libc is at version 2.3.5 and redhat's newlib at 1.13.0.
if you mean the compiler version instead, that has nothing to do with the c library.

if you're on glibc, you have to make sure you've built the linuxthreads in. it's in a separate package which has to be unpacked into the glibc source directory before configuring and building it. if you use precompiled binaries, contact your supplier. he's just forgotten them in that case.

example:
you're using glibc-2.3.5
get the files glibc-2.3.5.tar.bz2 and glibc-linuxthreads-2.3.5.tar.bz2 from the gnu ftp server or a mirror
unpack them:
# tar xvfj glibc-2.3.5.tar.bz2
# cd glibc-2.3.5
# tar xvfj glibc-linuxthreads-2.3.5.tar.bz2
# ./configure --target=arm-unknown-linux-gnu (your-options-here)
# make

or something similar
the configure script automatically detects if extensions (like linuxthreads) are there and builds them in.
Misha
Location: Florence.
Posts: 73
Joined: Mon Nov 22, 2004 4:15 pm

POSIX threads and glibc

Mon Jul 11, 2005 7:06 pm

Many thanks for your help !

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 4 guests