Front page | perl.perl5.porters |
Postings from May 2004
[perl #29548] perlcc fails when Perl is installed in a directory whose path contains spaces (e.g. as in C:\Program Files\Perl). I have a solution also ready.
From:
Emmanuel
Date:
May 13, 2004 03:45
Subject:
[perl #29548] perlcc fails when Perl is installed in a directory whose path contains spaces (e.g. as in C:\Program Files\Perl). I have a solution also ready.
Message ID:
rt-3.0.9-29548-87340.9.74265275686051@perl.org
# New Ticket Created by Emmanuel
# Please include the string: [perl #29548]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29548 >
This is a bug report for perl from mavinkai@yahoo.com,
generated with the help of perlbug 1.34 running under
perl v5.8.3.
-----------------------------------------------------------------
[Please enter your report here]
If perlcc is invoked when Perl on Win32 has been
installed in a directory whose path name contains
white spaces
perlcc exits after the cmd shell reports an error as
follows.
For example if Perl is installed in C:\Program
Files\Perl perlcc exits with 'C:\Program' is not
recognized as
an internal or external command, operable program or
batch file.
The problem is in the subroutine yclept() in the file
perlcc.bat. This subroutine returns the command line
for
the shell to execute perl along with the include
library paths (-I directive).
The yclept() sub does not enclose the path within
quotes ("C:\Program Files\Perl"). I have modified the
sub so
that it encloses the path in quotes always. Enclosing
it always is not a problem as the shell dosent care
whether there is a space in the path or not as long as
it is within quotes. The entire subroutine with the
rewritten code is enclosed below. The additions are
explained by the comments alongside. The additions are
in
Line 2 and Line 15.
sub yclept {
my $command = "\"$^X\" "; # The additions are the
\"s before and after $^X => Line 2
# DWIM the -I to be Perl, not C, include
directories.
if (opt(I) && $Backend eq "Bytecode") {
for (split /\s+/, opt(I)) {
if (-d $_) {
push @INC, $_;
} else {
warn "$0: Include directory $_ not
found, skipping\n";
}
}
}
$command .= "-I\"$_\" " for @INC; # The additions
are the \"s before and after $_ => Line 15
return $command;
}
Warm regards,
Emmanuel
http://emmanuel_e.tripod.com/
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.8.3:
Configured by ActiveState at Tue Feb 3 00:28:38 2004.
Summary of my perl5 (revision 5 version 8 subversion
3) configuration:
Platform:
osname=MSWin32, osvers=4.0,
archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=undef use5005threads=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='cl', ccflags ='-nologo -Gf -W3 -MD -Zi
-DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT
-DHAVE_DES_FCRYPT -DNO_HASH_SEED
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DUSE_PERLIO -DPERL_MSVCRT_READFIX',
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8,
byteorder=1234
d_longlong=undef, longlongsize=8,
d_longdbl=define, longdblsize=10
ivtype='long', ivsize=4, nvtype='double',
nvsize=8, Off_t='__int64', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug
-opt:ref,icf -libpath:"C:\Program
Files\Perl\lib\CORE" -machine:x86'
libpth=C:\PROGRA~1\MICROS~3\VC98\lib
libs= oldnames.lib kernel32.lib user32.lib
gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib
gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=yes,
libperl=perl58.lib
gnulibc_version='undef'
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef,
ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo
-nodefaultlib -debug -opt:ref,icf
-libpath:"C:\Program Files\Perl\lib\CORE"
-machine:x86'
Locally applied patches:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
22218 Remove the caveat about detached threads
crashing on Windows
22201 Avoid threads+win32 crash by freeing Perl
interpreter slightly later
22169 Display 'out of memeory' errors using
low-level I/O
22159 Upgrade to Time::Hires 1.55
22120 Make 'Configure -Dcf_by=...' work
22051 Upgrade to Time::HiRes 1.54
21540 Fix backward-compatibility issues in if.pm
---
@INC for perl v5.8.3:
C:/Program Files/Perl/lib
C:/Program Files/Perl/site/lib
.
---
Environment for perl v5.8.3:
HOME (unset)
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=C:\Program Files\Python23\.;C:\Program
Files\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\ULTRAE~1
PERL_BADLANG (unset)
SHELL (unset)
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861
-
[perl #29548] perlcc fails when Perl is installed in a directory whose path contains spaces (e.g. as in C:\Program Files\Perl). I have a solution also ready.
by Emmanuel