Perl / perl5

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

bitwise shift at Windows x64 command line aborted due to compilation errors #9276

Closed p5pRT closed 16 years ago

p5pRT commented 16 years ago

Migrated from rt.perl.org#52418 (status was 'rejected')

Searchable as RT52418$

p5pRT commented 16 years ago

From Michael.Graf@vs-hydro.com

Created by michael.graf@vs-hydro.com

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?

Perl Info ``` 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:\Python 24\.;C:\Perl\bin\;C:\PROGRA~2\ENGINE~1\iSIGHT_10\bin\NT_4.0;C:\PROGRA~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\Syste 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/v110 /CFX\bin;c:\cygwin\bin;c:\cygwin\usr\X11R6\bin;J:/Hydro/VSY/HYDRAU~1/Pro grams/CFDtools/CFD_v7.pro/bin/win32;J:/Hydro/VSY/HYDRAU~1/Programs/CFDto 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

From @steve-m-hay

Graf\, Michael" (via RT) wrote​:

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?

It's just a Windows cmd.exe quoting thing. The following one-liner has the same error​:

perl -e "\$a=0"

The Windows shell is actually passing \$a=0 (rather than $a=0) to the Perl interpereter\, which causes the obvious error.

This is fine​:

perl -e "$a=0"

p5pRT commented 16 years ago

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

p5pRT commented 16 years ago

@rgs - Status changed from 'open' to 'rejected'