View previous topic :: View next topic |
Author |
Message |
zephred n00b
Joined: 09 Nov 2002 Posts: 43 Location: Paris - France
|
Posted: Wed Jan 08, 2003 6:36 pm Post subject: broken pthread |
|
|
Hello all,
The pthread library does not seem to work with gcc version 3.2.1 and glibc-2.3.1-r2. This simple program (used in some configure test):
Code: |
#include <pthread.h>
void* func(void *arg) { return arg; }
int main(void) { pthread_t tid; return pthread_create (&tid, NULL, func, (void *)NULL) ; }
|
compiled with gcc -pthread (and/or -lpthread) returns 11 (EAGAIN) instead of 0;
The new glib then cannot compile, as mplayer.
Could someone help me with this ?
Thanks.
Fred. |
|
Back to top |
|
|
zephred n00b
Joined: 09 Nov 2002 Posts: 43 Location: Paris - France
|
Posted: Tue Jan 14, 2003 7:10 pm Post subject: |
|
|
Update (14/01/03) : I am still stuck with this problem, and do not want to update any new package before to have solved it...
The above exemple returns a proper 0 if I use a libpthread.a taken from the Mandrake 9.0 tree.
I tried to recompile the kernel (xfs-sources), removing the CONFIG_SMP=y (no need on a mono proc), then recompile glibc and gcc without any success...
Could at least someone try to compile the above test and tell me the result ?
Thanx,
Fred. |
|
Back to top |
|
|
wormie n00b
Joined: 24 Aug 2002 Posts: 36
|
Posted: Wed Jan 15, 2003 3:51 am Post subject: |
|
|
This code returns 0 for me, both with -pthread and -lpthread.
I'm using the same gcc & glibc, with gentoo-sources 2.4.19-r10. |
|
Back to top |
|
|
zephred n00b
Joined: 09 Nov 2002 Posts: 43 Location: Paris - France
|
Posted: Tue Jan 21, 2003 3:13 am Post subject: |
|
|
Thanks wormie for your test.
I appear to be the only one to have this problem, but I'll post anyway how I got out.
I edited the glibc-2.3.1-r2.ebuild to remove --enable-kernel=2.4.0 from the configure options, and commented out lines :
myconf="${myconf} --without-tls --without-__thread"
--with-gd=no
--without-cvs
--disable-profile
I set : --enable-add-ons --disable-sanity-checks
I now have threads available.
Fred. |
|
Back to top |
|
|
thomasjb Apprentice
Joined: 26 May 2002 Posts: 176 Location: Beijing
|
Posted: Sun Feb 23, 2003 2:13 pm Post subject: |
|
|
zephred, i'm having the exact same problem as you. stumbled across it recently, when i tried to emerge ksplash-lm, mrproject and prozilla https://forums.gentoo.org/viewtopic.php?t=36977&highlight=. never ran into this problem before. i couldn't really say when it started and have no idea why. i'm glad you were able to get rid of the problem. could you please be so kind and let me know what your changes to the glibc ebuild actually do? thanks, i'd really appreciate it. |
|
Back to top |
|
|
zephred n00b
Joined: 09 Nov 2002 Posts: 43 Location: Paris - France
|
Posted: Mon Feb 24, 2003 12:07 pm Post subject: |
|
|
Hi Thomas.
You'll find the ebuild I used there :
http://www2.iap.fr/users/magnard/glibc-2.3.1-r2.ebuild .
As I can remember, what made threads finally work was to get rid of --enable-kernel=2.4.0 , than is supposed to produce a code more optimized for 2.4 kernel family.
--disable-sanity-checks was asked at configure time, I don't remember why. The best way to solve this kind of problem is to manually untar and configure the package.
Threads are really usefull, and mandatory for stuffs like prozilla !
Good luck !
Fred. |
|
Back to top |
|
|
thomasjb Apprentice
Joined: 26 May 2002 Posts: 176 Location: Beijing
|
Posted: Mon Feb 24, 2003 2:57 pm Post subject: |
|
|
thanks a lot, fred. i really appreciate your help! |
|
Back to top |
|
|
thomasjb Apprentice
Joined: 26 May 2002 Posts: 176 Location: Beijing
|
Posted: Tue Feb 25, 2003 4:01 am Post subject: |
|
|
short update, fred. didn't get arount to use your ebuild the last couple days, and when i finally did an -u world last night, new versions of gcc and glibc got emerged. funny enough, with the new versions all apps that i couldn't get to compile before compile fine now. oh, well ... |
|
Back to top |
|
|
zephred n00b
Joined: 09 Nov 2002 Posts: 43 Location: Paris - France
|
Posted: Tue Feb 25, 2003 10:04 am Post subject: |
|
|
Interesting... The latest ebuild available for glibc seems to be 2.3.1-r2 except 2.3.2_pre1 which still has ~x86. Is that the one you emerged ? Did you try to run the little program I gave at the beginning of this thread ? Its exit status ($status on csh) should be 0. |
|
Back to top |
|
|
thomasjb Apprentice
Joined: 26 May 2002 Posts: 176 Location: Beijing
|
Posted: Tue Feb 25, 2003 5:33 pm Post subject: |
|
|
the one i emerged is 2.3.2_pre1. i didn't try the program you gave at the beginning of the thread, but with 2.3.2_pre1 emerged all the apps that wouldn't compile before compiled fine.
i'll try the program and let you know. |
|
Back to top |
|
|
nemiak n00b
Joined: 04 Feb 2003 Posts: 19
|
Posted: Mon Mar 10, 2003 10:23 pm Post subject: |
|
|
I find that pthreads breaks when i upgrade to glibc 2.3.2.
Should i post a bugreport? |
|
Back to top |
|
|
|