Skip Menu |
Report information
Id: 131723
Status: open
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: davidhand [at] davidhand.com
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: HasPatch
Severity: Wishlist
Type: install
Perl Version: 5.27.2
Fixed In: (no value)

Attachments


From: davidhand [...] davidhand.com
Date: Sun, 09 Jul 2017 02:04:36 -0400
Subject: [PATCH] allow `make` to succed when builddir path contains spaces
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 5.2k
This is a bug report for perl from davidhand@davidhand.com, generated with the help of perlbug 1.40 running under perl 5.27.2. ----------------------------------------------------------------- [Please describe your issue here] At the moment, it's not possible to build perl in a directory, in Unix, when that directory or any of its parents have spaces in their names. Unfortunately, the build system is fairly diligent at finding such spaces, apparently using `readlink -f` or something similar; symlinking the directory to a better-behaving path doesn't work. The proximate problem is that `mkppport` fails. What seems to be happening is: - `mkppport` uses `which_perl` from `cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm` to find the path to perl, and then, if that path contains spaces, wraps it in quotes. - Unfortunately, `which_perl` already (unconditionally) wraps this path in quotes. (This behavior was introduced into ExtUtils-MakeMaker with patch 88e241815c3 in 2014-Nov-8.) - So, paths containing a space will end up as ""/path/with a space/"" And when this is parsed by a shell, the middle part is unquoted. - (Ironically, then, /only/ paths with spaces in them end up unquoted.) This small patch removes the step in `mkppport` that adds these extra quotes. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=install severity=low Type=Patch PatchStatus=HasPatch --- Site configuration information for perl 5.27.2: Configured by ptolemarch at Thu Jul 6 00:13:18 EDT 2017. Summary of my perl5 (revision 5 version 27 subversion 2) configuration: Derived from: f3652b5af842cd404a34145b6bf87d85df14add1 Ancestor: 9927ab6ab90ba710ebd3b027dd97c9fb9cc97623 Platform: osname=linux osvers=4.10.0-26-generic archname=x86_64-linux uname='linux patrick 4.10.0-26-generic #30-ubuntu smp tue jun 27 09:30:12 utc 2017 x86_64 x86_64 x86_64 gnulinux ' config_args='-Dusedevel -de' hint=previous useposix=true d_sigaction=define useithreads=undef usemultiplicity=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' optimize='-O2' cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='6.3.0 20170406' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 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-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /usr/local/lib/../lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.24.so so=so useshrplib=false libperl=libperl.a gnulibc_version='2.24' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E' cccdlflags='-fPIC' lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' Locally applied patches: uncommitted-changes cf97c377205803ee78d48e1136251131670c2563 53221369625e52e888037a12fbd598c29e2996d2 ba1ad970dce56a3e92d4f3c9708591a7a1a421fc 5daa429945bce761f1714c1c78496ba7d171c741 61ba992267af93038f513ca5bbede32cae192952 df5a2a2120b8dedc14cc7bcb60119fbc0437ab0a f3652b5af842cd404a34145b6bf87d85df14add1 --- @INC for perl 5.27.2: lib /usr/local/lib/perl5/site_perl/5.27.2/x86_64-linux /usr/local/lib/perl5/site_perl/5.27.2 /usr/local/lib/perl5/5.27.2/x86_64-linux /usr/local/lib/perl5/5.27.2 --- Environment for perl 5.27.2: HOME=/home/ptolemarch LANG=en_US.UTF-8 LANGUAGE=en_US LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/ptolemarch/.rakudobrew/bin:/home/ptolemarch/bin:/home/ptolemarch/.rakudobrew/bin:/home/ptolemarch/bin/work:/opt/kubernetes/platforms/linux/amd64:/opt/android-sdk-update-manager/tools:/opt/android-sdk-update-manager/platform-tools:/usr/local/bin:/usr/local/sbin:/usr/games/bin:/opt/X11/bin:/usr/X11/bin:/usr/bin:/usr/sbin:/bin:/sbin PERLBREW_CPAN_MIRROR=http://ftp.wayne.edu/CPAN/ PERLBREW_HOME=/home/ptolemarch/.perl5/perlbrew PERLBREW_ROOT=/home/ptolemarch/.perl5/perlbrew PERL_BADLANG (unset) PERL_CPANM_OPT=--mirror file:///home/ptolemarch/.perl5/minicpan/ --mirror-only SHELL=/bin/bash

Message body is not shown because sender requested not to inline it.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.6k
On Sun, 09 Jul 2017 06:09:04 GMT, davidhand@davidhand.com wrote: Show quoted text
> This is a bug report for perl from davidhand@davidhand.com, > generated with the help of perlbug 1.40 running under perl 5.27.2. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > At the moment, it's not possible to build perl in a directory, in > Unix, > when > that directory or any of its parents have spaces in their names. > Unfortunately, the build system is fairly diligent at finding such > spaces, > apparently using `readlink -f` or something similar; symlinking the > directory > to a better-behaving path doesn't work. > > The proximate problem is that `mkppport` fails. What seems to be > happening is: > - `mkppport` uses `which_perl` from > `cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm` > to find the path to perl, and then, if that path contains spaces, > wraps it in quotes. > - Unfortunately, `which_perl` already (unconditionally) wraps this > path > in > quotes. (This behavior was introduced into ExtUtils-MakeMaker > with > patch > 88e241815c3 in 2014-Nov-8.) > - So, paths containing a space will end up as > ""/path/with a space/"" > And when this is parsed by a shell, the middle part is unquoted. > - (Ironically, then, /only/ paths with spaces in them end up > unquoted.) > > This small patch removes the step in `mkppport` that adds these extra > quotes. >
I have a feeling that this has been proposed before, but have not been able to locate the relevant RT number. Does anyone recall that? Thank you very much. -- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.9k
On Sun, 09 Jul 2017 15:04:17 GMT, jkeenan wrote: Show quoted text
> On Sun, 09 Jul 2017 06:09:04 GMT, davidhand@davidhand.com wrote:
> > This is a bug report for perl from davidhand@davidhand.com, > > generated with the help of perlbug 1.40 running under perl 5.27.2. > > > > > > ----------------------------------------------------------------- > > [Please describe your issue here] > > > > At the moment, it's not possible to build perl in a directory, in > > Unix, > > when > > that directory or any of its parents have spaces in their names. > > Unfortunately, the build system is fairly diligent at finding such > > spaces, > > apparently using `readlink -f` or something similar; symlinking the > > directory > > to a better-behaving path doesn't work. > > > > The proximate problem is that `mkppport` fails. What seems to be > > happening is: > > - `mkppport` uses `which_perl` from > > `cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm` > > to find the path to perl, and then, if that path contains spaces, > > wraps it in quotes. > > - Unfortunately, `which_perl` already (unconditionally) wraps this > > path > > in > > quotes. (This behavior was introduced into ExtUtils-MakeMaker > > with > > patch > > 88e241815c3 in 2014-Nov-8.) > > - So, paths containing a space will end up as > > ""/path/with a space/"" > > And when this is parsed by a shell, the middle part is unquoted. > > - (Ironically, then, /only/ paths with spaces in them end up > > unquoted.) > > > > This small patch removes the step in `mkppport` that adds these extra > > quotes. > >
> > I have a feeling that this has been proposed before, but have not been > able to locate the relevant RT number. Does anyone recall that? >
http://www.nntp.perl.org/group/perl.perl5.porters/2014/10/msg221337.html # Start of long thread http://www.nntp.perl.org/group/perl.perl5.porters/2015/08/msg229692.html http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg230918.html # postings from Ivan Pozdeev -- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.2k
On Mon, 10 Jul 2017 01:58:02 GMT, jkeenan wrote: Show quoted text
> On Sun, 09 Jul 2017 15:04:17 GMT, jkeenan wrote:
> > On Sun, 09 Jul 2017 06:09:04 GMT, davidhand@davidhand.com wrote:
> > > This is a bug report for perl from davidhand@davidhand.com, > > > generated with the help of perlbug 1.40 running under perl 5.27.2. > > > > > > > > > ----------------------------------------------------------------- > > > [Please describe your issue here] > > > > > > At the moment, it's not possible to build perl in a directory, in > > > Unix, > > > when > > > that directory or any of its parents have spaces in their names. > > > Unfortunately, the build system is fairly diligent at finding such > > > spaces, > > > apparently using `readlink -f` or something similar; symlinking the > > > directory > > > to a better-behaving path doesn't work. > > > > > > The proximate problem is that `mkppport` fails. What seems to be > > > happening is: > > > - `mkppport` uses `which_perl` from > > > `cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm` > > > to find the path to perl, and then, if that path contains spaces, > > > wraps it in quotes. > > > - Unfortunately, `which_perl` already (unconditionally) wraps this > > > path > > > in > > > quotes. (This behavior was introduced into ExtUtils-MakeMaker > > > with > > > patch > > > 88e241815c3 in 2014-Nov-8.) > > > - So, paths containing a space will end up as > > > ""/path/with a space/"" > > > And when this is parsed by a shell, the middle part is unquoted. > > > - (Ironically, then, /only/ paths with spaces in them end up > > > unquoted.) > > > > > > This small patch removes the step in `mkppport` that adds these extra > > > quotes. > > >
> > > > I have a feeling that this has been proposed before, but have not been > > able to locate the relevant RT number. Does anyone recall that? > >
> > http://www.nntp.perl.org/group/perl.perl5.porters/2014/10/msg221337.html > # Start of long thread
Upon further inspection, the thread above appears not to be relevant. Show quoted text
-- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.4k
On Mon, 10 Jul 2017 02:03:30 GMT, jkeenan wrote: Show quoted text
> On Mon, 10 Jul 2017 01:58:02 GMT, jkeenan wrote:
> > On Sun, 09 Jul 2017 15:04:17 GMT, jkeenan wrote:
> > > On Sun, 09 Jul 2017 06:09:04 GMT, davidhand@davidhand.com wrote:
> > > > This is a bug report for perl from davidhand@davidhand.com, > > > > generated with the help of perlbug 1.40 running under perl 5.27.2. > > > > > > > > > > > > ----------------------------------------------------------------- > > > > [Please describe your issue here] > > > > > > > > At the moment, it's not possible to build perl in a directory, in > > > > Unix, > > > > when > > > > that directory or any of its parents have spaces in their names. > > > > Unfortunately, the build system is fairly diligent at finding such > > > > spaces, > > > > apparently using `readlink -f` or something similar; symlinking the > > > > directory > > > > to a better-behaving path doesn't work. > > > > > > > > The proximate problem is that `mkppport` fails. What seems to be > > > > happening is: > > > > - `mkppport` uses `which_perl` from > > > > `cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm` > > > > to find the path to perl, and then, if that path contains spaces, > > > > wraps it in quotes. > > > > - Unfortunately, `which_perl` already (unconditionally) wraps this > > > > path > > > > in > > > > quotes. (This behavior was introduced into ExtUtils-MakeMaker > > > > with > > > > patch > > > > 88e241815c3 in 2014-Nov-8.) > > > > - So, paths containing a space will end up as > > > > ""/path/with a space/"" > > > > And when this is parsed by a shell, the middle part is unquoted. > > > > - (Ironically, then, /only/ paths with spaces in them end up > > > > unquoted.) > > > > > > > > This small patch removes the step in `mkppport` that adds these extra > > > > quotes. > > > >
> > > > > > I have a feeling that this has been proposed before, but have not been > > > able to locate the relevant RT number. Does anyone recall that? > > >
> > > > http://www.nntp.perl.org/group/perl.perl5.porters/2014/10/msg221337.html > > # Start of long thread
> > Upon further inspection, the thread above appears not to be relevant. > >
This RT may also be relevant: https://rt.perl.org/Ticket/Display.html?id=129152 -- James E Keenan (jkeenan@cpan.org)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org