Perl ithreads ... not installed

Discussion in 'Mac Programming' started by OneDreamCloser, Apr 8, 2011.

  1. macrumors member

    Joined:
    Jun 16, 2008
    #1
    hello all,

    i am running Mac OS X 10.6.7 (Snow Leopard), and when i type
    "perl -V" at the Terminal.app,
    it says that "usethreads=undef".

    i did install "threads" from CPAN, but in vain.
    do you have any ideas, how can i fix this ?

    thank you
     
  2. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    Under my Mac OS X 10.6.7 my system standard perls have useithread=define.

    Output of /usr/bin/perl -V (same as /usr/bin/perl/5.10.0 -V)
    Code:
    Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
      Platform:
        osname=darwin, osvers=10.0, archname=darwin-thread-multi-2level
        uname='darwin neige.apple.com 10.0 darwin kernel version 10.0.0d8: tue may 5 19:29:59 pdt 2009; root:xnu-1437.2~2release_i386 i386 '
        config_args='-ds -e -Dprefix=/usr -Dccflags=-g  -pipe  -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=gcc-4.2'
        hint=recommended, useposix=true, d_sigaction=define
        [color=red]useithreads=define[/color], usemultiplicity=define
        useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
        use64bitint=define, use64bitall=define, uselongdouble=undef
        usemymalloc=n, bincompat5005=undef
    [I][COLOR="DimGray"](etc.)[/COLOR][/I]
    
    The output of /usr/bin/perl5.8.9 -V is the similar.

    What is the output when you run the command below in Terminal?
    Code:
    which perl
    
    If it's not /usr/bin/perl, you've installed another perl that hasn't been compiled with threads, perhaps via MacPorts.

    If you did install a perl via MacPorts, by default it won't compile perl with threads. You need to install the threads variant with a command like the one below.

    Code:
    port install perl5 +threads
    
     
  3. OneDreamCloser, Apr 8, 2011
    Last edited: Apr 8, 2011

    thread starter macrumors member

    Joined:
    Jun 16, 2008
    #3
    thanx jiminaus,

    when i typed
    Code:
    which perl
    /opt/local/bin/perl
    i tried to update that with macports, macports failed to do that.

    so now,when i type
    Code:
    which perl
    /usr/bin/perl
    and when i type "/usr/bin/perl -V" it says that "useithreads=define"
    so we are ok now.

    but, the command "perl -V" instead of "/usr/bin/perl -V"
    it says
    Code:
    /opt/local/bin/perl: No such file or directory
    so, could you please tell me how i can point to the perl implementation installed in
    Code:
    /usr/bin/perl
    instead of returning me the macports location ?

    thanx a lot
     
  4. jiminaus, Apr 9, 2011
    Last edited: Apr 9, 2011

    macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    If perl -V is still trying to invoke /opt/local/bin/perl it's because bash still has that lookup cached. Either run hash -r or simply close the current Terminal window and open a new one.

    But if neither of these work, perhaps /usr/bin/perl as been overwritten. What is the output of ls -ld /usr/bin/perl? For me it this,

    Code:
    [b]~$[/b] ls -ld /usr/bin/perl
    -rwxr-xr-x  1 root  wheel  86000 24 Jun  2009 /usr/bin/perl
    
     
  5. thread starter macrumors member

    Joined:
    Jun 16, 2008

Share This Page