
Kenneth MacKenzie wrote:
I've been attempting to compile PPL from source and I've had a
couple of minor difficulties.
- The makefile was unable to find the "splfr" command (sorry, I've
lost the precise error message). This appears to be part of SICStus Prolog. Fortunately, this is installed on our local system and I was able to get the compilation to proceed by including the location of splfr in my PATH variable.
I see that PPL can be configured to select which language interfaces are enabled or disabled, and this can presumably be used to get round the above problem. However, the error message about splfr being missing is rather cryptic, and it might be helpful if the makefile (or configure) checked for the existence of the appropriate commands and issued a more understandable error message.
Update: having investigated some more, I see that our local sicstus installation is in /opt, with the "sicstus" command linked from /usr/bin, but "splfr" not linked. Thus the configuration script thinks that sicstus is available and tries to build the interface, but the splfr command isn't in the default path and this causes compilation to fail. Our systems people may have installed sicstus in a non-standard place, which may explain the confusion.
Dear Kenneth,
your analysis is correct. Indeed, it was a mistake on our part enabling all the language interfaces by default: this will be fixed in the future releases. See
http://www.cs.unipr.it/pipermail/ppl-devel/2009-January/013866.html
for a solution.
- At a later stage, I received the following error message:
Making all in examples make[4]: Entering directory `/disk/scratch/b/ppl-0.10/demos/ppl_lpsol/examples' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/disk/scratch/b/ppl-0.10/demos/ppl_lpsol/examples' make[4]: Entering directory `/disk/scratch/b/ppl-0.10/demos/ppl_lpsol' gcc -DHAVE_CONFIG_H -I. -I../.. -I../../interfaces/C -pedantic -std=gnu89 -Werror -g -O2 -frounding-math -W -Wall -MT ppl_lpsol.o -MD -MP -MF .deps/ppl_lpsol.Tpo -c -o ppl_lpsol.o ppl_lpsol.c cc1: warnings being treated as errors ppl_lpsol.c: In function ‘main’: ppl_lpsol.c:1228: warning: passing argument 1 of ‘glp_term_hook’ from incompatible pointer type make[4]: *** [ppl_lpsol.o] Error 1 make[4]: Leaving directory `/disk/scratch/b/ppl-0.10/demos/ppl_lpsol' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/disk/scratch/b/ppl-0.10/demos/ppl_lpsol' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/disk/scratch/b/ppl-0.10/demos' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/disk/scratch/b/ppl-0.10' make: *** [all] Error 2
After some Googling, I was able to fix this (I hope) by changing line 1189 of pppl_lpsol.c from
glpk_message_interceptor(void* info, char* msg) {
to
glpk_message_interceptor(void* info, const char* msg) {
This is something that should not have happened. In the configuration script we try hard to support all the released versions of GLPK, but your observation seems to imply we are missing at least one. Can you please let us know which version of GLPK is installed on your system and send us the files ppl-config.h and config.log that have been created by the configure script?
My gcc version is
gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)
After making the two changes above, compilation completed successfully and all of the "make check" tests succeeded.
Thanks a lot Kenneth, your feedback is greatly appreciated. All the best,
Roberto