Perl / perl5

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

RE: [OTS#020101846] bitwise shift at Windows x64 command line aborted due to com [...] #9283

Closed p5pRT closed 16 years ago

p5pRT commented 16 years ago

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

Searchable as RT52614$

p5pRT commented 16 years ago

From Michael.Graf@vs-hydro.com

Thanks for reviewing and noting the difference between the windows and linux command line parsing. I will definitely put this in out knowledge base.

The report was also sent to perlbug@​perl.org I have CC'ed them on this reply so they can close it.

Michael

-----Original Message----- From​: ActiveState Support [mailto​:support@​activestate.com] Sent​: Tuesday\, April 08\, 2008 3​:33 PM To​: Graf\, Michael Subject​: Re​: [OTS#020101846] bitwise shift at Windows x64 command line aborted due to com [...]

Michael\,

You have some extra escapes. Linux ignores them\, but they are changing your command in unexpected ways when Windows processes it. perl -e "$err=256>>8;print \"Error​: $err\n\";" seems to do what you want.

Best regards\,

Graham Stuart Technical Support Engineer ActiveState - Dynamic Tools for Dynamic Languages http​://www.ActiveState.com

"Graf\, Michael" \Michael\.Graf@​vs\-hydro\.com wrote​:

But I require the bitwise shift in the perl -e command line. Is there a way around it? To me this does seem like an issue with the perl command line parsing routine.

-----Original Message----- From​: ActiveState Support [mailto​:support@​activestate.com] Sent​: Friday\, April 04\, 2008 5​:52 PM To​: Graf\, Michael Subject​: Re​: [OTS#020101846] bitwise shift at Windows x64 command line

aborted due to com [...]

Michael\,

This is a Windows cmd shell vs Linux shell oddity\, not a bug in ActivePerl. If bitwise.pl contains​: #! perl $err=256>>8;print "Error​: $err\n";

then c​:\>perl bitwise.pl

returns Error​: 1

as expected.

Best regards\,

Graham Stuart Technical Support Engineer ActiveState - Dynamic Tools for Dynamic Languages http​://www.ActiveState.com

"Graf\, Michael" \Michael\.Graf@​vs\-hydro\.com wrote​:

To​: perlbug@​perl.org Subject​: bitwise shift at Windows x64 command line aborted due to compilation errors Reply-To​: michael.graf@​vs-hydro.com Message-Id​: \5\.8\.8\_7948\_1207165530@​EURO1

This is a bug report for perl from michael.graf@​vs-hydro.com\, generated with the help of perlbug 1.35 running under perl v5.8.8.

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

Long story short\, I was able to boil down the problem to a single line

(hehe). The perl -e command runs fine on linux\, but returns a compilation error on Windows.

command line perl -e "\$err=256>>8;print\"Error​: \$err\n\";"

Linux Output​: yor_mgra@​yors0353​:\~> uname -a Linux yors0353 2.6.18.8-0.7-default #1 SMP Tue Oct 2 17​:21​:08 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux

yor_mgra@​yors0353​:\~> perl -e "\$err=256>>8;print\"Error​: \$err\n\";" Error​: 1

Windows Output c​:\>perl -e "\$err=256>>8;print\"Error​: \$err\n\";" Can't modify single ref constructor in scalar assignment at -e line 1\,

near "8;" Execution of -e aborted due to compilation errors.

Are there any ideas about this\, as this would seem to be a bug with the Windows build?

[Please do not change anything below this line] ----------------------------------------------------------------- --- Flags​: category=core severity=medium --- Site configuration information for perl v5.8.8​:

Configured by jand at Tue Jul 31 19​:27​:53 2007.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration​: Platform​: osname=MSWin32\, osvers=5.2\, archname=MSWin32-x64-multi-thread uname='' config_args='undef' hint=recommended\, useposix=true\, d_sigaction=undef usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler​: cc='gcc'\, ccflags ='-DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasing'\, optimize='-O2'\, cppflags='-DWIN32' ccversion=''\, gccversion='3.4.5 (mingw special)'\, gccosandvers='' intsize=4\, longsize=4\, ptrsize=8\, doublesize=8\, byteorder=12345678 d_longlong=undef\, longlongsize=8\, d_longdbl=define\, longdblsize=8 ivtype='__int64'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='__int64'\, lseeksize=8 alignbytes=8\, prototype=define Linker and Libraries​: ld='g++'\, ldflags ='-L"C​:\Perl64\lib\CORE"' libpth=\lib libs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lbufferoverflowU -lmsvcrt perllibs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lbufferoverflowU -lmsvcrt libc=msvcrt.lib\, so=dll\, useshrplib=true\, libperl=perl58.lib gnulibc_version='' Dynamic Linking​: dlsrc=dl_win32.xs\, dlext=dll\, d_dlsymun=undef\, ccdlflags=' ' cccdlflags=' '\, lddlflags='-mdll -L"C​:\Perl64\lib\CORE"'

Locally applied patches​: ACTIVEPERL_LOCAL_PATCHES_ENTRY Iin_load_module moved for compatibility with build 806 Avoid signal flag SA_RESTART for older versions of HP-UX PerlEx support in CGI​::Carp Less verbose ExtUtils​::Install and Pod​::Find Patch for CAN-2005-0448 from Debian with modifications Rearrange @​INC so that 'site' is searched before 'perl' Partly reverted 24733 to preserve binary compatibility MAINT31223 plus additional changes 31490 Problem bootstraping Win32CORE 31324 Fix DynaLoader​::dl_findfile() to locate .so files again 31214 Win32​::GetLastError fails when first called 31211 Restore Windows NT support 31188 Problem killing a pseudo-forked child on Win32 29732 ANSIfy the PATH environment variable on Windows 27527\,29868 win32_async_check() can loop indefinitely 26970 Make Passive mode the default for Net​::FTP 26379 Fix alarm() for Windows 2003 24699 ICMP_UNREACHABLE handling in Net​::Ping

--- @​INC for perl v5.8.8​: C​:/Perl64/site/lib C​:/Perl64/lib .

--- Environment for perl v5.8.8​: HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset)

PATH=C​:\Perl64\site\bin;C​:\Perl64\bin;C​:\Perl64\bin;C​:\Tcl\bin;C​:\Py th on 24\.;C​:\Perl\bin\;C​:\PROGRA~2\ENGINE~1\iSIGHT_10\bin\NT_4.0;C​:\PROGR A~ 2\ ENGINE~1\iSIGHT_10\utilities\perl-NT\bin;C​:\Program Files\Support Tools\;C​:\Program Files (x86)\Windows Resource Kits\Tools\;C​:\MinGW\bin;C​:\WINDOWS\system32;C​:\WINDOWS;C​:\WINDOWS\S ys te m32\Wbem;C​:\Program Files\Hummingbird\Connectivity\12.00\Exceed;C​:\Program Files\Hummingbird\Connectivity\12.00\Accessories;C​:\Program Files\Hummingbird\Connectivity\12.00\NFS Maestro;;C​:/CFX/TASCflow/02.12.02/TASCflow\Bin;C​:/PROGRA~1/ANSYSI~1/ v1 10 /CFX\bin;c​:\cygwin\bin;c​:\cygwin\usr\X11R6\bin;J​:/Hydro/VSY/HYDRAU~1 /P ro grams/CFDtools/CFD_v7.pro/bin/win32;J​:/Hydro/VSY/HYDRAU~1/Programs/C FD to ols/CFD_v7.pro\usr\NTUnixCom;C​:\Program Files (x86)\FCIV;C​:\Program

Files\CEI\bin;C​:\Program Files\Intel\DMIX;C​:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\;C​:\Program Files (x86)\Voith

Siemens\V06\system;C​:\Program Files (x86)\Voith Siemens\system;C​:\Program Files (x86)\Voith Siemens\V06\BEtoolbox\VSDS\Runner_Hydraulic\bin\win32\;C​:\Program Files\pfx\qube\lib\;C​:\Program Files (x86)\QuickTime\QTSystem\;C​:\Program Files\pfx\qube\sbin\;C​:\Program

Files\pfx\qube\bin\;C​:\Program Files (x86)\Voith Siemens\V05\system; PERL_BADLANG (unset)

PERL_ROOT=J​:/Hydro/VSY/HYDRAU~1/Programs/CFDtools/CFD_v7.pro/scripts SHELL (unset)

p5pRT commented 16 years ago

@jandubois - Status changed from 'new' to 'resolved'