Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Solaris Thread Problem

by crackotter (Beadle)
on Feb 06, 2003 at 07:05 UTC ( [id://233070]=perlquestion: print w/replies, xml ) Need Help??

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

I wrote a new little threading script on my Linux box, but when I tried to run it on my Solaris 8 sparc box, I had realized that I forgot the "Thread::Pool" module I was using. I tried to install it with CPAN and I had problems. The package just would not install. The Perl on the Solaris box it the package you get off of www.sunfreeware.com (5.8). Maybe new perl thread are not turned on by default. Do I need to compile my own version?? Any ideas?? (AKA HELP!! hehe)
I am posting a 'perl -V': to see if that will help: bash-2.05# perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuratio +n: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos solaris 5.8 generic_108528-11 sun4u sparc sunw,ultra- +5_10 ' config_args='-Dcc=gcc -B/usr/ccs/bin/' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc -B/usr/ccs/bin/', ccflags ='-fno-strict-aliasing -D_LARGEF +ILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing' ccversion='', gccversion='3.1', gccosandvers='solaris2.8' 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, prototype=define Linker and Libraries: ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lgdbm -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under solaris Compiled at Jul 22 2002 02:55:19 @INC: /usr/local/lib/perl5/5.8.0/sun4-solaris /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl

update (broquaint): <pre> -> <code>

Replies are listed 'Best First'.
Re: Solaris Thread Problem
by Zaxo (Archbishop) on Feb 06, 2003 at 07:29 UTC
    usethreads=undef use5005threads=undef useithreads=undef

    That says yes, recompile with threads enabled.

    After Compline,
    Zaxo

      I recompiled, and everything is running beautifully. My box is a netra T with dual proccesers and 2GB of RAM .. got 8 of them I got to recompile tonight infact. Thank you for the suggestions everyone. I increased the thread count from 10 to 100 and the script is running great.
Re: Solaris Thread Problem
by l2kashe (Deacon) on Feb 06, 2003 at 09:32 UTC
    Ive been bangin away on Solaris for a few years now. Getting functionality is fairly easy nowadays via the packages off of sunfreeware.com. Getting all the functionality you need, or optimizations you need isn't easy nor painless yet, and I doubt will be in the forseeable future. Simply due to the breadth of Sun's customer base. Since the threading is still considered 'beta' (someone correct me if im wrong there) they more than likely wont roll it out on their enterprise OS.

    Moral of the story: once bitten twice shy. I have found it better when rolling something out for devel or production on a Solaris system, if that something isn't directly built into the OS, to grab the software from the originating source and recompile. Then build my own package to distribute to client hosts.

    On a side note if anyone can get Net::SSH::Perl to install (with all dependancies) and run 100% consistantly on Solaris 2.7 -> 2.9 I would love to hear how you did it. I attempted it and my code would die, gathering entropy, opening devices, all sorts of whacky stuff, but on Linuxs and FreeBSD module works great.

    /* And the Creator, against his better judgement, wrote man.c */
      I've had Net::SSH::Perl running on a 2.7 box for a while now. It was a pre-requisite for Net::SFTP which I use heavily. As I recall, Net::SSH::Perl was a bit of a pain to install (because of all the dependancies) but once installed I haven't run into any issues. Are you having problems with the install or with getting your code to work?

      -- vek --
        Getting the code to run consistantly. It runs sometimes, and fails other times. If it failed the same way it wouldn't be an issue, but it doesn't. Sometimes is cant collect entropy from /dev/random, or /dev/egd-pool (I have tested both with EGD running, as well as patching the kernel to provide native entropy), other times it fails creating the socket, other times it runs great for 3 hosts and will just die on the 4, etc.. If you turn around and run the code again as soon as it dies, sometimes it works all the way through, other times it will fail earlier, etc..

        The absolute worse kind of problem. I simply ported the functoinality over to a FreeBSD box, and things are happy now, but I hate not know why it won't run.

        /* And the Creator, against his better judgement, wrote man.c */

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://233070]
Approved by joe++
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-25 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found