Perl 5.8.0 binary compilen met thread-support

Pagina: 1
Acties:

  • Glival
  • Registratie: December 1999
  • Laatst online: 06-05 00:14
Als ik een perl-script wil uitvoeren waarin gebruik wordt gemaakt van threads, krijg ik de volgende melding:
This Perl hasn't been configured and built properly for the threads
module to work. (The 'useithreads' configuration option hasn't been used.)

Having threads support requires all of Perl and all of the XS modules in
the Perl installation to be rebuilt, it is not just a question of adding
the threads module. (In other words, threaded and non-threaded Perls
are binary incompatible.)

If you want to the use the threads module, please contact the people
who built your Perl.

Cannot continue, aborting.
Dit terwijl ik toch echt "./Configure -de -Duseithreads" heb uitgevoerd; daarna "make", "make test" en "make install". Bij de "make test" geeft 'ie als output:
ext/Thread/thr5005...................skipping test on this platform
ext/threads/shared/t/0nothread.......skipping test on this platform
ext/threads/shared/t/av_refs.........skipping test on this platform
ext/threads/shared/t/av_simple.......skipping test on this platform
ext/threads/shared/t/cond............skipping test on this platform
ext/threads/shared/t/hv_refs.........skipping test on this platform
ext/threads/shared/t/hv_simple.......skipping test on this platform
ext/threads/shared/t/no_share........skipping test on this platform
ext/threads/shared/t/shared_attr.....skipping test on this platform
ext/threads/shared/t/sv_refs.........skipping test on this platform
ext/threads/shared/t/sv_simple.......skipping test on this platform
ext/threads/t/basic..................skipping test on this platform
ext/threads/t/end....................skipping test on this platform
ext/threads/t/join...................skipping test on this platform
ext/threads/t/libc...................skipping test on this platform
ext/threads/t/list...................skipping test on this platform
ext/threads/t/stress_cv..............skipping test on this platform
ext/threads/t/stress_re..............skipping test on this platform
ext/threads/t/stress_string..........skipping test on this platform
ext/threads/t/thread.................skipping test on this platform
Mist m'n kernel iets wat perl nodig heeft om threads te kunnen gebruiken? Of doe ik gewoon iets verkeerd? :)
Bedankt!

  • odysseus
  • Registratie: Augustus 2000
  • Laatst online: 14:42

odysseus

Debian GNU/Linux Sid

Waarom gebruik je -Duseithreads? Vermoedelijk moet je iets hebben als './configure --useithreads', maar als je het zeker wilt weten dan moet je even de uitvoer van './configure --help' doorkijken :).

Leven is het meervoud van lef | In order to make an apple pie from scratch, you must first create the universe.


  • igmar
  • Registratie: April 2000
  • Laatst online: 20-04 22:06

igmar

ISO20022

Glival schreef op 08 mei 2003 @ 15:32:
Als ik een perl-script wil uitvoeren waarin gebruik wordt gemaakt van threads, krijg ik de volgende melding:

Mist m'n kernel iets wat perl nodig heeft om threads te kunnen gebruiken? Of doe ik gewoon iets verkeerd? :)
Bedankt!
Welk platform ? Indien Linux, welk kernel + glibc versie ?

  • Glival
  • Registratie: December 1999
  • Laatst online: 06-05 00:14
odysseus schreef op 08 mei 2003 @ 15:52:
Waarom gebruik je -Duseithreads? Vermoedelijk moet je iets hebben als './configure --useithreads', maar als je het zeker wilt weten dan moet je even de uitvoer van './configure --help' doorkijken :).
Hmz het moest zijn "-D useithreads" volgens ./Configure --help :)
Maar dan nog vind ik die melding vreemd, omdat 'ie (volgens google :P) "no useithreads" moet zeggen ipv "skipping test on this platform".

Ik nu compile opnieuw.
igmar schreef op 08 mei 2003 @ 15:55:
[...]


Welk platform ? Indien Linux, welk kernel + glibc versie ?
Debian, kernel 2.4.20. Hoe kan ik m'n glibc-versie vinden? Heb je hier wat aan?
server01:~# ls -l /lib/libc.so.*
lrwxrwxrwx 1 root root 13 Apr 11 06:22 /lib/libc.so.6 -> libc-2.2.5.so

  • Glival
  • Registratie: December 1999
  • Laatst online: 06-05 00:14
Glival schreef op 08 May 2003 @ 16:09:
Hmz het moest zijn "-D useithreads" volgens ./Configure --help :)
Maar dan nog vind ik die melding vreemd, omdat 'ie (volgens google :P) "no useithreads" moet zeggen ipv "skipping test on this platform".

Ik nu compile opnieuw.
Helaas, nog steeds fout :(

  • Glival
  • Registratie: December 1999
  • Laatst online: 06-05 00:14
Ok, ik ben nou wat verder, maar krijg nu de volgende foutmeldingen:
server01:/usr/src/perl-5.8.0# make
cc -L/usr/local/lib -o miniperl \
miniperlmain.o opmini.o libperl.a -lnsl -ldl -lm -lc -lcrypt -lutil
opmini.o: In function `Perl_scalar':
opmini.o(.text+0x13ee): undefined reference to `pthread_getspecific'
opmini.o: In function `Perl_list':
opmini.o(.text+0x1aee): undefined reference to `pthread_getspecific'
opmini.o: In function `Perl_load_module_nocontext':
opmini.o(.text+0x5f98): undefined reference to `pthread_getspecific'
libperl.a(perl.o): In function `perl_alloc':
perl.o(.text+0x38): undefined reference to `pthread_key_create'
perl.o(.text+0x7b): undefined reference to `pthread_setspecific'
perl.o(.text+0xc1): undefined reference to `pthread_setspecific'
Plus nog zo'n 50 regels die hier op lijken... iemand een idee?

  • _Squatt_
  • Registratie: Oktober 2000
  • Niet online
Je krijgt undefined references omdat de pthread library niet wordt meegelinkt. In het rijtje: '-lnsl -ldl -lm -lc -lcrypt -lutil' hoort nog een '-lpthread'.

Als je Configure draait kun je op een bepaald moment opgeven tegen welke libraries gelinkt moet worden. Daar moet je dus '-lpthread' toevoegen.

"He took a duck in the face at two hundred and fifty knots."


  • Glival
  • Registratie: December 1999
  • Laatst online: 06-05 00:14
_Squatt_ schreef op 08 mei 2003 @ 22:12:
Je krijgt undefined references omdat de pthread library niet wordt meegelinkt. In het rijtje: '-lnsl -ldl -lm -lc -lcrypt -lutil' hoort nog een '-lpthread'.

Als je Configure draait kun je op een bepaald moment opgeven tegen welke libraries gelinkt moet worden. Daar moet je dus '-lpthread' toevoegen.
Dat was 'm!
Bedankt :)
Pagina: 1