From: "luislavena (Luis Lavena)" Date: 2013-03-13T10:26:57+09:00 Subject: [ruby-core:53355] [ruby-trunk - Bug #8071][Assigned] Ruby 2.0 ./configure fails with syntax error on Illumos distributions Issue #8071 has been updated by luislavena (Luis Lavena). Category set to build Status changed from Open to Assigned Assignee set to nobu (Nobuyoshi Nakada) =begin RubyInstaller CI seems to be suffering something related to this too: http://ci.rubyinstaller.org/job/ruby-2_0_0-x64-build/35/console ../configure: line 19620: syntax error near unexpected token `[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\' ../configure: line 19620: ` s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"' =end ---------------------------------------- Bug #8071: Ruby 2.0 ./configure fails with syntax error on Illumos distributions https://bugs.ruby-lang.org/issues/8071#change-37551 Author: psanford (Peter Sanford) Status: Assigned Priority: Normal Assignee: nobu (Nobuyoshi Nakada) Category: build Target version: ruby -v: ruby 2.0.0p0 Trying to build Ruby 2.0 on Illumos distributions, ./configure fails with the following syntax error: ./configure: line 2780: syntax error at line 19075: `(' unexpected The problem code is in this function: shvar_to_cpp() { local var="$1" val="$2" local exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`" local arch_pat="`echo \"${arch}\" | sed 's/\\./\\\\./g'`" local sitearch_pat="`echo \"${sitearch}\" | sed 's/\\./\\\\./g'`" val="`echo '"'"${val}"'"' | sed \ -e 's/\${\([A-Z][A-Z_]*\)}/"\1"/g' \ -e 's|\${sitearchlibdir}|'"${sitearchlibdir}|g" \ -e 's|\${sitearchincludedir}|'"${sitearchincludedir}|g" \ -e 's|\${archlibdir}|'"${archlibdir}|g" \ -e 's|\${archincludedir}|'"${archincludedir}|g" \ -e 's|\${libdir}|'"${libdir}|g" \ -e 's/\${ruby_version}/"RUBY_LIB_VERSION"/g' \ -e 's/\${arch}/"arch"/g' \ -e 's/\${sitearch}/"arch"/g' \ -e 's/\${vendorarchdir}/"RUBY_VENDOR_ARCH_LIB"/g' \ -e 's/\${sitearchdir}/"RUBY_SITE_ARCH_LIB"/g' \ -e 's/\${vendorlibdir}/"RUBY_VENDOR_LIB2"/g' \ -e 's/\${sitelibdir}/"RUBY_SITE_LIB2"/g' \ -e 's/\${vendordir}/"RUBY_VENDOR_LIB"/g' \ -e 's/\${sitedir}/"RUBY_SITE_LIB"/g' \ -e 's/\${rubylibdir}/"RUBY_LIB"/g' \ -e 's/\${rubylibprefix}/"RUBY_LIB_PREFIX"/g' \ -e 's/\${rubyarchprefix}/"RUBY_ARCH_PREFIX_FOR(arch)"/g' \ -e 's/\${rubysitearchprefix}/"RUBY_SITEARCH_PREFIX_FOR(arch)"/g' \ -e 's/\${exec_prefix}/"RUBY_EXEC_PREFIX"/g' \ -e "s|${exec_prefix_pat}/|"'"RUBY_EXEC_PREFIX"/|g' \ -e "s|${arch_pat}|"'"arch"|g' \ -e "s|${sitearch_pat}|"'"sitearch"|g' \ -e 's|^\"NONE/|RUBY_EXEC_PREFIX\"/|' \ -e 's|^\"NONE\"|\"'"${prefix}"'\"|' \ -e 's/^\"\"\(.\)/\1/;s/\(.\)\"\"$/\1/' `" eval $var='"$val"' } Specifically these two lines: -e 's/\${rubyarchprefix}/"RUBY_ARCH_PREFIX_FOR(arch)"/g' \ -e 's/\${rubysitearchprefix}/"RUBY_SITEARCH_PREFIX_FOR(arch)"/g' \ I tested this on both SmartOS and OmniOS. On both of these distributions /bin/sh is ksh93. I was able to work around this problem by using the GNU version of sh or bash instead of /bin/sh. -- http://bugs.ruby-lang.org/