Hello,

I try to build OpenModelica on a newly installed Fedora Core 16 Linux.
When building the omc there are errors with antlr.

During configure I get antlr 2.7.7 reported, but antlr-3.2 is used?

I tried to switch to antlr-3.1.3 via symlink but the errors still
occure.


I use:
SMLNJ 110.74
MetaModelica svn rev. 226
OpenModelica svn rev. 11043

Java ist shipped with fedora:
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.4)
(fedora-61.1.10.4.fc16-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)


GCC, make and the rest is also shipped with fedora.


Do I need the Parser for building the omc? If not - how to
configure it out?
What can I do to isolate the error a little bit more?

Timo 
if [ "" = ".app" ]; then mkdir -p ./build/Applications/; fi
mkdir -p ./build/bin
mkdir -p ./build/lib/omc
mkdir -p ./build/lib/omc/libexec
mkdir -p ./build/include/omc
mkdir -p ./build/share/omc/java/
mkdir -p ./build/share//omc/scripts
mkdir -p ./build/share//omnotebook
mkdir -p ./build/share/doc/omc/testmodels
mkdir -p ./build/share/man//man1/
make -C testsuite/difftool
make[1]: Entering directory `/root/openmodelica/trunk/testsuite/difftool'
make[1]: `../../build/bin/omc-diff' is up to date.
make[1]: Leaving directory `/root/openmodelica/trunk/testsuite/difftool'
make -C SimulationRuntime/interactive -f Makefile
make[1]: Entering directory `/root/openmodelica/trunk/SimulationRuntime/interactive'
echo "Building client for interactive simulation ... "
Building client for interactive simulation ... 
g++ -I.. -Wall -o SampleClient/client client.cpp socket.cpp thread.cpp -lpthread
client.cpp: In function 'void* threadServerTransfer(void*)':
client.cpp:90:1: warning: control reaches end of non-void function [-Wreturn-type]
client.cpp: In function 'void* threadServerControl(void*)':
client.cpp:57:1: warning: control reaches end of non-void function [-Wreturn-type]
thread.cpp: In member function 'bool Semaphore::Post()':
thread.cpp:184:72: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
thread.cpp: In member function 'bool Semaphore::Post(unsigned int)':
thread.cpp:206:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
thread.cpp:208:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
make[1]: Leaving directory `/root/openmodelica/trunk/SimulationRuntime/interactive'
# Depends on libinteractive.a
make -C SimulationRuntime/c -f Makefile
make[1]: Entering directory `/root/openmodelica/trunk/SimulationRuntime/c'
make -C ModelicaExternalC -f Makefile
make[2]: Entering directory `/root/openmodelica/trunk/SimulationRuntime/c/ModelicaExternalC'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/openmodelica/trunk/SimulationRuntime/c/ModelicaExternalC'
# copy libraries
cp ./libSimulationRuntimeC.a \
   ./ModelicaExternalC/libModelicaExternalC.a \
   ../interactive/libinteractive.a ../../build/lib/omc
test -z "libf2c/libf2c.a" || cp simulation/libf2c/libf2c.* ../../build/lib/omc/
# copy header files
cp ./inline.h \
   ./openmodelica.h \
   ./ModelicaExternalC/ModelicaUtilities.h \
   ./openmodelica_func.h \
   ./simulation_data.h \
   ./f2c.h \
   ./util/*.h \
   ./math-support/*.h \
   ./simulation/*.h \
   ./simulation/solver/*.h \
   ./simulation/results/*.h \
   ./meta/*.h  ./meta/gc/*.h ../../build/include/omc
# copy fmi stuff
cp ../fmi/export/*.h \
   ../fmi/export/fmu_model_interface.c \
   ../../FMI/import/source/fmuWrapper.h \
   ../../FMI/import/source/xmlparser.h ../../build/include/omc
# copy java interface stuff
make[2]: Entering directory `/root/openmodelica/trunk/SimulationRuntime/c/util/java_interface'
make[2]: Nothing to be done for `build'.
make[2]: Leaving directory `/root/openmodelica/trunk/SimulationRuntime/c/util/java_interface'
make[2]: Entering directory `/root/openmodelica/trunk/SimulationRuntime/c/util/java_interface'
cp antlr-3.1.3.jar ptplot.jar ../../../../build/share/omc/java
cp ptplot_license.txt antlr_license.txt ../../../../build/share/doc/omc
cp modelica_java.jar ../../../../build/share/omc/java
make[2]: Leaving directory `/root/openmodelica/trunk/SimulationRuntime/c/util/java_interface'
make[1]: Leaving directory `/root/openmodelica/trunk/SimulationRuntime/c'
(cp -p doc/*.pdf doc/*.txt doc/OpenModelicaAPI-Howto/*.pdf ./build/share/doc/omc)
rm -f build/doc/omc/CMakeLists.txt
(cp -p Examples/*.* ./build/share/doc/omc/testmodels/)
cp -p ./c_runtime/interactive/README.txt ./build/share/doc/omc/OpenModelica-InteractiveSimulation-README.txt
# man pages
(cd doc/manpages/; for f in *.1; do gzip $f -c > ../.././build/share/man//man1/$f.gz && touch -r $f ../.././build/share/man//man1/$f.gz; done)
make -C FMI/import/source -f Makefile
make[1]: Entering directory `/root/openmodelica/trunk/FMI/import/source'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/openmodelica/trunk/FMI/import/source'
(cp -p FMI/import/source/fmuWrapper.h FMI/import/source/xmlparser.h ./build/include/omc)
(cd Compiler && make -f Makefile release)
make[1]: Entering directory `/root/openmodelica/trunk/Compiler'
cd scripts; cp doPlot openmodelica.lefty convert_lines.pl default_profiling.xsl replace-startValue.sh replace-startValue.xsl ../../build/share/omc/scripts
OpenModelica has not been compiled yet. Using previously generated SimCode files.
cp FrontEnd/ModelicaBuiltin.mo FrontEnd/MetaModelicaBuiltin.mo ../build/lib/omc/
(cd omc_release && make)
make[2]: Entering directory `/root/openmodelica/trunk/Compiler/omc_release'
# You're using the proper Unix Makefile. Thanks for making my life easier.
# Updated dependencies; reload make and compile the target
make -f Makefile omc
make[3]: Entering directory `/root/openmodelica/trunk/Compiler/omc_release'
make -C ../runtime/ -f Makefile
make[4]: Entering directory `/root/openmodelica/trunk/Compiler/runtime'
cp libomcruntime.a ../../build/lib/omc/
make[4]: Leaving directory `/root/openmodelica/trunk/Compiler/runtime'
make -C ../../Parser/ -f Makefile
make[4]: Entering directory `/root/openmodelica/trunk/Parser'
java -cp ./antlr-3.2/lib/antlr-3.2.jar org.antlr.Tool -report Modelica.g
ANTLR Grammar Report; Stats Version 4
Grammar: Modelica
Type: combined
Target language: C
Output: none
Grammar option k: none
Grammar option backtrack: false
Rules: 139
Productions: 158
Decisions: 186
Cyclic DFA decisions: 1
LL(1) decisions: 12
Min fixed k: -1
Max fixed k: 3
Average fixed k: 0.0
Standard deviation of fixed k: 1.115600832462626
Min acyclic DFA states: 0
Max acyclic DFA states: 65
Average acyclic DFA states: 1.054054054054054
Standard deviation of acyclic DFA states: 5.449102169493985
Total acyclic DFA states: 195
Min cyclic DFA states: 6
Max cyclic DFA states: 6
Average cyclic DFA states: 6.0
Standard deviation of cyclic DFA states: 0.0
Total cyclic DFA states: 6
Vocabulary size: 143
DFA creation time in ms: 4225
Number of semantic predicates found: 13
Number of manual fixed lookahead k=value options: 2
Number of nondeterministic decisions: 2
Number of nondeterministic decisions resolved with predicates: 2
Number of DFA conversions terminated early: 0
Number of errors: 0
Number of warnings: 0
Number of infos: 0
Number of syntactic predicates found: 3
Decisions with syntactic predicates: 2
Decision DFAs using syntactic predicates: 2
Decisions with semantic predicates: 13
Decision DFAs using semantic predicates: 0

Backtracking report:
Number of decisions that backtrack: 2
Rule top_algorithm decision 178 location 1314:3
Rule code_expression decision 166 location 1249:5

NFA conversion early termination report:
Number of NFA conversions that terminated early: 0

## Recover from the removal of ModelicaParser.h
java -cp ./antlr-3.2/lib/antlr-3.2.jar org.antlr.Tool -report MetaModelica_Lexer.g
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'o'": OPTIMIZATION, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'e'": EQUALITY, END_MATCH, END_MATCHCONTINUE, END_PARFOR, Tokens

As a result, token(s) END_MATCH,END_MATCHCONTINUE,END_PARFOR,Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'p'": PARFOR, T_PARALLEL, T_LOCAL, T_GLOBAL, T_KERNEL, Tokens

As a result, token(s) T_PARALLEL,T_LOCAL,T_GLOBAL,T_KERNEL,Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'s'": SUBTYPEOF, STREAM, Tokens

As a result, token(s) STREAM,Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:74:1: Multiple token rules can match input such as "'<'": LESS, LESSEQ, LESSGT

As a result, token(s) LESSEQ,LESSGT were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'l'": LOCAL, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'/'": SLASH, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'_'": ALLWILD, WILD, Tokens

As a result, token(s) WILD,Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'g'": GUARD, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:76:1: Multiple token rules can match input such as "'>'": GREATER, GREATEREQ

As a result, token(s) GREATEREQ were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'a'": AS, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'c'": CASE, CONSTRAINT, Tokens

As a result, token(s) CONSTRAINT,Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'='": EQEQ, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'.'": PLUS_EW, MINUS_EW, STAR_EW, SLASH_EW, POWER_EW, Tokens

As a result, token(s) MINUS_EW,STAR_EW,SLASH_EW,POWER_EW,Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'u'": UNIONTYPE, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "':'": COLONCOLON, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'f'": FAILURE, Tokens

As a result, token(s) Tokens were disabled for that input
warning(209): MetaModelica_Lexer.g:1:1: Multiple token rules can match input such as "'m'": MATCH, MATCHCONTINUE, Tokens

As a result, token(s) MATCHCONTINUE,Tokens were disabled for that input
error(208): MetaModelica_Lexer.g:111:1: The following token definitions can never be matched because prior tokens match the same input: MATCHCONTINUE,WILD,END_MATCH,END_MATCHCONTINUE,LESSEQ,LESSGT,GREATEREQ,MINUS_EW,STAR_EW,SLASH_EW,POWER_EW,STREAM,CONSTRAINT,T_PARALLEL,T_LOCAL,T_GLOBAL,T_KERNEL,END_PARFOR
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'f'": T_FALSE, FINAL, FLOW, FOR, FUNCTION, IDENT

As a result, token(s) FINAL,FLOW,FOR,FUNCTION,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:279:1: Multiple token rules can match input such as "'/'": LINE_COMMENT, ML_COMMENT

As a result, token(s) ML_COMMENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'r'": RECORD, REDECLARE, REPLACEABLE, RESULTS, RETURN, IDENT

As a result, token(s) REDECLARE,REPLACEABLE,RESULTS,RETURN,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'a'": T_ALGORITHM, T_AND, T_ANNOTATION, IDENT

As a result, token(s) T_AND,T_ANNOTATION,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'b'": BLOCK, BREAK, IDENT

As a result, token(s) BREAK,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'C'": CODE, IDENT

As a result, token(s) IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'e'": EACH, ELSE, ELSEIF, ELSEWHEN, ENUMERATION, EQUATION, ENCAPSULATED, EXPANDABLE, EXTENDS, EXTERNAL, END_IF, END_FOR, END_WHEN, END_WHILE, END_IDENT, T_END, IDENT

As a result, token(s) ELSE,ELSEIF,ELSEWHEN,ENUMERATION,EQUATION,ENCAPSULATED,EXPANDABLE,EXTENDS,EXTERNAL,END_IF,END_FOR,END_WHEN,END_WHILE,END_IDENT,T_END,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'o'": T_OUTER, OPERATOR, OVERLOAD, T_OR, T_OUTPUT, IDENT

As a result, token(s) OPERATOR,OVERLOAD,T_OR,T_OUTPUT,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'p'": T_PACKAGE, PARAMETER, PARTIAL, PROTECTED, PUBLIC, PURE, IDENT

As a result, token(s) PARAMETER,PARTIAL,PROTECTED,PUBLIC,PURE,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'u'": UNSIGNED_REAL, IDENT

As a result, token(s) IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'n'": T_NOT, IDENT

As a result, token(s) IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'d'": DISCRETE, DER, DEFINEUNIT, IDENT

As a result, token(s) DER,DEFINEUNIT,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'w'": WHEN, WHILE, WITHIN, IDENT

As a result, token(s) WHILE,WITHIN,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:260:1: Multiple token rules can match input such as "':'": ASSIGN, COLON

As a result, token(s) COLON were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'m'": MODEL, IDENT

As a result, token(s) IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'t'": THEN, T_TRUE, TYPE, IDENT

As a result, token(s) T_TRUE,TYPE,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'l'": LOOP, IDENT

As a result, token(s) IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:290:1: Multiple token rules can match input such as "'$'": CODE, CODE_NAME, CODE_EXP, CODE_VAR

As a result, token(s) CODE_NAME,CODE_EXP,CODE_VAR were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'i'": IF, IMPORT, T_IN, INITIAL, INNER, T_INPUT, IMPURE, IDENT

As a result, token(s) IMPORT,T_IN,INITIAL,INNER,T_INPUT,IMPURE,IDENT were disabled for that input
warning(209): BaseModelica_Lexer.g:364:1: Multiple token rules can match input such as "'.'": DOT, UNSIGNED_INTEGER

As a result, token(s) UNSIGNED_INTEGER were disabled for that input
warning(209): BaseModelica_Lexer.g:338:1: Multiple token rules can match input such as "'c'": CLASS, CONNECT, CONNECTOR, CONSTANT, CONSTRAINEDBY, IDENT

As a result, token(s) CONNECT,CONNECTOR,CONSTANT,CONSTRAINEDBY,IDENT were disabled for that input
error(208): BaseModelica_Lexer.g:336:1: The following token definitions can never be matched because prior tokens match the same input: T_AND,T_ANNOTATION,CONNECT,CONNECTOR,CONSTANT,DER,DEFINEUNIT,ELSE,ELSEIF,ELSEWHEN,ENUMERATION,EQUATION,ENCAPSULATED,EXPANDABLE,EXTENDS,CONSTRAINEDBY,EXTERNAL,FINAL,FLOW,FOR,FUNCTION,IMPORT,T_IN,INITIAL,INNER,T_INPUT,OPERATOR,OVERLOAD,T_OR,T_OUTPUT,PARAMETER,PARTIAL,PROTECTED,PUBLIC,REDECLARE,REPLACEABLE,RESULTS,T_TRUE,TYPE,WHILE,WITHIN,RETURN,BREAK,COLON,ML_COMMENT,CODE_NAME,CODE_EXP,CODE_VAR,PURE,IMPURE,END_IF,END_FOR,END_WHEN,END_WHILE,END_IDENT,T_END
ANTLR Grammar Report; Stats Version 4
Grammar: MetaModelica_Lexer
Type: lexer
Target language: C
Output: none
Grammar option k: none
Grammar option backtrack: false
Rules: 42
Productions: 83
Decisions: 1
Cyclic DFA decisions: 0
LL(1) decisions: 1
Min fixed k: 1
Max fixed k: 1
Average fixed k: 1.0
Standard deviation of fixed k: 0.0
Min acyclic DFA states: 49
Max acyclic DFA states: 49
Average acyclic DFA states: 49.0
Standard deviation of acyclic DFA states: 0.0
Total acyclic DFA states: 49
Min cyclic DFA states: 0
Max cyclic DFA states: 0
Average cyclic DFA states: 0.0
Standard deviation of cyclic DFA states: 0.0
Total cyclic DFA states: 0
Vocabulary size: 65536
DFA creation time in ms: 1924
Number of semantic predicates found: 0
Number of manual fixed lookahead k=value options: 1
Number of nondeterministic decisions: 1
Number of nondeterministic decisions resolved with predicates: 0
Number of DFA conversions terminated early: 1
Number of errors: 2
Number of warnings: 39
Number of infos: 0
Number of syntactic predicates found: 0
Decisions with syntactic predicates: 0
Decision DFAs using syntactic predicates: 0
Decisions with semantic predicates: 0
Decision DFAs using semantic predicates: 0

Backtracking report:
Number of decisions that backtrack: 0

NFA conversion early termination report:
Number of NFA conversions that terminated early: 1
Rule Tokens decision 1 location 1:8

make[4]: *** [MetaModelica_Lexer.stamp] Error 1
make[4]: Leaving directory `/root/openmodelica/trunk/Parser'
make[3]: *** [parser] Error 2
make[3]: Leaving directory `/root/openmodelica/trunk/Compiler/omc_release'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/openmodelica/trunk/Compiler/omc_release'
make[1]: *** [omc_release] Error 2
make[1]: Leaving directory `/root/openmodelica/trunk/Compiler'
make: *** [omc] Error 2

Reply via email to