in reply to where are my ithreads II?

I get the same results.
$ sh Configure -de -Dusedevel -Dusethreads Beginning of configuration questions for perl5. [...] Perl can be built to take advantage of threads on some systems. To do so, Configure can be run with -Dusethreads. Note that Perl built with threading support runs slightly slower and uses more memory than plain Perl. The current implementation is believed to be stable, but it is fairly new, and so should be treated with caution. If this doesn't make any sense to you, just accept the default 'n'. Build a threading Perl? [n]

n???

$ perl -Ilib -V:config_args -V:useithreads config_args='-de -Dusedevel -Dusethreads'; useithreads='undef'; $ perl -Ilib -E'use threads; say "threaded"' This Perl not built to support threads Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.

(-Dusedevel is needed here since I'm compiling blead. -Ilib is needed here since I built Perl but didn't install it. In other words, don't worry about those differences.)

Replies are listed 'Best First'.
Re^2: where are my ithreads II?
by ikegami (Patriarch) on Dec 02, 2009 at 18:41 UTC
    Ah-ha! I think it's getting the default from a past run of Configure. When I built from a fresh directory, it worked.
    $ git clean -dxf Removing .config/ Removing DynaLoader.o Removing Makefile Removing Policy.sh Removing UU/ Removing av.o Removing bitcount.h Removing cflags Removing config.h Removing config.sh [...] $ sh Configure -de -Dusedevel -Dusethreads Beginning of configuration questions for perl5. [...] Perl can be built to take advantage of threads on some systems. To do so, Configure can be run with -Dusethreads. Note that Perl built with threading support runs slightly slower and uses more memory than plain Perl. The current implementation is believed to be stable, but it is fairly new, and so should be treated with caution. If this doesn't make any sense to you, just accept the default 'y'. Build a threading Perl? [y] Your platform has some specific hints regarding threaded builds, using + them...
    $ perl -Ilib -V:config_args -V:useithreads config_args='-de -Dusedevel -Dusethreads'; useithreads='define'; $ perl -Ilib -E'use threads; say "threaded"' threaded

    I suspect you could also use Configure's -O option:

    -O : let -D and -U override definitions from loaded configuration fi +le.
Re^2: where are my ithreads II?
by 7stud (Deacon) on Dec 02, 2009 at 19:02 UTC

    Looking over the output from my install, it looks like the default 'n' was chosen--despite the fact that I used the option -Dusethreads:

    ... ... Perl can be built to take advantage of threads on some systems. To do so, Configure can be run with -Dusethreads. Note that Perl built with threading support runs slightly slower and uses more memory than plain Perl. The current implementation is believed to be stable, but it is fairly new, and so should be treated with caution. If this doesn't make any sense to you, just accept the default 'n'. Build a threading Perl? [n] ... ...

      Thanks for the help. I ended up running Configure so that it asks me all the questions:

      $ sh Configure -Dusethreads

      Once I got past the part that asks whether you want to use threads, I did as perl 5.10.1's INSTALL file says,

      At any Configure prompt, you can type &-d and Configure will use the defaults from then on.

      After Configure finished running, I issued the commands: make, make test, and sudo make install, and everything seemed to install fine. Then I wrote a couple of short threading programs, and they worked.

      Here is the interaction I had (a question without a response means I hit Enter to accept the default):

      $ sh Configure -Dusethreads Beginning of configuration questions for perl5. Checking echo to see how to suppress newlines... ...using -n. The star should be here-->* First let's make sure your kit is complete. Checking... Looks good... Would you like to see the instructions? [n] Locating common programs... awk is in /usr/bin/awk. cat is in /bin/cat. chmod is in /bin/chmod. comm is in /usr/bin/comm. cp is in /bin/cp. echo is in /bin/echo. expr is in /bin/expr. grep is in /usr/bin/grep. ls is in /bin/ls. mkdir is in /bin/mkdir. rm is in /bin/rm. sed is in /usr/bin/sed. sort is in /usr/bin/sort. touch is in /usr/bin/touch. tr is in /usr/bin/tr. uniq is in /usr/bin/uniq. Don't worry if any of the following aren't found... ar is in /usr/bin/ar. bison is in /usr/bin/bison. I don't see byacc out there, offhand. cpp is in /usr/bin/cpp. csh is in /bin/csh. date is in /bin/date. egrep is in /usr/bin/egrep. I don't see gmake out there, either. gzip is in /usr/bin/gzip. less is in /usr/bin/less. ln is in /bin/ln. make is in /usr/bin/make. more is in /usr/bin/more. nm is in /usr/bin/nm. nroff is in /usr/bin/nroff. I don't see pg out there, either. test is in /bin/test. uname is in /usr/bin/uname. zip is in /usr/bin/zip. Using the test built into your sh. Checking compatibility between /bin/echo and builtin echo (if any)... They are compatible. In fact, they may be identical. The following message is sponsored by Dresden.pm<--The stars should be here. Dear Perl user, system administrator or package maintainer, the Perl community sends greetings to you. Do you (emblematical) greet back [Y/n]? n Symbolic links are supported. Checking how to test for symbolic links... You can test for symbolic links with 'test -h'. Good, your tr supports [:lower:] and [:upper:] to convert case. Using [:upper:] and [:lower:] to convert case. I see a config.sh file. Shall I use it to set the defaults? [y] Fetching default answers from your old config.sh file... Configure uses the operating system name and version to set some defau +lts. The default value is probably right if the name rings a bell. Otherwis +e, since spelling matters for me, either accept the default or answer "no +ne" to leave it blank. Operating system name? [darwin] Operating system version? [8.11.1] By default, perl5 will be installed in /usr/local/bin, manual pages under /usr/local/man, etc..., i.e. with /usr/local as prefix for all installation directories. Typically this is something like /usr/local. If you wish to have binaries under /usr/bin but other parts of the installation under /usr/local, that's ok: you will be prompted separately for each of the installation directories, the prefix being only used to set the defaults. Installation prefix to use? (~name ok) [/usr/local] AFS does not seem to be running... In some special cases, particularly when building perl5 for distributi +on, it is convenient to distinguish the directory in which files should be installed from the directory (/usr/local) in which they will eventually reside. For most users, these two directories are the same +. What installation prefix should I use for installing files? (~name ok) [/usr/local] Perl can be built to use the SOCKS proxy protocol library. To do so, Configure must be run with -Dusesocks. If you use SOCKS you also need to use the PerlIO abstraction layer, this will be implicitly selected. If this doesn't make any sense to you, just accept the default 'n'. Build Perl for SOCKS? [n] Previous version of perl5 used the standard IO mechanisms as defined in <stdio.h>. Versions 5.003_02 and later of perl5 allow alternate IO mechanisms via the PerlIO abstraction layer, but the stdio mechanism is still available if needed. The abstraction layer can use AT&T's sfio (if you already have sfio installed) or regular st +dio. Using PerlIO with sfio may cause problems with some extension modules. If this doesn't make any sense to you, just accept the default 'y'. Use the PerlIO abstraction layer? [y] Getting the current patchlevel... (You have perl5 version 10 subversion 1.) Perl can be built to take advantage of threads on some systems. To do so, Configure can be run with -Dusethreads. Note that Perl built with threading support runs slightly slower and uses more memory than plain Perl. The current implementation is believed to be stable, but it is fairly new, and so should be treated with caution. If this doesn't make any sense to you, just accept the default 'n'. Build a threading Perl? [n] y *** WHOA THERE!!! *** The previous value for $usethreads on this machine was "undef"! Keep the previous value? [y] n (Your platform does not have any specific hints for threaded builds. Assuming POSIX threads, then.) Perl can be built so that multiple Perl interpreters can coexist within the same Perl executable. This multiple interpreter support is required for interpreter-based th +reads. *** WHOA THERE!!! *** The previous value for $usemultiplicity on this machine was "undef +"! Keep the previous value? [y] n Use which C compiler? [cc] Hmm... Looks kind of like a BSD system, but we'll see... Congratulations. You aren't running Eunice. It's not Xenix... Nor is it Venix... Checking for GNU cc in disguise and/or its version number... You are using GNU cc 4.0.1 (Apple Computer, Inc. build 5370). Hmm... Doesn't look like a MIPS system. Now, how can we feed standard input to your C preprocessor... You used to use cc -E - so we'll use that again. (And we'll use cc -E - to preprocess directly.) Some systems have incompatible or broken versions of libraries. Among the directories listed in the question below, please remove any you know not to be holding relevant libraries, and add any that are needed +. Say "none" for none. Directories to use for library searches? [/usr/local/lib /usr/lib] On some systems, shared libraries may be available. Answer 'none' if you want to suppress searching of shared libraries for the remainder of this configuration. What is the file extension used for shared libraries? [dylib] &-d (OK, I'll run with -d after this question.) What is the file extension used for shared libraries? [dylib] ... ... ...
        Did you miss my ealier post Re^2: where are my ithreads II?? I even sent a message notifying you of it (since it wasn't a direct reply to yours).

        All you had to do was unzip the bundle into a clean directory.

        Using sh Configure -deO -Dusethreads should also have worked (untested)

        Deleting config.sh should also have worked (untested)