Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

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

Re: Readline Error

Thanks sjoelund.se, I will try and tell you....

Regards

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...

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.

Re: Readline Error

Thanks a lot , but it does not work for me... Because it ever asks me the rml binarie file whereas in my bin/ directory there is only "rmlc"...Did I bad compile rml?

Regards.

Idir.

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

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.

Re: Readline Error

i use the rml version you adviced me last week...

rml+mmc compiler version 2.3.8 built Tue Jun 21 11:56:46 2011 using MLton or SML.NET or SMLNJ

Is there a more recent version?

Regards.

Idir

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)?

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 current/smile

Re: Readline Error

I've got the 8719 revision.....

Too old again? current/sad

Can I have a link please?? current/smile

Re: Readline Error

Hi,

https://openmodelica.org/svn/OpenModelica/trunk
user: anonymous
pass: none     <--- write none here
You're about 600 revisions short current/smile

Cheers,
Adrian Pop/

Re: Readline Error

Thanks for your reply Adrian, I will try this afternoon...

Regards

Idir.

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.

Re: Readline Error

My lp_lib.h is installed on a local folder (coming from lp_solve55 sources...)

If I understand I write this option with configure

CPPFLAGS="-L/mylocation"

Regards.

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)

Re: Readline Error

Thanks sjoelund,

configure it's ok! I launch my make command.. Wait and see...

Regards

Idir.

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)

Re: Readline Error

Dear sjoelund,


I do what you told me... I've got this "/usr/bin/ld: cannot find -lomniORB4"

Could you explain me..again and again... current/smile

Re: Readline Error

Where is your omniORB installed? (locate libomniORB4.so)

Re: Readline Error

locate doesn't work because I just come to install... It did not index it again... current/smile

But the libomniORB4.so is installed on my local drive.. /work/XXX/Omniorb45/lib

I do not understand why gcc doen't find it...

Regards.

Idir

Re: Readline Error

Because an -L-directive is missing. I'm adding it to the configure line (or you could set it in CFLAGS).

There are 0 guests and 0 other users also viewing this topic