Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config variables containing ' cause trouble #10452

Open
p5pRT opened this issue Jun 19, 2010 · 3 comments
Open

config variables containing ' cause trouble #10452

p5pRT opened this issue Jun 19, 2010 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 19, 2010

Migrated from rt.perl.org#75880 (status was 'open')

Searchable as RT75880$

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2010

From nwc10+d'oh@colon.colondot.net

Created by nwc10+d'oh@colon.colondot.net

I'm not sure if we're ever going to solve this cleanly, but it *is* a bug
that we don't cope if the user enters a value containing a single quote,
even if all the "fix" is, is to refuse to accept the value.

perl will build and pass all tests with​:

$ ./perl -Ilib -V​:cf_email
cf_email='nwc10+d'oh@​colon.colondot.net';

but makedepend is not a happy bunny, because the config.sh we generate is not
valid shell. Here are the first 40 lines of errors​:

./config.sh​: line 111​: syntax error near unexpected token `('
./config.sh​: line 111​: `cppsymbols='_FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1 _LP64=1 _POSIX_C_SOURCE=200112L _POSIX_SOURCE=1 __CHAR_BIT__=8 __DBL_DENORM_MIN__=4.9406564584124654e-324 __DBL_DIG__=15 __DBL_EPSILON__=2.2204460492503131e-16 __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=1.7976931348623157e+308 __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=2.2250738585072014e-308 __DEC128_DEN__=0.000000000000000000000000000000001E-6143DL __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6144 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6143) __DEC128_MIN__=1E-6143DL __DEC32_DEN__=0.000001E-95DF __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=96 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-95) __DEC32_MIN__=1E-95DF __DEC64_DEN__=0.000000000000001E-383DD __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=384 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-383) __DEC64_MIN__=1E-383DD __DECIMAL_BID_FORMAT__=1 __DECIMAL_DIG__=21 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLT_DENORM_MIN__=1.40129846e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209290e-7F __FLT_EVAL_METHOD__=0 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282347e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435e-38F __FLT_RADIX__=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __GLIBC_MINOR__=7 __GLIBC__=2 __GNUC_GNU_INLINE__=1 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=2 __GNUC__=4 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1002 __INTMAX_MAX__=9223372036854775807L __INTMAX_TYPE__=long\ int __INT_MAX__=2147483647 __LDBL_DENORM_MIN__=3.64519953188247460253e-4951L __LDBL_DIG__=18 __LDBL_EPSILON__=1.08420217248550443401e-19L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=64 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176502e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626e-4932L __LONG_LONG_MAX__=9223372036854775807LL __LONG_MAX__=9223372036854775807L __LP64__=1 __MMX__=1 __NO_INLINE__=1 __PTRDIFF_TYPE__=long\ int __REGISTER_PREFIX__= __SCHAR_MAX__=127 __SHRT_MAX__=32767 __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=8 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_TYPE__=long\ unsigned\ int __SSE2_MATH__=1 __SSE2__=1 __SSE_MATH__=1 __SSE__=1 __STDC_HOSTED__=1 __STDC__=1 __UINTMAX_TYPE__=long\ unsigned\ int __USER_LABEL_PREFIX__= __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_SVID=1 __VERSION__="4.3.2" __WCHAR_MAX__=2147483647 __WCHAR_TYPE__=int __WINT_TYPE__=unsigned\ int __amd64=1 __amd64__=1 __gnu_linux__=1 __k8=1 __k8__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 __x86_64=1 __x86_64__=1 linux=1 unix=1''
./makedepend​: line 53​: -f​: command not found
cp​: missing destination file operand after `Makefile'
Try `cp --help' for more information.
./makedepend​: line 77​: $mf​: ambiguous redirect
./makedepend​: line 86​: -d​: command not found
mkdir​: cannot create directory `UU'​: File exists
make depend MAKEDEPEND=
make[1]​: Entering directory `/home/nick/Perl/perl'
sh ./makedepend MAKE=make
./makedepend​: Already running, exiting.
test -s perlmain.c && touch perlmain.c
cd x2p; make depend
make[2]​: Entering directory `/home/nick/Perl/perl/x2p'
sh ../makedepend MAKE=make
../config.sh​: line 111​: syntax error near unexpected token `('
../config.sh​: line 111​: `cppsymbols='_FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1 _LP64=1 _POSIX_C_SOURCE=200112L _POSIX_SOURCE=1 __CHAR_BIT__=8 __DBL_DENORM_MIN__=4.9406564584124654e-324 __DBL_DIG__=15 __DBL_EPSILON__=2.2204460492503131e-16 __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=1.7976931348623157e+308 __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=2.2250738585072014e-308 __DEC128_DEN__=0.000000000000000000000000000000001E-6143DL __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6144 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6143) __DEC128_MIN__=1E-6143DL __DEC32_DEN__=0.000001E-95DF __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=96 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-95) __DEC32_MIN__=1E-95DF __DEC64_DEN__=0.000000000000001E-383DD __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=384 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-383) __DEC64_MIN__=1E-383DD __DECIMAL_BID_FORMAT__=1 __DECIMAL_DIG__=21 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLT_DENORM_MIN__=1.40129846e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209290e-7F __FLT_EVAL_METHOD__=0 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282347e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435e-38F __FLT_RADIX__=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __GLIBC_MINOR__=7 __GLIBC__=2 __GNUC_GNU_INLINE__=1 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=2 __GNUC__=4 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1002 __INTMAX_MAX__=9223372036854775807L __INTMAX_TYPE__=long\ int __INT_MAX__=2147483647 __LDBL_DENORM_MIN__=3.64519953188247460253e-4951L __LDBL_DIG__=18 __LDBL_EPSILON__=1.08420217248550443401e-19L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=64 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176502e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626e-4932L __LONG_LONG_MAX__=9223372036854775807LL __LONG_MAX__=9223372036854775807L __LP64__=1 __MMX__=1 __NO_INLINE__=1 __PTRDIFF_TYPE__=long\ int __REGISTER_PREFIX__= __SCHAR_MAX__=127 __SHRT_MAX__=32767 __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT__=4 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=8 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_TYPE__=long\ unsigned\ int __SSE2_MATH__=1 __SSE2__=1 __SSE_MATH__=1 __SSE__=1 __STDC_HOSTED__=1 __STDC__=1 __UINTMAX_TYPE__=long\ unsigned\ int __USER_LABEL_PREFIX__= __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_SVID=1 __VERSION__="4.3.2" __WCHAR_MAX__=2147483647 __WCHAR_TYPE__=int __WINT_TYPE__=unsigned\ int __amd64=1 __amd64__=1 __gnu_linux__=1 __k8=1 __k8__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 __x86_64=1 __x86_64__=1 linux=1 unix=1''
../makedepend​: line 53​: -f​: command not found
cp​: missing destination file operand after `Makefile'
Try `cp --help' for more information.
../makedepend​: line 77​: $mf​: ambiguous redirect
../makedepend​: line 86​: -d​: command not found
mkdir​: cannot create directory `UU'​: File exists
make[3]​: Entering directory `/home/nick/Perl/perl/x2p'
echo hash.c str.c util.c walk.c | tr ' ' '\n' >.clist
make[3]​: Leaving directory `/home/nick/Perl/perl/x2p'
../makedepend​: line 108​: Finding dependencies for hash.o.​: command not found
../makedepend​: line 109​: #line 1 "hash.c"​: command not found
../makedepend​: line 110​: -n​: command not found
../makedepend​: line 140​: -e​: command not found
../makedepend​: line 108​: Finding dependencies for str.o.​: command not found
../makedepend​: line 109​: #line 1 "str.c"​: command not found
../makedepend​: line 110​: -n​: command not found
../makedepend​: line 140​: -e​: command not found
../makedepend​: line 108​: Finding dependencies for util.o.​: command not found
../makedepend​: line 109​: #line 1 "util.c"​: command not found
../makedepend​: line 110​: -n​: command not found
../makedepend​: line 140​: -e​: command not found
../makedepend​: line 108​: Finding dependencies for walk.o.​: command not found

I had to configure manually - Configure doesn't like single quotes within
command line parameters. Its problem is the eval in

: process the command line options
set X `for arg in "$@​"; do echo "X$arg"; done |
  sed -e s/X// | awk -f options.awk`
eval "set $*"
shift
rm -f options.awk

Nicholas Clark

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.13.1:

Configured by nick at Sat Jun 19 14:41:58 BST 2010.

Summary of my perl5 (revision 5 version 13 subversion 1) configuration:
  Derived from: 7c8a36d1711b0d18bcec53042196356cab2edf34
  Platform:
    osname=linux, osvers=2.6.18.8-xenu, archname=x86_64-linux
    uname='linux eris 2.6.18.8-xenu #1 smp sat oct 3 10:27:42 bst 2009 x86_64 gnulinux '
    config_args='-Dusedevel=y -Dcc=ccache gcc -Dld=gcc -Ubincompat5005 -Uinstallusrbinperl -Dinc_version_list=  -Dinc_version_list_init=0 -Doptimize=-g -Uusethreads -Uuse64bitall -Uusemymalloc -Duseperlio -Dprefix=~/Sandpit/snap5.9.x-v5.13.1-209-g7c8a36d -Uusevendorprefix -Uvendorprefix=~/Sandpit/snap5.9.x-v5.13.1-209-g7c8a36d -Dinstallman1dir=none -Dinstallman3dir=none -Uuserelocatableinc -Umad -e'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='ccache gcc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.3.2', 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='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
    libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.7.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.7'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -g -L/usr/local/lib -fstack-protector'

Locally applied patches:
    


@INC for perl 5.13.1:
    lib
    /home/nick/Sandpit/snap5.9.x-v5.13.1-209-g7c8a36d/lib/perl5/site_perl/5.13.1/x86_64-linux
    /home/nick/Sandpit/snap5.9.x-v5.13.1-209-g7c8a36d/lib/perl5/site_perl/5.13.1
    /home/nick/Sandpit/snap5.9.x-v5.13.1-209-g7c8a36d/lib/perl5/5.13.1/x86_64-linux
    /home/nick/Sandpit/snap5.9.x-v5.13.1-209-g7c8a36d/lib/perl5/5.13.1
    .


Environment for perl 5.13.1:
    HOME=/home/nick
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/nick/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/sbin:/sbin:/usr/sbin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2010

From @nwc10

On Sat Jun 19 08​:15​:46 2010, nwc10+d'oh@​colon.colondot.net wrote​:

I had to configure manually - Configure doesn't like single quotes
within
command line parameters. Its problem is the eval in

: process the command line options
set X `for arg in "$@​"; do echo "X$arg"; done |
sed -e s/X// | awk -f options.awk`
eval "set $*"
shift
rm -f options.awk

With the errors being​:

./Configure​: eval​: line 1567​: unexpected EOF while looking for matching `''
./Configure​: eval​: line 1568​: syntax error​: unexpected end of file
./optdef.sh​: line 3​: unexpected EOF while looking for matching `''
./optdef.sh​: line 4​: syntax error​: unexpected end of file

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2010

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants