Discussion:
How to require threads? (was FAIL Thread-Queue-2.04 darwin-2level 9.1.0)
(too old to reply)
Jerry D. Hedden
2008-02-20 13:22:18 UTC
Permalink
If you look through the failure report below, you'll find
the relevant issue:

ERROR: This Perl not built to support threads

This is purposefully generated in Makefile.PL:

use Config;
BEGIN {
die("ERROR: This Perl not built to support threads\n")
if (! $Config{'useithreads'});
}

Thus, there is no failure; there is a lack of meeting a
prerequisite. As such, trying to install this module should
result in an UNKNOWN and not a FAIL.

My question is how to code Makefile.PL to require a Perl
version built with ithreads, but not have it be reported as
a failure?
This distribution has been tested as part of the cpan-testers
effort to test as many new uploads to CPAN as possible. See
http://testers.cpan.org/
test volunteers informed and to prevent any duplicate effort.
--
Dear Jerry D. Hedden,
This is a computer-generated report for Thread-Queue-2.04
on perl-5.8.8, created automatically by CPAN-Reporter-1.0602
and sent to the CPAN Testers mailing list.
If you have received this email directly, it is because the person testing
your distribution chose to send a copy to your CPAN email address; there
may be a delay before the official report is received and processed
by CPAN Testers.
Thank you for uploading your work to CPAN. However, it appears that
there were some problems with your distribution. If these results are
not what you expect or if you would like to learn how to avoid FAIL
reports for missing dependencies, unsupported operating systems, etc.,
http://cpantest.grango.org
* Tester comments
* Program output
* Prerequisites
* Environment and other context
------------------------------
TESTER COMMENTS
------------------------------
[none provided]
------------------------------
PROGRAM OUTPUT
------------------------------
ERROR: This Perl not built to support threads
BEGIN failed--compilation aborted at Makefile.PL line 8.
------------------------------
PREREQUISITES
------------------------------
No requirements found
------------------------------
ENVIRONMENT AND OTHER CONTEXT
------------------------------
LANG = ja_JP.UTF-8
LIB = /Users/naha/local/lib
PATH = /Users/naha/bin:/Users/naha/plagger:/opt/local/bin:/Users/naha/local/bin:/usr/local/mysql/bin:/opt/local/apache2/bin:/Users/naha/downloads/Django-0.96/django/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:/Developer/SDKs/flex/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
PERL5LIB = /Users/naha/local/lib/perl5:/Users/naha/local/lib/perl5/site_perl
PERL5_CPANPLUS_IS_RUNNING = 19963
PERL5_CPAN_IS_EXECUTING = /Users/naha/.cpan/build/Thread-Queue-2.04-Jr_aHf/Makefile.PL
PERL5_CPAN_IS_RUNNING = 19963
PERL_AUTOINSTALL = --defaultdeps
SHELL = /bin/zsh
TERM = xterm-color
TMPDIR = /var/folders/HW/HWVMfy3XECOWYx-DdhwifU+++TI/-Tmp-/
$^X = /opt/local/bin/perl
$UID/$EUID = 501 / 501
$GID = 20 80 79 101 81 98 20
$EGID = 20 80 79 101 81 98 20
Module Have
------------------- ------
CPAN 1.9205
Cwd 3.2701
ExtUtils::CBuilder 0.22
ExtUtils::Command 1.13
ExtUtils::Install 1.44
ExtUtils::MakeMaker 6.36
ExtUtils::Manifest 1.51
ExtUtils::ParseXS 2.19
File::Spec 3.2701
Module::Build 0.2808
Module::Signature n/a
Test::Harness 3.09
Test::More 0.74
YAML 0.66
YAML::Syck 1.04
version 0.74
--
osname=darwin, osvers=9.1.0, archname=darwin-2level
uname='darwin joe-nahas-macbook-pro.local 9.1.0 darwin kernel version 9.1.0: wed oct 31 17:46:22 pdt 2007; root:xnu-1228.0.2~1release_i386 i386 '
config_args='-des -Dprefix=/opt/local -Dccflags=-I'/opt/local/include' -Dldflags=-L/opt/local/lib -Dvendorprefix=/opt/local -Dcc=/usr/bin/gcc-4.0'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
cc='/usr/bin/gcc-4.0', ccflags ='-I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/opt/local/include',
optimize='-O3',
cppflags='-no-cpp-precomp -I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/opt/local/include'
ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/opt/local/lib -L/usr/local/lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib
libs=-ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-L/opt/local/lib -bundle -undefined dynamic_lookup -L/usr/local/lib'
David Golden
2008-02-20 21:42:11 UTC
Permalink
In the Makefile.PL for 'threads', I used (per Dave's
use Config;
BEGIN {
die("OS unsupported: ERROR: This Perl not built to support threads\n")
if (! $Config{'useithreads'});
}
This should result in NA's for any attempts to install
'threads' on non-threaded Perls, and no reports at all for
the other modules because their 'threads' prerequiste is not
met.
That's awesome! I just added that to the CPAN Testers wiki.

David

Loading...