openmodelicainterest  

Re: Problem installing Modelica on Ubuntu (lpsolve55)

Martin Sjölund
Wed, 28 Oct 2009 23:02:55 -0700

I know getting lpsolve to work is a bit annoying, but if you follow the instructions in the readme, it should be fine (lpsolve is a new dependency, but it is distributed with OMC since we never got the version provided with aptitude working). Good luck.

--
Martin Sjölund

From README.Cygwin.or.Linux.txt:

    liblpsolve55
        you need to copy this library from the Compiler runtime
        For 32-bit Linux:
        $ sudo cp Compiler/runtime/lpsolve/lib/linux/liblpsolve55.so 
/usr/local/lib
        $ sudo ldconfig /usr/local/lib/liblpsolve55.so
        For 64-bit Linux:
        $ sudo cp Compiler/runtime/lpsolve/lib/linux/liblpsolve55.so.64-bit 
/usr/local/lib/liblpsolve55.so
        $ sudo ldconfig /usr/local/lib/liblpsolve55.so
      Alternatively you can compile lpsolve yourself:
        Download the library:
        
http://www.cs.sunysb.edu/~algorith/implement/lpsolve/distrib/lp_solve_5.5.0.11_source.tar.gz
        and unpack it, then call in the top folder:
        $ make -f Makefile.Linux
        then copy lpsolve55/liblpsolve55.a to $OPENMODELICAHOME/build/lib/.


On Thu, 29 Oct 2009, Robert Colvin wrote:

Hi,

I'm having trouble installing OpenModelica on Ubuntu 8.04.  I took the
repository version on Wednesday 28th Oct.  There appears to be some
issue with lpsolve55.  Any help appreciated

Thanks,
Rob

---------------

make omc
(cd c_runtime && make -f Makefile)
make[1]: Entering directory `/home/robert/Modelica/trunk/c_runtime'
cd libf2c && make -f makefile.u
make[2]: Entering directory `/home/robert/Modelica/trunk/c_runtime/libf2c'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/robert/Modelica/trunk/c_runtime/libf2c'
mkdir -p sendData/release && g++ -c -o sendData/libsendData.o sendData/humbug.cpp 
&& ar -ru sendData/release/libsendData.a sendData/libsendData.o
cp blaswrap.h f2c.h integer_array.h memory_pool.h modelica_string.h 
base_array.h inline.h real_array.h string_array.h boolean_array.h index_spec.h 
matrix.h modelica.h read_write.h simulation_runtime.h simulation_events.h 
utility.h simulation_init.h simulation_input.h solver_dasrt.h solver_euler.h 
simulation_result.h meta_modelica.h meta_modelica_builtin.h sendData/sendData.h 
sendData/humbug.h java_interface.h jni.h jni_md.h jni_md_solaris.h 
jni_md_windows.h ../build/include/
cp libc_runtime.a libsim.a ../build/lib/
cp libf2c/libf2c.* ../build/lib/
cp sendData/release/libsendData.a ../build/lib/
make -C java_interface -f Makefile
make[2]: Entering directory 
`/home/robert/Modelica/trunk/c_runtime/java_interface'
* No JDK (javac) detected. Using the previosuly compiled jar-file.
* To compile, set JAVA_HOME to a JDK or add javac to the PATH.
cp -u modelica_java.jar antlr-3.1.3.jar ../../build/share/java
make[2]: Leaving directory 
`/home/robert/Modelica/trunk/c_runtime/java_interface'
make[1]: Leaving directory `/home/robert/Modelica/trunk/c_runtime'
#(cd Compiler/rml2sig && make -f Makefile)
(cd Compiler && make -f Makefile release)
make[1]: Entering directory `/home/robert/Modelica/trunk/Compiler'
rm -f .depend
time /home/robert/Modelica/rml/x86-linux-gcc/bin/rml -fdump-depends Absyn.mo 
AbsynDep.mo Algorithm.mo Builtin.mo Ceval.mo CevalScript.mo Cevalfunc.mo 
ClassInf.mo ClassLoader.mo Codegen.mo Connect.mo ConnectionGraph.mo Convert.mo 
DAE.mo DAELow.mo Derive.mo Debug.mo DFA.mo Dump.mo DumpGraphviz.mo Constants.mo 
Env.mo Error.mo Exp.mo SCode.mo Graphviz.mo HashTable.mo HashTable2.mo 
HashTable3.mo HashTable4.mo HashTable5.mo HashTableCG.mo Inst.mo Interactive.mo 
Lookup.mo Main.mo MetaUtil.mo Mod.mo ModUtil.mo PartFn.mo Patternm.mo Prefix.mo 
Static.mo SimCodegen.mo Types.mo TaskGraph.mo Util.mo Values.mo VarTransform.mo 
BackendVarTransform.mo Refactor.mo DAEQuery.mo XMLDump.mo InstanceHierarchy.mo 
UnitAbsyn.mo MMath.mo UnitAbsynBuilder.mo UnitChecker.mo  > .depend
6.50user 0.43system 0:06.99elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+24outputs (0major+131914minor)pagefaults 0swaps
(cd omc_release && make)
make[2]: Entering directory `/home/robert/Modelica/trunk/Compiler/omc_release'
make -C ../runtime
make[3]: Entering directory `/home/robert/Modelica/trunk/Compiler/runtime'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/robert/Modelica/trunk/Compiler/runtime'
make -C ../absyn_builder
make[3]: Entering directory `/home/robert/Modelica/trunk/Compiler/absyn_builder'
cd ../../flat_modelica_parser/src; make -f Makefile
make[4]: Entering directory 
`/home/robert/Modelica/trunk/flat_modelica_parser/src'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory 
`/home/robert/Modelica/trunk/flat_modelica_parser/src'
cd ../../modelica_parser/src; make -f Makefile
make[4]: Entering directory `/home/robert/Modelica/trunk/modelica_parser/src'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/robert/Modelica/trunk/modelica_parser/src'
java antlr.Tool  walker.g
ANTLR Parser Generator   Version 2.7.6 (20071205)   1989-2005
make[3]: Leaving directory `/home/robert/Modelica/trunk/Compiler/absyn_builder'
make -C ../modpar
make[3]: Entering directory `/home/robert/Modelica/trunk/Compiler/modpar'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/robert/Modelica/trunk/Compiler/modpar'
g++ -O3 -o omc Absyn.o AbsynDep.o Algorithm.o Builtin.o Ceval.o CevalScript.o 
Cevalfunc.o ClassInf.o ClassLoader.o Codegen.o Connect.o ConnectionGraph.o 
Convert.o DAE.o DAELow.o Derive.o Debug.o DFA.o Dump.o DumpGraphviz.o 
Constants.o Env.o Error.o Exp.o SCode.o Graphviz.o HashTable.o HashTable2.o 
HashTable3.o HashTable4.o HashTable5.o HashTableCG.o Inst.o Interactive.o 
Lookup.o Main.o MetaUtil.o Mod.o ModUtil.o PartFn.o Patternm.o Prefix.o 
Static.o SimCodegen.o Types.o TaskGraph.o Util.o Values.o VarTransform.o 
BackendVarTransform.o Refactor.o DAEQuery.o XMLDump.o InstanceHierarchy.o 
UnitAbsyn.o MMath.o UnitAbsynBuilder.o UnitChecker.o 
../absyn_builder/absyn_builder.a ../runtime/systemimpl.o 
../../c_runtime/libc_runtime.a ../runtime/rtopts.o ../runtime/socketimpl.o 
../runtime/printimpl.o ../runtime/ptolemyio.o ../runtime/errorext.o 
../runtime/ErrorMessage.o ../runtime/daeext.o ../runtime/corbaimpl_stub.o 
../modpar/libmodpar.a ../runtime/settingsimpl.o ../runtime/optmanager.!
o ../runtime/unitparser.o ../runtime/unitparserext.o -lm 
-L/home/robert/Modelica/rml/x86-linux-gcc/lib/plain -lrml -L/usr/lib/ -lantlr   
-ldl -llpsolve55 -L../../build/lib -lsendData
/usr/bin/ld: cannot find -llpsolve55
collect2: ld returned 1 exit status
make[2]: *** [omc] Error 1
make[2]: Leaving directory `/home/robert/Modelica/trunk/Compiler/omc_release'
make[1]: *** [omc_release] Error 2
make[1]: Leaving directory `/home/robert/Modelica/trunk/Compiler'
make: *** [omc] Error 2


---------------

Output from configuring:

./configure --without-CORBA
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking whether make sets $(MAKE)... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for $RMLHOME... yes
checking for rmlc... yes
checking for $ANTLRHOME... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for rml includefiles in
/home/robert/Modelica/rml/x86-linux-gcc... yes
checking for antlr header files... yes
checking for antlr libs... yes
checking for antlr.Tool in CLASSPATH... ANTLR Parser Generator   Version
2.7.6 (20071205)   1989-2005
yes
checking for readline include... yes
checking for readline libs... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for vprintf... yes
checking for _doprnt... no
checking for getcwd... yes
checking for select... yes
checking for strdup... yes
checking for strerror... yes
checking for scandir... yes
checking for socket... yes
yes
checking for gethostbyname... yes
yes
disabling CORBA
Not compiling ModPar
Not compiling with BOOST
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING:  Makefile.in seems to ignore the --datarootdir
setting
config.status: creating Compiler/rml2sig/Makefile
config.status: creating modelica_parser/test/parser/Makefile
config.status: creating mosh/src/Makefile
config.status: creating Compiler/Makefile
config.status: creating Compiler/omc_release/Makefile
config.status: creating Compiler/omc_debug/Makefile
config.status: creating Compiler/absyn_builder/Makefile
config.status: creating modelica_parser/test/lexer/Makefile
config.status: creating Compiler/test_codegen/Makefile
config.status: creating Compiler/runtime/Makefile
config.status: creating modelica_parser/src/Makefile
config.status: creating Compiler/modpar/Makefile
config.status: creating flat_modelica_parser/src/Makefile