Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Win32 MSVC perlglob expansion in Encode #12072

Closed
p5pRT opened this issue Apr 25, 2012 · 9 comments
Closed

[PATCH] Win32 MSVC perlglob expansion in Encode #12072

p5pRT opened this issue Apr 25, 2012 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 25, 2012

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

Searchable as RT112612$

@p5pRT
Copy link
Author

p5pRT commented Apr 25, 2012

From @rurban

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.9.

From a5ad7f26363aa02510e89471d9fc277dacafc259 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Wed, 25 Apr 2012 13​:21​:20 -0500
Subject​: [PATCH] Win32 MSVC perlglob expansion in Encode

Win32 needs to expand glob via perlglob. But this needs perl.exe, not miniperl.exe


cpan/Encode/Byte/Makefile.PL | 2 +-
cpan/Encode/CN/Makefile.PL | 2 +-
cpan/Encode/EBCDIC/Makefile.PL | 2 +-
cpan/Encode/JP/Makefile.PL | 2 +-
cpan/Encode/KR/Makefile.PL | 2 +-
cpan/Encode/Symbol/Makefile.PL | 2 +-
cpan/Encode/TW/Makefile.PL | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)

Inline Patch
diff --git a/cpan/Encode/Byte/Makefile.PL b/cpan/Encode/Byte/Makefile.PL
index 60caf38..88807ac 100644
--- a/cpan/Encode/Byte/Makefile.PL
+++ b/cpan/Encode/Byte/Makefile.PL
@@ -180,7 +180,7 @@ sub postamble
     $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
     my $ucopts = '-"Q" -"O"';
     $str .=  
-        qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
+        qq{\n\t\$(FULLPERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
     open (FILELIST, ">$table.fnm")
         || die "Could not open $table.fnm: $!";
     foreach my $file (@{$tables{$table}})
diff --git a/cpan/Encode/CN/Makefile.PL b/cpan/Encode/CN/Makefile.PL
index 6d54404..36a1d7b 100644
--- a/cpan/Encode/CN/Makefile.PL
+++ b/cpan/Encode/CN/Makefile.PL
@@ -156,7 +156,7 @@ sub postamble
     $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
     my $ucopts = '-"Q"';
     $str .=  
-        qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
+        qq{\n\t\$(FULLPERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
     open (FILELIST, ">$table.fnm")
         || die "Could not open $table.fnm: $!";
     foreach my $file (@{$tables{$table}})
diff --git a/cpan/Encode/EBCDIC/Makefile.PL b/cpan/Encode/EBCDIC/Makefile.PL
index 0e2a13c..82e557a 100644
--- a/cpan/Encode/EBCDIC/Makefile.PL
+++ b/cpan/Encode/EBCDIC/Makefile.PL
@@ -137,7 +137,7 @@ sub postamble
     $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
     my $ucopts = '-"Q" -"O"';
     $str .=  
-        qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
+        qq{\n\t\$(FULLPERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
     open (FILELIST, ">$table.fnm")
         || die "Could not open $table.fnm: $!";
     foreach my $file (@{$tables{$table}})
diff --git a/cpan/Encode/JP/Makefile.PL b/cpan/Encode/JP/Makefile.PL
index a75685e..15a7f18 100644
--- a/cpan/Encode/JP/Makefile.PL
+++ b/cpan/Encode/JP/Makefile.PL
@@ -156,7 +156,7 @@ sub postamble
     $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
     my $ucopts = '-"Q"';
     $str .=  
-        qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
+        qq{\n\t\$(FULLPERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
     open (FILELIST, ">$table.fnm")
         || die "Could not open $table.fnm: $!";
     foreach my $file (@{$tables{$table}})
diff --git a/cpan/Encode/KR/Makefile.PL b/cpan/Encode/KR/Makefile.PL
index e95d039..063a0d2 100644
--- a/cpan/Encode/KR/Makefile.PL
+++ b/cpan/Encode/KR/Makefile.PL
@@ -154,7 +154,7 @@ sub postamble
     $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
     my $ucopts = '-"Q"';
     $str .=  
-        qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
+        qq{\n\t\$(FULLPERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
     open (FILELIST, ">$table.fnm")
         || die "Could not open $table.fnm: $!";
     foreach my $file (@{$tables{$table}})
diff --git a/cpan/Encode/Symbol/Makefile.PL b/cpan/Encode/Symbol/Makefile.PL
index 23ca1f4..0fa8e8d 100644
--- a/cpan/Encode/Symbol/Makefile.PL
+++ b/cpan/Encode/Symbol/Makefile.PL
@@ -142,7 +142,7 @@ sub postamble
     $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
     my $ucopts = '-"Q" -"O"';
     $str .=  
-        qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
+        qq{\n\t\$(FULLPERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
     open (FILELIST, ">$table.fnm")
         || die "Could not open $table.fnm: $!";
     foreach my $file (@{$tables{$table}})
diff --git a/cpan/Encode/TW/Makefile.PL b/cpan/Encode/TW/Makefile.PL
index 99c94bf..b427f0e 100644
--- a/cpan/Encode/TW/Makefile.PL
+++ b/cpan/Encode/TW/Makefile.PL
@@ -152,7 +152,7 @@ sub postamble
     $plib .= " -MCross=$::Cross::platform" if defined $::Cross::platform;
     my $ucopts = '-"Q"';
     $str .=  
-        qq{\n\t\$(PERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
+        qq{\n\t\$(FULLPERL) $plib $enc2xs $ucopts -o \$\@ -f $table.fnm\n\n};
     open (FILELIST, ">$table.fnm")
         || die "Could not open $table.fnm: $!";
     foreach my $file (@{$tables{$table}})
-- 
1.7.9

Flags​:
  category=library
  severity=high
  module=Encode


Site configuration information for perl 5.15.9​:

Summary of my perl5 (revision 5 version 15 subversion 8) configuration​:
  Derived from​: dbeb894
  Platform​:
  osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
  uname=''
  config_args='undef'
  hint=recommended, useposix=true, d_sigaction=undef
  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='gcc', ccflags =' -g -O2 -DDEBUGGING -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields',
  optimize='-g -O2 -DDEBUGGING',
  cppflags='-DWIN32'
  ccversion='', gccversion='4.6.2', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='gcc', ldflags ='-g -L"c​:\perl516\5.15.9\lib\MSWin32-x86-multi-thread\CORE" -L"C​:\MinGW\lib" -Wl=--enable-auto-import'
  libpth=C​:\MinGW\lib
  libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
  perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
  libc=, so=dll, useshrplib=true, libperl=libperl515.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags='-mdll -g -L"c​:\perl516\5.15.9\lib\MSWin32-x86-multi-thread\CORE" -L"C​:\MinGW\lib" -Wl=--enable-auto-import'

Characteristics of this binary (from libperl)​:
  Compile-time options​: DEBUGGING HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
  PERLIO_LAYERS PERL_DONT_CREATE_GVSV
  PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
  PERL_MALLOC_WRAP PERL_PRESERVE_IVUV
  PERL_TRACK_MEMPOOL PL_OP_SLAB_ALLOC USE_ITHREADS
  USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
  USE_PERL_ATOF


@​INC for perl 5.15.9​:
  C​:/cygwin/usr/src/perl/build-5.15.9d-win32/lib
  .


Environment for perl 5.15.9​:
  HOME=/home/rurban
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/rurban/bin​:/usr/bin​:/usr/local/bin​:/sbin​:/usr/sbin​:/home/rurban/bin​:/cygdrive/c/WINDOWS/system32​:/cygdrive/c/WINDOWS
  PERL_BADLANG (unset)
  PERL_JSON_BACKEND="JSON​::XS"
  PERL_YAML_BACKEND="YAML"
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented May 4, 2012

From @rjbs

I'm curious as to why this isn't affecting everyone building on Win32. I see a number of reports
from Win32 smokers that do not have problems building Encode.

Do you suppose it's because they have another perl already built in their %PATH%?

@p5pRT
Copy link
Author

p5pRT commented May 4, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 4, 2012

From @cpansprout

On Wed Apr 25 11​:30​:29 2012, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.9.

From a5ad7f26363aa02510e89471d9fc277dacafc259 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Wed, 25 Apr 2012 13​:21​:20 -0500
Subject​: [PATCH] Win32 MSVC perlglob expansion in Encode

Win32 needs to expand glob via perlglob. But this needs perl.exe, not
miniperl.exe

If, by perlglob, you mean the perlglob.exe built from win32/perlglob.c,
then your sentence seems to say the opposite of what I know to be the case.

miniperl’s glob operator uses perlglob. The Win32 Makefiles are
supposed to make sure that perlglob is in the path before running
miniperl. Is that perhaps not the case?

The full perl doesn’t use perlglob. By forcing the use of perl.exe, you
are actually bypassing perlglob and using File​::Glob, for the glob operator.

By using FULLPERL in Encode’s Makefiles, I think (without testing it)
that you are breaking the build on Unix, where Encode (like other XS
extensions) is built before perl. I don’t know what order the build
happens on Windows.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented May 4, 2012

From @steve-m-hay

On Thu May 03 20​:22​:11 2012, sprout wrote​:

On Wed Apr 25 11​:30​:29 2012, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.9.

From a5ad7f26363aa02510e89471d9fc277dacafc259 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Wed, 25 Apr 2012 13​:21​:20 -0500
Subject​: [PATCH] Win32 MSVC perlglob expansion in Encode

Win32 needs to expand glob via perlglob. But this needs perl.exe, not
miniperl.exe

If, by perlglob, you mean the perlglob.exe built from win32/perlglob.c,
then your sentence seems to say the opposite of what I know to be the
case.

miniperl’s glob operator uses perlglob. The Win32 Makefiles are
supposed to make sure that perlglob is in the path before running
miniperl. Is that perhaps not the case?

The full perl doesn’t use perlglob. By forcing the use of perl.exe, you
are actually bypassing perlglob and using File​::Glob, for the glob
operator.

By using FULLPERL in Encode’s Makefiles, I think (without testing it)
that you are breaking the build on Unix, where Encode (like other XS
extensions) is built before perl. I don’t know what order the build
happens on Windows.

The Windows build makes miniperl.exe first, then perlglob.exe, then
pure-Perl modules, then perl.exe, then XS extensions.

My (almost nightly) VC10 smoker builds everything fine and most
definitely does not have perl.exe (or miniperl.exe or perlglob.exe) in
its PATH to start with. I recently also ran one smoke each with VC6
through VC9, and they all built fine as well.

Can we see an example of the output from whatever build failure is being
encountered?

@p5pRT
Copy link
Author

p5pRT commented May 4, 2012

From @rurban

My windows is fresh, so I guess it's a missing perlglob in the PATH. I'll test it tomorrow.

Ricardo SIGNES via RT <perlbug-followup@​perl.org> wrote​:

I'm curious as to why this isn't affecting everyone building on Win32. I see a number of reports
from Win32 smokers that do not have problems building Encode.

Do you suppose it's because they have another perl already built in their %PATH%?

@p5pRT
Copy link
Author

p5pRT commented May 6, 2012

From @rurban

On Fri, May 4, 2012 at 2​:21 AM, Steve Hay via RT
<perlbug-followup@​perl.org> wrote​:

On Thu May 03 20​:22​:11 2012, sprout wrote​:

On Wed Apr 25 11​:30​:29 2012, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.9.

From a5ad7f26363aa02510e89471d9fc277dacafc259 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Wed, 25 Apr 2012 13​:21​:20 -0500
Subject​: [PATCH] Win32 MSVC perlglob expansion in Encode

Win32 needs to expand glob via perlglob. But this needs perl.exe, not
miniperl.exe

If, by perlglob, you mean the perlglob.exe built from win32/perlglob.c,
then your sentence seems to say the opposite of what I know to be the
case.

miniperl’s glob operator uses perlglob.  The Win32 Makefiles are
supposed to make sure that perlglob is in the path before running
miniperl.  Is that perhaps not the case?

The full perl doesn’t use perlglob.  By forcing the use of perl.exe, you
are actually bypassing perlglob and using File​::Glob, for the glob
operator.

Yes. I mixed that up.
miniperl failed to call perlglob.
Using perl would need an already built File​::Glob, but this is not the case

perlglob can be called from the shell ok.
So I guess miniperl restricted the path for some perlglob dll.
But I did not use filemon (strace for windows) yet, to check what
exactly failed.

By using FULLPERL in Encode’s Makefiles, I think (without testing it)
that you are breaking the build on Unix, where Encode (like other XS
extensions) is built before perl.  I don’t know what order the build
happens on Windows.

Right. Encode is before File​::Glob

The Windows build makes miniperl.exe first, then perlglob.exe, then
pure-Perl modules, then perl.exe, then XS extensions.

My (almost nightly) VC10 smoker builds everything fine and most
definitely does not have perl.exe (or miniperl.exe or perlglob.exe) in
its PATH to start with. I recently also ran one smoke each with VC6
through VC9, and they all built fine as well.

Can we see an example of the output from whatever build failure is being
encountered?

I"m sorry, but I will not come to it for the next two weeks.
I'm getting married.
--
Reini Urban
http​://cpanel.net/   http​://www.perl-compiler.org/

@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2012

From @cpansprout

On Wed Apr 25 11​:30​:29 2012, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.9.

From a5ad7f26363aa02510e89471d9fc277dacafc259 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Wed, 25 Apr 2012 13​:21​:20 -0500
Subject​: [PATCH] Win32 MSVC perlglob expansion in Encode

Win32 needs to expand glob via perlglob. But this needs perl.exe, not
miniperl.exe

I think the underlying issue has been fixed by commit 2501835. See bug
#113798.

If that is not the case, please say so and I will re-open the ticket.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2012

@cpansprout - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant