Time for 0.9.29-pre1.
Heikki Lindholm
holindho at cs.helsinki.fi
Sat Apr 14 17:07:34 UTC 2007
Rob Landley kirjoitti:
> On Friday 13 April 2007 8:31 am, Heikki Lindholm wrote:
>
>>Rob Landley kirjoitti:
>>
>>>Hey mike. I just put an unofficial 0.9.29-pre1 (svn 18418) at
>>>http://uclibc.org/~landley/uClibc-0.9.29-pre1.tar.bz2
>>>
>>>The unofficial release message is "Ok, there's still bugs in this, but
>
> they're
>
>>>a known, finite set of bugs. Please tell us what they are before we
>
> release
>
>>>the final version."
>>
>>Maybe this'd be good spot to ask: which thread config is supposed to
>>work with .29?
>
>
> My config is using:
>
> UCLIBC_HAS_THREADS=y
> LINUXTHREADS_OLD=y
>
>
>>I remember trying LINUXTHREADS some weeks ago, but any
>>program even linked with -lpthread died instantly on load -> I quickly
>>went back to .28.
>
>
> Let's see, the threaded version of hello world is:
>
> #define __REENTRANT
> #include <pthread.h>
> #include <stdio.h>
>
> void *threadhello(void *unused)
> {
> printf("Hello, world!\n");
> return 0;
> }
>
> int main()
> {
> pthread_t thready;
> pthread_create(&thready, NULL, &threadhello, NULL);
> usleep(10);
> }
>
> Then go:
>
> gcc hello-thread.c -lpthread
> ./a.out
>
> And it says:
>
> Hello, world!
>
> Working for me. You can reproduce my build environment at
> http://landley.net/code/firmware (prebuilt images in downloads/image although
> you'll need to "ln -s /tools/lib /lib" before you can run anything you build.
> I believe downloads/README tells you about that...)
Thanks! Encouraged by this, I built a simple rootfs using buildroot with
same versions of just about everything as your firmware linux. To my
surprise, LINUXTHREADS_OLD=y did work after I first built the toolchain
on an x86 linux box - my previous darwin ppc hosted toolchain was then
hosed, I think, although, uClibc .28.3 worked fine built by it.
I'd also like to have pthread_rwlock_timed* functions, which only exist with
UCLIBC_HAS_THREADS=y
# PTHREADS_DEBUG_SUPPORT is not set
# LINUXTHREADS_OLD is not set
config. Building uClibc with that config already gave two errors:
1.
./libpthread/linuxthreads/sysdeps/i386/i686/../useldt.h:25:20: error:
sysdep.h: No such file or directory
- commented out #include <sysdep.h>
2.
In file included from libpthread/linuxthreads/forward.c:27:
libpthread/linuxthreads/internals.h: In function 'check_thread_self':
libpthread/linuxthreads/internals.h:550: error: '__NR_set_thread_area'
undeclared (first use in this function)
libpthread/linuxthreads/internals.h:550: error: (Each undeclared
identifier is reported only once
libpthread/linuxthreads/internals.h:550: error: for each function it
appears in.)
make[2]: *** [libpthread/linuxthreads/forward.oS] Error 1
- added #include <sys/syscall.h>
After a succesful build, however, trying the above hello-thread results
a segfault. So, should I infer from this that LINUXTHREADS_OLD=y is the
only valid uClibc .29 thread config?
-- Heikki Lindholm
More information about the uClibc
mailing list