strange segfault with pthreads in 0.9.28
Peter S. Mazinger
ps.m at gmx.net
Mon May 15 07:39:24 UTC 2006
On Sun, 14 May 2006, Dr. Rupert Mazzucco wrote:
> I'm trying to build a uClibc-based VIA Epia system, and all went well until I ran into a problem building glib - its configure script wouldn't detect posix thread support. And true enough, config.log showed that the test program died with a segmentation violation.
>
> Then I found that this didn't have to do with details of actual thread support, but simply linking something with -lpthread causes the app to segfault. A minimal reproduction is below. Does anybody have an idea what could be causing this?
>
> Thanks,
> Rupert
Something has to be wrong on your site, I am using many apps that are
linked against libpthread and haven't seen this (only if you use
uClibc-svn and the new linuxthreads)
Peter
> # cat > foo.c
> int main() {}
> # gcc foo.c
> # ./a.out
> # gcc foo.c -lpthread
> # ./a.out
> Segmentation fault
> # ldd a.out
> libpthread.so.0 => /lib/libpthread.so.0 (0x40008000)
> libc.so.0 => /lib/libc.so.0 (0x4001a000)
> ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000)
> # gcc -D_REENTRANT foo.c -lpthread
> # ./a.out
> Segmentation fault
> # gcc -v
> Reading specs from /pkg/tools/lib/gcc/i686-linux-uclibc/3.4.6/specs
> Configured with: ../buildroot/toolchain_build_i686/gcc-3.4.6/configure --host=i686-linux-uclibc --prefix=/pkg/tools --enable-shared --enable-threads --disable-nls --with-arch=c3 --with-sysroot=/pkg/uClibc-0.9.28 --enable-languages=c,c++,f77 --disable-__cxa_atexit
>
> (uClibc built with kernel headers from 2.6.16, buildroot snapshot 20060418)
>
>
--
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