- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Readline Error
Readline Error
Readline Error
Hi Everyone,
I tried for 1 week to compile Openmodelica, and I'm fed up with an error!!
I use gcc452, rml160, and I set variable for readline5, but I've got ever the same message
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking for library containing readline... no
configure: error: readline missing..
Someone else could hep me?
Regards.
Idir.
Re: Readline Error
If using:
Code:
./configure ... LDFLAGS=-L/path/to/readline/lib/
Make sure /path/to/readline/lib/libreadline.a exists
Or simply ./configure --disable-omshell-terminal to compile without readline (use Qt-based OMShell instead of readline-based OMShell-terminal). Note that RML 1.6 is way too old for OpenModelica.
Code:
$ rml -v
rml+mmc compiler version 2.4.8 built 2011-01-20 15:30
- sjoelund.se
- 1700 Posts
Re: Readline Error
Dear sjoelund.se,
I tried to compile with this option ./configure --disable-omshell-terminal --prefix=/home/XXXXXX
I have no more readline error, but now Ive got this
checking for library containing colamd... no
checking for library containing make_lp... no
configure: error: linking failed
It seems to come form lpsolve, a locate command gives me this
/usr/lib/liblpsolve55.so
/usr/lib64/liblpsolve55.so
I try to compile on a centos (REHL5) X64, 2.6.18....
If you could help me...
Regards.
Idir.
Re: Readline Error
What error does this produce?
Code:
echo "void main() {}" > a.c && gcc a.c -llpsolve55
Also, do you have lpsolve55_pic on your system? You can also try --with-static-lpsolve if you have liblpsolve55.a and libcolamd.a...
- sjoelund.se
- 1700 Posts
Re: Readline Error
Dear sjoelund.se,
Sorry to be back so late (lot of jobs) , so now I'm back in the OM world, well now I'm compiling with this command line.
./configure --prefix=XX/OpenModelica_1.7 --with-paradiseo=/XX/paradiseo-1.2.1 LDFLAGS="-lncurses -L/XX/lp_solve_5.5/lpsolve55"
configure is Ok, but when i launch a "make" I've got an error, because it does not find "rml", in the bin folder of rml Ive got only rmlc but not rml, could you give me a link where I could download a recent rml version with both binaries..
Regards
Idir.
- sjoelund.se
- 1700 Posts
Re: Readline Error
You should always install the rml binary. However, if you compiled using mlton, you need an additional command
Code:
$(MAKE) install
$(MAKE) -C compiler install-mlton
- sjoelund.se
- 1700 Posts
Re: Readline Error
Thanks for you reply, I managed to compile RML without mlton, but with smlnj...
I always have a trouble when compiling....
It seems to be a rml error...
"rml: invalid argument '-I../FrontEnd'"
"usage: rml [options] file1.(rml|mo) ... fileN.(rml|mo)
NOTE: you cannot mix .rml files with .mo files when given multiple files"
Do you know that?
Regards..
Idir
Re: Readline Error
Then the compiled rml version is too old, I believe.
- sjoelund.se
- 1700 Posts
Re: Readline Error
svn revision 205 (?) or greater is required I believe. r208 (2.5.0) is also available. Or it could just be that you have both an old and a new rml installed that messes things up (old rmlc, new rml)?
- sjoelund.se
- 1700 Posts
Re: Readline Error
you were right!! I compile on an other workstation, and the version was 2.4.8!!
But now after a loooong compilation The trouble is
"SimulationResults.c: In function 'SimulationResultsImpl__val':
SimulationResults.c:99:12: erreur: 'NAN' undeclared (first use in this function)
SimulationResults.c:99:12: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [SimulationResults_rml.o] Erreur 1"
Do you know why??
I hope I dont ask too much....
Regards
Idir
Re: Readline Error
The full message
In file included from SimulationResults_rml.c:36:0:
SimulationResults.c: In function 'SimulationResultsImpl__val':
SimulationResults.c:99:12: erreur: 'NAN' undeclared (first use in this function)
SimulationResults.c:99:12: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [SimulationResults_rml.o] Erreur 1
Regards
Re: Readline Error
The OpenModelica trunk uses:
Code:
#ifndef NAN
static union MSVC_FLOAT_HACK __NAN = {{0x00, 0x00, 0xC0, 0x7F}};
#define NAN (__NAN.Value)
#endif
Since some Linux distros only enable NAN if C99-mode is being used. Older OpenModelica versions (maybe the version you are compiling?) used NAN as it was. Try svn update and compile again
- sjoelund.se
- 1700 Posts
Re: Readline Error
Hi,
https://openmodelica.org/svn/OpenModelica/trunk
user: anonymous
pass: none <--- write none here
You're about 600 revisions short
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: Readline Error
- sjoelund.se
- 1700 Posts
Re: Readline Error
yes svn update link is working...
I see you change the configure script , because now I've got this
checking lp_lib.h usability... no
checking lp_lib.h presence... no
checking for lp_lib.h... no
checking lpsolve/lp_lib.h usability... no
checking lpsolve/lp_lib.h presence... no
checking for lpsolve/lp_lib.h... no
configure: error: failed to find lpsolve55 headers
What did it change? Is there a special option for lp_lib.h??
Regards
Idir
Re: Readline Error
We now use the lpsolve installed on the system rather than the version we used to keep in subversion (I think). Where is your lp_lib.h installed? This does not really seem to be standardized in any system (we only check for lpsolve/lp_lib.h and lp_lib.h). Setting CPPFLAGS (-I/path/to/lpsolveincludes/) might work if it's in a really weird place.
- sjoelund.se
- 1700 Posts
Re: Readline Error
You also need -I for includes (should actually be LDFLAGS=-L... CPPFLAGS=-I..., but for gcc it works setting these in CFLAGS). -L is for the linker (libraries) and -I for the preprocessor (includes)
- sjoelund.se
- 1700 Posts
Re: Readline Error
Hi everyone,
Good news, configure and make were fine!!
But make install had one mistake (./build/share//omnotebook/* was empty...)
Do you think OM will not work?
Anything else, how do I launch OM? Because when I do ./omc , it gives me a lot of options, but no GUI..
Regards.
Idir.
Re: Readline Error
configure using --with-omniORB for the GUIs (OMEdit, OMNotebook, OMShell)
- sjoelund.se
- 1700 Posts
Re: Readline Error
Where is your omniORB installed? (locate libomniORB4.so)
- sjoelund.se
- 1700 Posts
Re: Readline Error
Because an -L-directive is missing. I'm adding it to the configure line (or you could set it in CFLAGS).
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Readline Error