#4326 closed defect (fixed)
Syntax error from configure script when trying to compile OpenModelica
Reported by: | Owned by: | Martin Sjölund | |
---|---|---|---|
Priority: | high | Milestone: | 1.12.0 |
Component: | Build Environment | Version: | |
Keywords: | Cc: |
Description
I am trying to compile OpenModelica on RedHat 6.7
Procedure:
1.) Clone from GitHub:
$ git clone --recursive https://github.com/OpenModelica/OpenModelica.git
2.) Compilation according to README.md:
$ autoconf
$ ./configure CC=clang CXX=clang++
[...]
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
./configure: line 4162: syntax error near unexpected token `fi'
./configure: line 4162: `fi'
configure: error: ./configure failed for OMCompiler
Since the full output is long, I am attaching 'openmodelica-compilation.txt' which contains my full output.
Thanks,
Nils
checking whether gfortran accepts -g... yes
./configure: line 4162: syntax error near unexpected token `fi'
./configure: line 4162: `fi'
configure: error: ./configure failed for OMCompiler
Attachments (2)
Change History (12)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
You need to use a non-German locale to attach files to a Trac system. I would need the OMCompiler/configure file to see which line is wrong (it is generated by your system's autoconf).
comment:6 by , 8 years ago
Right. Turns out that was why I did not understand the error myself. I am attaching the correct configure script. In that one, the syntax error is obvious. After I fixed that manually, I could run the configuration.
comment:7 by , 8 years ago
So it's an old autoconf that likes to emit bad code. Newer autoconf handles empty statements fine :)
I suppose the following should make it work fine and avoid the manual tweaking of configure:
-
configure.ac
diff --git a/configure.ac b/configure.ac index e983bb1..1808849 100644
a b AC_ARG_WITH(msys, [ --with-msys[=no] Point to an msys installation 163 163 CPPFLAGS="$CPPFLAGS -I$withval/$MINGWNUM/include -I$withval/$MINGWNUM/include/tre" 164 164 LDFLAGS="$LDFLAGS -L$withval/$MINGWNUM/lib" 165 165 echo "Got: $CPPFLAGS" 166 ],167 [168 166 ] 169 167 )
comment:8 by , 8 years ago
Milestone: | Future → 1.12.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: I got an error when trying to attach my file. So here is the full output: