LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mono 2.6 - configure error on slackware 12.2 (http://www.linuxquestions.org/questions/linux-software-2/mono-2-6-configure-error-on-slackware-12-2-a-776349/)

BoatX 12-17-2009 03:45 AM

Mono 2.6 - configure error on slackware 12.2
 
Hi

I try to install mono 2.6 from source but when I enter
Code:

./configure
I got this error
Code:

./configure: line 38079: syntax error near unexpected token `('
./configure: line 38079: `  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do'

I think that source of this problem may be version of bash
I working on Slackware 12.2, bash - 3.1.17 version.

the part of configure script which cause error is :

Code:

(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done
 (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      # `set' does not quote correctly, so add quotes (double-quote
      # substitution turns \\\\ into \\, and sed turns \\ into \).
      sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;; #(
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |

thanks in advance for help

TheNut007 12-17-2009 07:37 PM

The problem is there's an extra slash \ on line 38012, so the bash script engine is treating the following character as an escape, which invalidates the rest of the script.

Go to line 38012 and you'll see: mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\\'`\\etc
See the triple slash? Change the line to: mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\'`\\etc

Strangely that issue has been there for a while now. Nevertheless, it should work fine after that.

BoatX 12-18-2009 07:20 AM

Thanks for help. Now it works :)


All times are GMT -5. The time now is 11:13 PM.