spideyct has asked for the wisdom of the Perl Monks concerning the following question:

Well, when I try to "use threads;" in my program, I get an error saying it can not find the threads.pm module. Isn't that installed normally with Perl if ithreads is compiled with it? Below is the info on my setting.
$ perl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuratio +n: Platform: osname=solaris, osvers=2.6, archname=sun4-solaris-thread-multi uname='sunos sparky 5.6 generic_105181-35 sun4u sparc sunw,ultra-5 +_10 ' config_args='-des -Dcc=gcc -Dcf_by=ActiveState -Dcf_email=ActivePe +rl@ActiveState.com -Uinstallusrbinperl -Ud_sigsetjmp -Dusethreads -Du +seithreads -Ulocincpth= -Uloclibpth= -Dprefix=/usr/local/ActivePerl-5 +.6 -Dinc_version_list=5.6.0/$archname 5.6.0' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemulti +plicity=define useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-DUSE_REENTRANT_API -D_POSIX_PTHREAD_SEMANTICS + -D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET +_BITS=64', optimize='-O', cppflags='-DUSE_REENTRANT_API -D_POSIX_PTHREAD_SEMANTICS -D_REENTR +ANT -fno-strict-aliasing' ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers +='solaris2.6' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' ' libpth=/usr/lib /usr/ccs/lib /usr/local/lib libs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc perllibs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL +_IMPLICIT_CONTEXT Locally applied patches: ActivePerl Build 638 Built under solaris Compiled at Apr 13 2004 17:52:47 @INC: /usr/local/ActivePerl-5.6/lib/5.6.1/sun4-solaris-thread-multi /usr/local/ActivePerl-5.6/lib/5.6.1 /usr/local/ActivePerl-5.6/lib/site_perl/5.6.1/sun4-solaris-thread- +multi /usr/local/ActivePerl-5.6/lib/site_perl/5.6.1 /usr/local/ActivePerl-5.6/lib/site_perl . $

Replies are listed 'Best First'.
Re: Thread question
by zentara (Cardinal) on May 01, 2007 at 17:16 UTC
    I may be wrong here, 5.6 is ancient memories for me, but isn't it "use Threads" back in 5.6? Capital T ?

    Upgrade to a recent 5.8 version of Perl, if you want good results with threads.


    I'm not really a human, but I play one on earth. Cogito ergo sum a bum