SWI-Prolog / issues

Dummy repository for issue tracking
7 stars 3 forks source link

how to build with GNU readline on linux #72

Closed jwaldmann closed 6 years ago

jwaldmann commented 6 years ago

I am building swipl-7.6.4 from source (./configure --prefix= ; make ; make install).

The resulting executable works, but apparently is not linked against readline, so, e.g., cursor-up does not work.

I am not seeing where the configure script checks for presence of readline (there' s nothing in config.log) which I do have installed.

I can run swipl under "rlwrap" but that should not be necessary?

JanWielemaker commented 6 years ago

You have to check the config.log on packages/readline. It also tries to build the BSD editline interface in packages/libedit. Either of them suffices to get commandline editing. The default is to link libedit when available due to license restrictions of libreadline.

jwaldmann commented 6 years ago

Thanks for the quick response.

Indeed, I was just doing configure; make; make install in the top level directory only. I now did it in packages/ as well, and now swipl is readline-enabled.

Which is strange - because the executable is unchanged. So you're not loading readline support via the OS's dynamic linker, but using swipl's own linking mechanism? Might be worth a remark in some INSTALL file.

I was not building any packages because I needed just a bare-bones Prolog machine, for teaching.

JanWielemaker commented 6 years ago

Just about any usage requires packages. Adding xpce makes gives you graphical debugging and a powerful editor that will make many novice users happy.