Closed p5pRT closed 12 years ago
This is a bug report for perl from rurban@cpanel.net\, generated with the help of perlbug 1.39 running under perl 5.15.7.
From d0021449d60b2f34d2beb8e13cbcd855a7ca0946 Mon Sep 17 00:00:00 2001 From: Reini Urban \rurban@​x\-ray\.at Date: Wed\, 8 Feb 2012 11:38:44 -0600 Subject: [PATCH] RT#65052 Sync full ENV when cygwin perl does "use Win32;"
cygwin strips some win ENV vars on startup which breaks ADODB and more Win32 programs. When cygwin perl does a use Win32 use all initial ENV vars. Patch by Rafael Kitover
cpan/Win32/Win32.xs | 9 +++++++++ 1 files changed\, 9 insertions(+)\, 0 deletions(-)
1.7.5.4
Flags: category=library severity=medium module=Win32
Site configuration information for perl 5.15.7:
Configured by rurban at Sun Jan 22 12:13:34 CST 2012.
Summary of my perl5 (revision 5 version 15 subversion 7) configuration:
Platform:
osname=linux\, osvers=3.0.0-1-amd64\, archname=x86_64-linux
uname='linux reini 3.0.0-1-amd64 #1 smp sun jul 24 02:24:44 utc 2011 x86_64 gnulinux '
config_args='-de -Dusedevel -Dinstallman1dir=none -Dinstallman3dir=none -Dinstallsiteman1dir=none -Dinstallsiteman3dir=none -Uuseithreads -Accflags='-msse4.2' -Accflags='-march=corei7' -Dcf_email='rurban@cpanel.net' -Dperladmin='rurban@cpanel.net' -Duseshrplib'
hint=recommended\, useposix=true\, d_sigaction=define
useithreads=undef\, usemultiplicity=undef
useperlio=define\, d_sfio=undef\, uselargefiles=define\, usesocks=undef
use64bitint=define\, use64bitall=define\, uselongdouble=undef
usemymalloc=n\, bincompat5005=undef
Compiler:
cc='cc'\, ccflags ='-msse4.2 -march=corei7 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\,
optimize='-O2'\,
cppflags='-msse4.2 -march=corei7 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion=''\, gccversion='4.6.1'\, gccosandvers=''
intsize=4\, longsize=8\, ptrsize=8\, doublesize=8\, byteorder=12345678
d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16
ivtype='long'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8
alignbytes=8\, prototype=define
Linker and Libraries:
ld='cc'\, ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/lib/x86_64-linux-gnu /lib64 /usr/lib64
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=\, so=so\, useshrplib=true\, libperl=libperl.so
gnulibc_version='2.13'
Dynamic Linking:
dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-Wl\,-E -Wl\,-rpath\,/usr/local/lib/perl5/5.15.7/x86_64-linux/CORE'
cccdlflags='-fPIC'\, lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Locally applied patches:
@INC for perl 5.15.7: /usr/local/lib/perl5/site_perl/5.15.7/x86_64-linux /usr/local/lib/perl5/site_perl/5.15.7 /usr/local/lib/perl5/5.15.7/x86_64-linux /usr/local/lib/perl5/5.15.7 /usr/local/lib/perl5/site_perl .
Environment for perl 5.15.7: HOME=/home/rurban LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/bin:/usr/bin:/bin:/usr/games PERL_BADLANG (unset) SHELL=/bin/bash
Scratch the first Win32 patch. Use the attached instead.
After discussion with Jan Dubois I've added your code as Cygwin::sync_winenv() and revised perlcygwin.pod to use that function when needed. It will be in the upcoming cygwin perl-5.14.2-1 package\, which is now in test.
The problem to load that generally to e.g. Win32 is that cygwin-1.7 warns now on every occurance of non-posix paths. Initially I thought we should do that unconditionally when loading Win32.pm or Win32::OLE\, but we need some tests before. Better let the users add it when needed. -- Reini Urban
The RT System itself - Status changed from 'new' to 'open'
The 2nd patch had a syntax error in newXS\, sorry\, didn't test. 3rd patch attached. -- Reini Urban
On Wed\, Feb 08\, 2012 at 02:18:16PM -0800\, Reini Urban via RT wrote:
The 2nd patch had a syntax error in newXS\, sorry\, didn't test. 3rd patch attached. -- Reini Urban
--- via perlbug: queue: perl5 status: open https://rt-archive.perl.org/perl5/Ticket/Display.html?id=110190
commit a994b04e42ae3d8b8eccbbd85c6ac73f762a2acf Author: Reini Urban \rurban@​x\-ray\.at Date: Wed Feb 8 12:41:45 2012 -0600
added Cygwin​::sync\_winenv\. Revise cygwin POD Cygwin​::sync\_winenv should fix \[CPAN \#65052\]\, ADODB missing %COMMONPROGRAMFILES%\. sync\_winenv code and solution by Chris Day\.
diff --git a/README.cygwin b/README.cygwin index 0888140..910b3fb 100644 --- a/README.cygwin +++ b/README.cygwin @@ -1\,5 +1\,5 @@ If you read this file _as_is_\, just ignore the funny characters you -see. It is written in the POD format (see pod/perlpod.pod) which is +see. It is written in the POD format (see F\<pod/perlpod.pod>) which is specially designed to be readable as is.
I'd be more comfortable with this if the general README.cygwin patch was a separate commit from the _sync change.
Tony
This is a bug report for perl from rurban@cpanel.net\, generated with the help of perlbug 1.39 running under perl 5.15.7.
From 08f57550b4ef0a144f3c65daa88744e5b46b7232 Mon Sep 17 00:00:00 2001 From: Reini Urban \rurban@​x\-ray\.at Date: Wed\, 8 Feb 2012 17:51:39 -0600 Subject: [PATCH 1/2] Revise perlcygwin.pod for cygwin-1.7
cygwin does not support windows prior NT5 anymore. cygwin paths are now all UTF8 encoded\, special pathname characters and names are now allowed. Removed outdated cruft and fix wrong parts.
README.cygwin | 138 +++++++++++++++++++++++++-------------------------------- 1 files changed\, 61 insertions(+)\, 77 deletions(-)
1.7.5.4
Flags: category=docs severity=medium
Site configuration information for perl 5.15.7:
Configured by rurban at Sun Jan 22 12:13:34 CST 2012.
Summary of my perl5 (revision 5 version 15 subversion 7) configuration:
Platform:
osname=linux\, osvers=3.0.0-1-amd64\, archname=x86_64-linux
uname='linux reini 3.0.0-1-amd64 #1 smp sun jul 24 02:24:44 utc 2011 x86_64 gnulinux '
config_args='-de -Dusedevel -Dinstallman1dir=none -Dinstallman3dir=none -Dinstallsiteman1dir=none -Dinstallsiteman3dir=none -Uuseithreads -Accflags='-msse4.2' -Accflags='-march=corei7' -Dcf_email='rurban@cpanel.net' -Dperladmin='rurban@cpanel.net' -Duseshrplib'
hint=recommended\, useposix=true\, d_sigaction=define
useithreads=undef\, usemultiplicity=undef
useperlio=define\, d_sfio=undef\, uselargefiles=define\, usesocks=undef
use64bitint=define\, use64bitall=define\, uselongdouble=undef
usemymalloc=n\, bincompat5005=undef
Compiler:
cc='cc'\, ccflags ='-msse4.2 -march=corei7 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\,
optimize='-O2'\,
cppflags='-msse4.2 -march=corei7 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion=''\, gccversion='4.6.1'\, gccosandvers=''
intsize=4\, longsize=8\, ptrsize=8\, doublesize=8\, byteorder=12345678
d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16
ivtype='long'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8
alignbytes=8\, prototype=define
Linker and Libraries:
ld='cc'\, ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/lib/x86_64-linux-gnu /lib64 /usr/lib64
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=\, so=so\, useshrplib=true\, libperl=libperl.so
gnulibc_version='2.13'
Dynamic Linking:
dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-Wl\,-E -Wl\,-rpath\,/usr/local/lib/perl5/5.15.7/x86_64-linux/CORE'
cccdlflags='-fPIC'\, lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Locally applied patches:
@INC for perl 5.15.7: /usr/local/lib/perl5/site_perl/5.15.7/x86_64-linux /usr/local/lib/perl5/site_perl/5.15.7 /usr/local/lib/perl5/5.15.7/x86_64-linux /usr/local/lib/perl5/5.15.7 /usr/local/lib/perl5/site_perl .
Environment for perl 5.15.7: HOME=/home/rurban LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/rurban/bin:/usr/local/bin:/usr/bin:/bin:/usr/games PERL_BADLANG (unset) SHELL=/bin/bash
On Wed Feb 08 14:54:19 2012\, tonyc wrote:
--- a/README.cygwin +++ b/README.cygwin @@ -1\,5 +1\,5 @@ If you read this file _as_is_\, just ignore the funny characters you -see. It is written in the POD format (see pod/perlpod.pod) which is +see. It is written in the POD format (see F\<pod/perlpod.pod>) which is specially designed to be readable as is.
I'd be more comfortable with this if the general README.cygwin patch was a separate commit from the _sync change.
Sure. part #1 is now at RT# (no number yet) "Revise perlcygwin.pod for cygwin- 1.7" part #2 attached as 0001-add-Cygwin-sync_winenv-perl-110190.patch
-- Reini Urban
On Wed Feb 08 16:09:12 2012\, rurban wrote:
I'd be more comfortable with this if the general README.cygwin patch was a separate commit from the _sync change.
Sure. part #1 is now at RT# (no number yet) "Revise perlcygwin.pod for cygwin- 1.7" part #2 attached as 0001-add-Cygwin-sync_winenv-perl-110190.patch
Thanks\,
#1 received on the list applied.
#2 applied as 286f819461ff93f6b56f8f7d1b5689a84b32896f.
Tony
@tonycoz - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#110190 (status was 'resolved')
Searchable as RT110190$