- Index
- » Developer
- » OpenModelica development
- » Can't compile from subversion...
Can't compile from subversion...
Can't compile from subversion...
I can't compile from the checked-in Subversion files (trunk). Churns along for a while, then errors out with this:
Code:
...
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)
# 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 -C ../runtime/ -f Makefile
g++-4.2 -O3 -DUSE_CORBA -DUSE_MICO -I/local/QtSDK/Desktop/Qt/474/gcc/include -I/local/open-modelica/include -I/usr/local/qwt-6.0.1/lib/qwt.fmework/Headers/qwt -I/local/open-modelica/include/plain/ -I../../SimulationRuntime/c -I../../SimulationRuntime/c/simulation/results -I../../SimulationRuntime/c/util -I../../SimulationRuntime/c/meta -I../../SimulationRuntime/c/meta/gc -I../ -I. -I/local/open-modelica//include -c -o Error_omc.o Error_omc.cpp
In file included from Error_omc.cpp:42:
errorext.cpp: In function 'void* ErrorImpl__getMessages()':
errorext.cpp:347: error: 'Error__ERROR' was not declared in this scope
errorext.cpp:348: error: 'Error__WARNING' was not declared in this scope
errorext.cpp:349: error: 'Error__NOTIFICATION' was not declared in this scope
errorext.cpp:352: error: 'Error__SYNTAX' was not declared in this scope
errorext.cpp:353: error: 'Error__GRAMMAR' was not declared in this scope
errorext.cpp:354: error: 'Error__TRANSLATION' was not declared in this scope
errorext.cpp:355: error: 'Error__SYMBOLIC' was not declared in this scope
errorext.cpp:356: error: 'Error__SIMULATION' was not declared in this scope
errorext.cpp:357: error: 'Error__SCRIPTING' was not declared in this scope
errorext.cpp:360: error: 'Error__MESSAGE' was not declared in this scope
errorext.cpp:367: error: 'Absyn__TIMESTAMP' was not declared in this scope
errorext.cpp:367: error: 'Absyn__INFO' was not declared in this scope
errorext.cpp:368: error: 'Error__TOTALMESSAGE' was not declared in this scope
Error_omc.cpp: In function 'void Error_addMessage(int, void*, void*, const char*, void*)':
Error_omc.cpp:56: error: 'Error__SYNTAX_3dBOX0' was not declared in this scope
Error_omc.cpp:57: error: 'Error__ERROR_3dBOX0' was not declared in this scope
Error_omc.cpp: In function 'void Error_addSourceMessage(int, void*, void*, int, int, int, int, int, const char*, const char*, void*)':
Error_omc.cpp:81: error: 'Error__SYNTAX_3dBOX0' was not declared in this scope
Error_omc.cpp:82: error: 'Error__ERROR_3dBOX0' was not declared in this scope
make[4]: *** [Error_omc.o] Error 1
make[3]: *** [runtime] Error 2
make[2]: *** [all] Error 2
make[1]: *** [omc_release] Error 2
make: *** [omc] Error 2
Re: Can't compile from subversion...
Then you have a messed up omc or merged header, Try;
Code:
svn revert Compiler/OpenModelicaBootstrappingHeader.h
rm build/bin/omc # or make clean
make -j7 omc
- sjoelund.se
- 1700 Posts
Re: Can't compile from subversion...
OK, tried that. Now I error out at a different place:
Code:
...
echo Copying omc into ../build/bin
Copying omc into ../build/bin
cp omc_release/omc ../build/bin/
cp OpenModelicaBootstrappingHeader.h ../build/include/omc/
(time make -C PythonInterface -f Makefile)
*** Python interfaced was disabled by user configuration
real 0m0.005s
user 0m0.002s
sys 0m0.002s
*** OpenModelica configured without support for Qt
make -C mosh/src -f Makefile
g++-4.2 -O3 -Wall -DUSE_CORBA -DUSE_MICO -c mosh.cpp
In file included from mosh.cpp:55:
omc_communication.h:8:19: error: CORBA.h: No such file or directory
omc_communication.h:9:24: error: mico/throw.h: No such file or directory
In file included from mosh.cpp:55:
omc_communication.h:20: error: expected initializer before '<' token
omc_communication.h:21: error: expected initializer before '<' token
omc_communication.h:31: error: 'CORBA' has not been declared
omc_communication.h:31: error: expected `{' before 'Object'
omc_communication.h:31: error: function definition does not declare parameters
omc_communication.h:69: error: invalid use of incomplete type 'class OmcCommunication'
omc_communication.h:17: error: forward declaration of 'class OmcCommunication'
omc_communication.h:83: error: 'PortableServer' has not been declared
omc_communication.h:83: error: expected `{' before 'StubBase'
omc_communication.h:83: error: function definition does not declare parameters
omc_communication.h:101: error: 'PortableServer' has not been declared
omc_communication.h:101: error: expected `{' before 'StaticImplementation'
omc_communication.h:101: error: function definition does not declare parameters
omc_communication.h:129: error: 'CORBA' has not been declared
omc_communication.h:129: error: expected initializer before '*' token
mosh.cpp: In function 'void doCorbaCommunication(int, char**, const std::string*)':
mosh.cpp:173: error: 'CORBA' has not been declared
mosh.cpp:173: error: expected `;' before 'orb'
mosh.cpp:179: error: 'CORBA' has not been declared
mosh.cpp:179: error: expected `;' before 'obj'
mosh.cpp:181: error: 'OmcCommunication_var' was not declared in this scope
mosh.cpp:181: error: expected `;' before 'client'
mosh.cpp:187: error: 'client' was not declared in this scope
mosh.cpp:188: error: 'CORBA' has not been declared
mosh.cpp:193: error: 'client' was not declared in this scope
mosh.cpp:194: error: 'CORBA' has not been declared
mosh.cpp:199: error: 'CORBA' has not been declared
mosh.cpp:199: error: 'client' was not declared in this scope
mosh.cpp:218: error: 'client' was not declared in this scope
mosh.cpp:223: error: 'CORBA' has not been declared
make[1]: *** [mosh.o] Error 1
make: *** [mosh] Error 2
/local/open-modelica/src 88 %
Looks like the flags are not being passed properly to this Makefile. That g++ compile line is just wrong.
What directory is this?
Re: Can't compile from subversion...
Cannot be. The configure-script doesn't touch CXXFLAGS anywhere. What's your "./config.status --config"? And what does @CXXFLAGS@ resolve to for you?
- sjoelund.se
- 1700 Posts
Re: Can't compile from subversion...
My configure.in is a bit different:
Code:
Index: configure.in
===================================================================
--- configure.in (revision 11797)
+++ configure.in (working copy)
@@ -258,7 +258,7 @@
LIBS=""
AC_SEARCH_LIBS(dlopen,dl)
AC_SEARCH_LIBS(sqrt,m)
- LIBS="$LPLIB/liblpsolve55_pic.a $LPLIB/libcolamd.a $LIBS"
+ LIBS="$LPLIB/liblpsolve55_pic.a $LIBS"
AC_MSG_CHECKING([for static lpsolve55])
AC_LINK_IFELSE([AC_LANG_CALL([], [make_lp])], [LIBLPSOLVE55=$LIBS], [AC_MSG_ERROR([failed])])
AC_MSG_RESULT([$LIBLPSOLVE55])
@@ -544,6 +544,7 @@
SimulationRuntime/c/ModelicaExternalC/Makefile \
SimulationRuntime/c/simulation/libf2c/makefile.u \
SimulationRuntime/interactive/Makefile \
+tools/Makefile \
mosh/src/Makefile \
"
./config.status -config yields
Code:
'--disable-python-interface' '--without-paradiseo' '--with-MICO=/local/open-modelica' '--with-qwt=/usr/local/qwt-6.0.1/lib' '--prefix=/local/open-modelica' '--with-static-lpsolve=/local/open-modelica' 'CC=gcc-4.2' 'LDFLAGS=-L/local/QtSDK/Desktop/Qt/474/gcc/lib -L/local/open-modelica/lib -F/usr/local/qwt-6.0.1/lib' 'CPPFLAGS=-I/local/QtSDK/Desktop/Qt/474/gcc/include -I/local/open-modelica/include -I/usr/local/qwt-6.0.1/lib/qwt.fmework/Headers/qwt' 'CXX=g++-4.2' 'CXXFLAGS=-I/local/QtSDK/Desktop/Qt/474/gcc/include -I/local/open-modelica/include'
CXXFLAGS resolves to
Code:
-I/local/QtSDK/Desktop/Qt/474/gcc/include -I/local/open-modelica/include
Re: Can't compile from subversion...
That belongs to CPPFLAGS, not CXXFLAGS. Not that OpenModelica respects CPPFLAGS...
Make your configure CXXFLAGS into CFLAGS or everything will not be found.
- sjoelund.se
- 1700 Posts
Re: Can't compile from subversion...
Unfortunately, CFLAGS is usually a mess of LDFLAGS and CPPFLAGS and various other stuff, some of which may not even be appropriate for CXX.
But it's a good point. I'm not really sure what should go into CXXFLAGS, so I can just put that into CFLAGS.
Re: Can't compile from subversion...
CPPFLAGS = Flags for the preprocessor (c and c++)
CFLAGS = Flags for the C-compiler (c to o)
CXXFLAGS = Flags for the C++-compiler (cpp to o)
LDFLAGS = Only link-time flags
Since we use compilers that have the same C and C++ flags, we link them to be the same. Some LDFLAGS (-lmyLib) in CFLAGS should make the linking fail while others (-LlibPath) would succeed but should not be there anyway
- sjoelund.se
- 1700 Posts
- Index
- » Developer
- » OpenModelica development
- » Can't compile from subversion...