View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013199CMake(No Category)public2012-05-06 14:522016-06-06 16:40
Reporterrthurner 
Assigned ToBrad King 
PriorityhighSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformx86, sparcOSsolarisOS Version9
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.9Fixed in VersionCMake 2.8.9 
Summary0013199: bootstrap: bad substitution
Descriptioncd work/solaris9-i386/build-isa-i386/cmake-2.8.8 && mkdir -p . && cd . && /usr/bin/env -i PATH="/home/rupert/mgar-sav/pkg/.buildsys/v2/gar/bin/sos12-wrappers:/home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/install-isa-i386/opt/csw/bin:/home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/install-isa-i386/opt/csw/bin:/home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/install-isa-i386/opt/csw/sbin:/home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/install-isa-i386/opt/csw/sbin:/opt/csw/bin:/opt/csw/bin:/opt/csw/sbin:/opt/csw/sbin:/opt/SUNWspro/bin:/home/rupert/mgar-sav/pkg/.buildsys/v2/gar/bin:/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin" prefix="/opt/csw" exec_prefix="/opt/csw" bindir="/opt/csw/bin" sbindir="/opt/csw/sbin" libexecdir="/opt/csw/libexec" datadir="/share/cmake-2.8.8" sysconfdir="/etc/opt/csw" sharedstatedir="/share" localstatedir="/var/opt/csw" libdir="/opt/csw/lib" infodir="/share/info" lispdir="/share/emacs/site-lisp" includedir="/opt/csw/include" mandir="/share/man" docdir="/share/doc/cmake-2.8.8" sourcedir="/opt/csw/src" CPPFLAGS="-I/opt/csw/include" CFLAGS="-xO3 -m32 -xarch=386 -xnorunpath" CXXFLAGS="-xO3 -m32 -xarch=386 -norunpath" LDFLAGS="-m32 -xarch=386 -L/opt/csw/lib" FFLAGS="-xO3 -m32 -xarch=386" FCFLAGS="-xO3 -m32 -xarch=386" ASFLAGS="" OPTFLAGS="-xO3 -m32 -xarch=386" CC="/opt/SUNWspro/bin/cc" CXX="/opt/SUNWspro/bin/CC" CC_HOME="/opt/SUNWspro" CC_VERSION="Sun C 5.9 SunOS_i386 Patch 124868-15 2010/08/11" CXX_VERSION="Sun C++ 5.9 SunOS_i386 Patch 124864-29 2012/04/04" GARCH="i386" GAROSREL="5.9" GARPACKAGE="trunk" LD_OPTIONS="-R/opt/csw/lib" PKG_CONFIG_PATH="/opt/csw/lib/pkgconfig" DESTDIR="/home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/install-isa-i386" /home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/build-isa-i386/cmake-2.8.8/configure --prefix=/opt/csw --exec_prefix=/opt/csw --bindir=/opt/csw/bin --sbindir=/opt/csw/sbin --libexecdir=/opt/csw/libexec --datadir=/share/cmake-2.8.8 --sysconfdir=/etc/opt/csw --sharedstatedir=/share --localstatedir=/var/opt/csw --libdir=/opt/csw/lib --infodir=/share/info --includedir=/opt/csw/include --mandir=/share/man --docdir=/share/doc/cmake-2.8.8
/home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/build-isa-i386/cmake-2.8.8/bootstrap: bad substitution
Unknown option: --exec_prefix=/opt/csw
gmake[1]: *** [configure-work/solaris9-i386/build-isa-i386/cmake-2.8.8/configure] Error 1
gmake[1]: Leaving directory `/home/rupert/mgar-sav/pkg/cmake/trunk'
gmake: *** [merge-isa-i386] Error 2
TagsNo tags attached.
Attached Filespatch file icon 0001-bootstrap-Port-back-to-old-shells-13199.patch [^] (3,121 bytes) 2012-05-08 09:53 [Show Content]

 Relationships
has duplicate 0013335closedBrad King Build installs into wrong directory due to bug in bootstrap script 

  Notes
(0029406)
rthurner (reporter)
2012-05-06 16:33

very simple parameters fail as well ...

rupert @ unstable9s : ~/mgar-sav
$ /home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/build-isa-i386/cmake-2.8.8/bootstrap --parallel=24
/home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/build-isa-i386/cmake-2.8.8/bootstrap: bad substitution
(0029410)
Brad King (manager)
2012-05-07 08:29

I have no access to that shell. A patch would be appreciated.
(0029416)
rthurner (reporter)
2012-05-08 03:11

2.8.7 of cmake did not behave like this. can it be set to something, e.g. CONFIG_SHELL=/bin/bash, if this is the shell you prefer?
(0029418)
Brad King (manager)
2012-05-08 09:26

The bootstrap script has been rewritten since 2.8.7 and uses some slightly more modern shell conventions. However, it is still a POSIX-compliant shell script that does not use any bash extensions. The script must now be using a POSIX shell feature not implemented by your shell.

The most likely candidate is the new argument processing block in 2.8.8:

  http://cmake.org/gitweb?p=cmake.git;a=blob;f=bootstrap;hb=v2.8.8#l540 [^]

It uses the construct "${1#*=}" to strip off the "--option=" part of "--option=value" arguments:

  http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02 [^]

Does it get this error if invoked with no arguments?
(0029419)
Brad King (manager)
2012-05-08 09:50

Re 0013199:0029418: Use of the ${x#y} syntax was introduced here:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f39e82c9 [^]
(0029420)
Brad King (manager)
2012-05-08 09:53

Please test patch "0001-bootstrap-Port-back-to-old-shells-13199.patch" on top of 2.8.8.
(0029574)
rthurner (reporter)
2012-05-28 04:58

a simple test works again:
/home/rupert/mgar-sav/pkg/cmake/trunk/work/solaris9-i386/build-isa-i386/cmake-2.8.8/bootstrap --parallel=24

the whole command above gives:
Unknown option: --exec_prefix=/opt/csw

you changed the supported paramters as well?
(0029575)
rthurner (reporter)
2012-05-28 05:18

anyway, added your patch to our build, seesm to work again. many thanks!
http://sourceforge.net/apps/trac/gar/changeset/18141/csw/mgar/pkg/cmake/trunk [^]
(0029576)
Brad King (manager)
2012-05-28 08:51

Patch from 0013199:0029420 applied:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5dc7689 [^]

Re 0013199:0029574: The --exec_prefix option was never recognized. The change in behavior is that unknown options are now rejected instead of ignored.
(0031136)
David Cole (manager)
2012-10-01 13:23

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-05-06 14:52 rthurner New Issue
2012-05-06 16:33 rthurner Note Added: 0029406
2012-05-07 08:29 Brad King Note Added: 0029410
2012-05-08 03:11 rthurner Note Added: 0029416
2012-05-08 09:26 Brad King Note Added: 0029418
2012-05-08 09:47 Brad King Assigned To => Brad King
2012-05-08 09:47 Brad King Status new => assigned
2012-05-08 09:50 Brad King Note Added: 0029419
2012-05-08 09:53 Brad King File Added: 0001-bootstrap-Port-back-to-old-shells-13199.patch
2012-05-08 09:53 Brad King Note Added: 0029420
2012-05-28 04:58 rthurner Note Added: 0029574
2012-05-28 05:18 rthurner Note Added: 0029575
2012-05-28 08:51 Brad King Note Added: 0029576
2012-05-28 08:51 Brad King Status assigned => resolved
2012-05-28 08:51 Brad King Fixed in Version => CMake 2.8.9
2012-05-28 08:51 Brad King Target Version => CMake 2.8.9
2012-06-21 09:55 Brad King Relationship added has duplicate 0013335
2012-10-01 13:23 David Cole Note Added: 0031136
2012-10-01 13:23 David Cole Status resolved => closed
2016-06-06 16:40 Brad King Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team