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

I've downloaded the source code for perl 5.14.0 to a 64-bit Sun Solaris machine and have run Configure –Dusethreads followed by make. I keep getting a compile-time error on the threads.xs file at line 1330, which is about where the definition of void ithread_yield(...) begins. Seems that the token called YIELD is not previously defined and minnie perl doesn't know what to make of it. Is this a recognized problem for which there is a fix? If I don't specify a threading version of perl I get a clean compile, but I'd really like to have threading. Much thanks in advance.

Replies are listed 'Best First'.
Re: threads.xs compile error
by Anonymous Monk on May 26, 2011 at 04:51 UTC
    By the way, I ran through exactly the same process with the perl-5.12.3 source code bundle and it worked flawlessly.
Re: threads.xs compile error
by Argel (Prior) on Jun 01, 2011 at 16:41 UTC
    Have you looked at the README.solaris file (I assume 5.14 has one just like 5.10.1 did)? And I assume you are using /usr/sfw/bin/gcc?

    Using tcsh, this is the environment I setup before building Perl 5.10.1 a couple years ago. Maybe it will help you. For bash, use export VAR="VALUE" instead.

    setenv PATH /usr/sbin:/sbin:/usr/bin:/usr/sfw/bin:/usr/sfw/libexec:/us +r/ccs/bin:. setenv LD_LIBRARY_PATH /usr/lib:/usr/sfw/lib:/usr/local/ssl/lib setenv LD_LIBRARY_PATH_64 /usr/lib/sparcv9:/usr/sfw/lib/sparcv9 setenv MANPATH /usr/share/man:/usr/sfw/man unalias *
    And below is my myconfig file (again, from Perl 5.10.1). I would suggest you compare your 5.12 and my 5.10.1 stuff with your 5.14 stuff to see what's different.

    Elda Taluta; Sarks Sark; Ark Arks
    My deviantART gallery

Re: threads.xs compile error
by locked_user sundialsvc4 (Abbot) on May 26, 2011 at 11:57 UTC

    Please join the party ... don't be “Anonymous,” Monk!

    Can you try a slightly earlier version of Perl, as a workaround?

    Clearly, configure (with the options you have selected) is not picking-up on the threading system that your system is using.   Sometimes I find it helpful to actually browse a configure script with a text editor, and/or with grep, just to get some sense of what it is doing and maybe to help me “stumble upon” the right bit of arcana that is needed to push me past a particular roadblock.

      A saner approach is to read one of the various README/INSTALL files, and try specifying some options, like thread related options, or debugging related options

        We are all rather conditioned, sometimes, to assume that configure will manage to figure things out for themselves, as they so often do.   But, the underlying threading-support in Unix/Linux systems is not the least bit consistent.   (I know of at least three ways that threading is done in commonly deployed versions of Linux ... very annoying.)   When you do discover the Magick Word that is needed here, please do follow-up to this thread, so that no one else loses hair.

Re: threads.xs compile error
by Anonymous Monk on Mar 01, 2013 at 21:21 UTC
    Same error happens for me on Red Hat Enterprise Linux Server release 6.2 (Santiago) Perl 5.16.2 and gcc 4.4.3