someone on perlmonks suggested that I report this here.
Due to a bug in the CentOS package described here:
http://lists.scsys.co.uk/pipermail/dbix-class/2007-October/005119.html
and here: https://bugzilla.redhat.com/show_bug.cgi?id=196836 I decided
to install perl 5.10.0 on a CentOS 5 server using the following
configuration:
# /opt/perl/bin/perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.16.33-xen_3.0.4.1,
archname=i686-linux-thread-multi
uname='linux devtest 2.6.16.33-xen_3.0.4.1 #1 smp fri jan 5
10:40:15 est 2007 i686 i686 i386 gnulinux '
config_args='-Dprefix=/opt/perl'
hint=previous, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DDEBUGGING -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-DDEBUGGING -DDEBUGGING -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'
ccversion='', gccversion='4.1.1 20070105 (Red Hat 4.1.1-52)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_TRACK_MEMPOOL USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API
Built under linux
Compiled at May 29 2008 14:10:38
@INC:
/opt/perl/lib/5.10.0/i686-linux-thread-multi
/opt/perl/lib/5.10.0
/opt/perl/lib/site_perl/5.10.0/i686-linux-thread-multi
/opt/perl/lib/site_perl/5.10.0
.
When running make test, the following is the interesting part of the output:
op/mkdir.........................................................#
Failed at op/mkdir.t line 20
# got '17'
# expected /(?i-xsm:cannot move|exist|denied|unknown)/
# Failed at op/mkdir.t line 24
# got '2'
# expected /(?i-xsm:cannot find|such|exist|not found|not a
directory|unknown)/
op/mkdir.........................................................FAILED
tests 3, 7
Failed 2/22 tests, 90.91% okay
../ext/PerlIO/t/PerlIO...........................................ok
../ext/PerlIO/t/scalar...........................................#
You named your test '9'. You shouldn't use numbers for your test names.
# Very confusing.
# You named your test '22'. You shouldn't use numbers for your test
names.
# Very confusing.
# You named your test '9'. You shouldn't use numbers for your test
names.
# Very confusing.
# You named your test '22'. You shouldn't use numbers for your test
names.
# Very confusing.
# You named your test '22'. You shouldn't use numbers for your test
names.
# Very confusing.
# You named your test '22'. You shouldn't use numbers for your test
names.
# Very confusing.
../lib/constant..................................................
# Failed test at ../lib/constant.t line 113.
# '1'
# >
# '6'
# Looks like you failed 1 test of 97.
../lib/constant..................................................dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 33
Failed 1/97 tests, 98.97% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
../lib/constant.t 1 256 97 1 33
op/mkdir.t 22 2 3 7
30 tests and 864 subtests skipped.
Failed 2/1461 test scripts. 3/189213 subtests failed.
Files=1461, Tests=189213, 818 wallclock secs (241.37 cusr + 26.83 csys =
268.20 CPU)
Failed 2/1461 test programs. 3/189213 subtests failed.
The 'like' in the following snippet is line 20 in op/mkdir (line 24 is
analogous with rmdir tests before):
ok(mkdir('blurfl',0777));
ok(!mkdir('blurfl',0777));
like($!, qr/cannot move|exist|denied|unknown/i);
I first attributed this to $! returning errno in numeric context and put
the $! in double quotes in both lines which didn't make any difference.
Ok, it wasn't very likely anyway that it had to do with the tests, I did
that out of curiosity for the most part.
line 113 in constant.t is the last one of the following snippet:
use constant E2BIG => $! = 7;
cmp_ok E2BIG, '==', 7;
# This is something like "Arg list too long", but the actual message
# text may vary, so we can't test much better than this.
cmp_ok length(E2BIG), '>', 6;
Here I have no idea at all what this is supposed to test.
Could anyone please give me a hint on what these results mean and how I
can possibly pass those?
I compiled perl 5.10.0 on Ubuntu Hardy Heron (64bit) with the same
configuration later that day and it passed all tests on first try.
> ?Someone suggested on IRC earlier today that the 'mkdir' and 'rmdir'
> tests failed due to my running 'make test' as root which makes perfect
> sense.
For some value of 'perfect'...
> But now I'm asking myself why I passed all the tests on Ubuntu Hardy as
> I did a 'sudo -s' before starting the whole installation process. Thus,
> 'make test' was run as root there as well.
Can you run:
as root:
perl -wle 'mkdir("/tmp/blurfl",0777); mkdir ("/tmp/blurfl",0777) or die $!;'
as a regular user:
perl -wle 'mkdir("/tmp/blurfl2",0777); mkdir ("/tmp/blurfl2",0777) or die $!;'
on CentOS and on Debian?
Kind regards,
Bram
Well, after I looked at the code again, let's just pretend I never wrote
that ;-)
> Can you run:
>
> as root:
> perl -wle 'mkdir("/tmp/blurfl",0777); mkdir ("/tmp/blurfl",0777) or die $!;'
>
> as a regular user:
> perl -wle 'mkdir("/tmp/blurfl2",0777); mkdir ("/tmp/blurfl2",0777) or die $!;'
>
> on CentOS and on Debian?
The output was the same for root as well as the regular user on both
OS's.
CentOS:
$ /opt/perl/bin/perl -wle 'mkdir("/tmp/blurfl",0777); mkdir
("/tmp/blurfl",0777) or die $!;'
17 at -e line 1.
Debian (Ubuntu):
$ perl -wle 'mkdir("/tmp/blurfl2",0777); mkdir ("/tmp/blurfl2",0777) or
die $!;'
File exists at -e line 1.
The 5.10.0 installation on Debian is at /usr/local/bin, so 'perl' is in
fact my 5.10.0, installation, not the one that came with the OS.
Bye,
Jochen
> Can you also try:
>
> LC_ALL=C /opt/perl/bin/perl -wle 'mkdir("/tmp/blurfl",0777); mkdir
> ("/tmp/blurfl",0777) or die $!;'
# LC_ALL=C /opt/perl/bin/perl -wle 'mkdir("/tmp/blurfl",0777); mkdir
What's the output of locale ?
Can you also try:
LC_ALL=C /opt/perl/bin/perl -wle 'mkdir("/tmp/blurfl",0777); mkdir
Odd...
Somehow it is not finding the full text of the error... But I fail to
reproduce this (by playing with my locale/my locale files)
What about:
mkdir "/tmp/blurf"
mkdir "/tmp/blurf"
Does that one output 'mkdir: cannot create directory `/tmp/blurf':
File exists' ?
(Not that this is really that important, the error value is correct
I'm just curious as to why it doesn't output the proper string)
> What about:
> mkdir "/tmp/blurf"
> mkdir "/tmp/blurf"
>
> Does that one output 'mkdir: cannot create directory `/tmp/blurf':
> File exists' ?
Yes. Well, due to the locale settings, it's the german version:
mkdir: kann Verzeichnis „/tmp/blurf“ nicht anlegen: Die Datei existiert
bereits
Bye,
Jochen
> Am Dienstag, den 03.06.2008, 20:23 +0200 schrieb Bram:
>
>> What about:
>> mkdir "/tmp/blurf"
>> mkdir "/tmp/blurf"
>>
>> Does that one output 'mkdir: cannot create directory `/tmp/blurf':
>> File exists' ?
>
> Yes. Well, due to the locale settings, it's the german version:
>
> mkdir: kann Verzeichnis ?/tmp/blurf? nicht anlegen: Die Datei existiert
> bereits
Can you run:
./perl -Ilib -V:.*err.*
Kind regards,
Bram
# /opt/perl/bin/perl -Ilib -V:.*err.*
d_dlerror='define';
d_strerrm='strerror(e)';
d_strerror='define';
d_strerror_r='define';
d_syserrlst='define';
i_neterrno='undef';
(It's the same output when run with the OS's perl)
Bye
Jochen