Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.93k stars 551 forks source link

Not OK: perl v5.7.0 +DEVEL8148 -Duseperlio on powerpc-machten 4.1.4 #3017

Closed p5pRT closed 20 years ago

p5pRT commented 23 years ago

Migrated from rt.perl.org#4978 (status was 'resolved')

Searchable as RT4978$

p5pRT commented 23 years ago

From domo@computer.org

A default build goes fine\, but building with -Duseperlio\, things come grinding to a halt while making Encode​:

/usr/local/bin/perl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp -typemap ../../lib/ExtUtils/typemap Encode.xs > Encode.xsc && mv Encode.xsc Encode.c /usr/local/bin/perl compile iso8859.c Encode/ascii.enc Encode/iso8859*.enc Encode/cp1250.enc Can't locate File/Glob.pm in @​INC (@​INC contains​: ../../lib) at compile line 41. BEGIN failed--compilation aborted at compile line 41. make[1]​: *** [iso8859.c] Error 2 make[1]​: Leaving directory `/usr/local/src/perl@​8150-perlio/ext/Encode' make​: *** [lib/auto/Encode/Encode.a] Error 2

This is really weird​: MakeMaker (well\, MM_Unix) should have picked up ../../miniperl as the value for PERL in the Makefile\, but instead it's lighted on /usr/local/bin/perl\, which happens to be version 5.7.0 (yes\, I know)\, and which gets confused. (I don't know what's happened with globbing since then\, but the poor thing thinks it wants a module which hasn't been copied into ../../lib at this stage of the build.)

This has been happening for a few snapshots now​: I've yet to work back to find out when things went wrong. Does this mean anything to anybody? If not\, I'll plod on with the diagnosis.

Perl Info ``` Flags: category=install severity=none Site configuration information for perl v5.7.0: Configured by domo at Mon Dec 18 15:33:13 WET 2000. Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration: Platform: osname=machten, osvers=4.1.4, archname=powerpc-machten uname='machten computer 5 0.5 powerpc ' config_args='-de -Duseperlio -Dusedevel' 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 Compiler: cc='cc', ccflags ='-DNOTDEF_MACHTEN -DREG_INFTY=2047 -I/usr/local/include', optimize='-O2 -fomit-frame-pointer', cppflags='-DNOTDEF_MACHTEN -DREG_INFTY=2047 -I/usr/local/include' ccversion='', gccversion='2.8.1', gccosandvers='machten4' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='ld', ldflags =' -Xlstack=1048576 -L/usr/local/lib' libpth=/usr/local/lib /usr/lib libs=-lndbm -lgdbm -ldb -lm -lc -lutil perllibs=-lndbm -lgdbm -ldb -lm -lc -lutil libc=/usr/lib/libc.a, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags='' cccdlflags='', lddlflags='' Locally applied patches: DEVEL8148 @INC for perl v5.7.0: lib /usr/local/lib/perl5/5.7.0/powerpc-machten /usr/local/lib/perl5/5.7.0 /usr/local/lib/perl5/site_perl/5.7.0/powerpc-machten /usr/local/lib/perl5/site_perl/5.7.0 /usr/local/lib/perl5/site_perl/5.6.0/powerpc-machten /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl . Environment for perl v5.7.0: HOME=/home/domo LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH=/usr/lib LOGDIR (unset) PATH=/sbin:/usr/sbin:/home/domo/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11/bin:/usr/libexec PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 23 years ago

From @craigberry

At 08​:29 PM 12/19/2000 +0100\, Dominic Dunlop wrote​:

things come grinding to a halt while making Encode​:

If you end up tweaking Encode's Makefile.PL\, please consider also tweaking the postamble section for portability. I've been meaning to work up a patch but got waylaid by other problems.

1.) The name of the dependency file is implementation-defined\, so we need to s/Makefile/$(MAKEFILE)/. I think that macro is defined by the MM_xxx modules on all platforms.

2.) Lists of filenames with Unix-style delimiters may get interpreted correctly by Perl\, but not necessarily by non-Unix make utilities. The names of the form 'Encode/foo.bar' are nonsense on non-Unix systems; the only portable way I know to do that is something like the rather unattractive

  File​::Spec->catfile(File​::Spec->curdir()\, 'Encode'\, 'foo.bar')

Thanks\, and if it's not in the scope of what you're doing I'll get to it one of these days.

p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

Dominic Dunlop \domo@​computer\.org writes​:

This is a build failure report for perl from domo@​computer.org\, generated with the help of perlbug 1.33 running under perl v5.7.0.

----------------------------------------------------------------- [Please enter your report here]

A default build goes fine\, but building with -Duseperlio\, things come grinding to a halt while making Encode​:

/usr/local/bin/perl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp -typemap ../../lib/ExtUtils/typemap Encode.xs > Encode.xsc && mv Encode.xsc Encode.c /usr/local/bin/perl compile iso8859.c Encode/ascii.enc Encode/iso8859*.enc Encode/cp1250.enc Can't locate File/Glob.pm in @​INC (@​INC contains​: ../../lib) at compile line 41.

Please feel free to try and figure out why MakeMaker used /usr/local/bin/perl

The tiresome part of the bug is that UNIX does not _need_ glob anyway. But

@​ARGV = map(glob($_)\,@​ARGV) if $^O eq 'MSWin32';

Triggers it to go look.

Try the attached patch (untested)

BEGIN failed--compilation aborted at compile line 41. make[1]​: *** [iso8859.c] Error 2 make[1]​: Leaving directory `/usr/local/src/perl@​8150-perlio/ext/Encode' make​: *** [lib/auto/Encode/Encode.a] Error 2

This is really weird​: MakeMaker (well\, MM_Unix) should have picked up ../../miniperl as the value for PERL in the Makefile\, but instead it's lighted on /usr/local/bin/perl\, which happens to be version 5.7.0 (yes\, I know)\, and which gets confused. (I don't know what's happened with globbing since then\, but the poor thing thinks it wants a module which hasn't been copied into ../../lib at this stage of the build.)

This has been happening for a few snapshots now​: I've yet to work back to find out when things went wrong. Does this mean anything to anybody? If not\, I'll plod on with the diagnosis.

-- Nick Ing-Simmons

p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

==== //depot/perl/ext/Encode/compile#2 - /home/p4work/perl/devperl/ext/Encode/compile ====

Inline Patch ```diff --- /tmp/tmp.2051.0 Tue Dec 19 21:10:30 2000 +++ /home/p4work/perl/devperl/ext/Encode/compile Tue Dec 19 20:48:19 2000 @@ -38,7 +38,7 @@ return &encode_S; } -@ARGV = map(glob($_),@ARGV) if $^O eq 'MSWin32'; +eval "\@ARGV = map(glob(\$_),\@ARGV)" if ($^O eq 'MSWin32'); my $cname = shift(@ARGV); chmod(0666,$cname) if -f $cname && !-w $cname; ```
p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

Craig A . Berry \craigberry@​mac\.com writes​:

At 08​:29 PM 12/19/2000 +0100\, Dominic Dunlop wrote​:

things come grinding to a halt while making Encode​:

If you end up tweaking Encode's Makefile.PL\, please consider also tweaking the postamble section for portability. I've been meaning to work up a patch but got waylaid by other problems.

1.) The name of the dependency file is implementation-defined\, so we need to s/Makefile/$(MAKEFILE)/. I think that macro is defined by the MM_xxx modules on all platforms.

Adding Makefile to the depenancies was a late night hack - it does not really depend on the Makefile - it is the old problem of "compile" producing multiple files (xxxxx.def\, xxxxx.c and xxxxx.h) and Make getting over excited or confused as a consequence.

2.) Lists of filenames with Unix-style delimiters may get interpreted correctly by Perl\, but not necessarily by non-Unix make utilities. The names of the form 'Encode/foo.bar' are nonsense on non-Unix systems; the only portable way I know to do that is something like the rather unattractive

   File​::Spec\->catfile\(File​::Spec\->curdir\(\)\, 'Encode'\, 'foo\.bar'\)

MakeMaker has its own legacy idiom for that - which I think now uses File​::Spec.

I should know better on both counts.

Thanks\, and if it's not in the scope of what you're doing I'll get to it one of these days.

p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

At 21​:10 +0000 2000-12-19\, Nick Ing-Simmons wrote​:

Please feel free to try and figure out why MakeMaker used /usr/local/bin/perl ... Try the attached patch (untested)

I will keep looking for the root cause\, even though your patch (for which\, thanks) does indeed mask the symptom in this case.