Re: [PPL-devel] Difficulty compiling PPL

Kenneth MacKenzie wrote:
Roberto Bagnara writes:
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?
We seem to have GLPK version 4.20. The files that you asked for are attached below.
Hi Kenneth.
The problem with GLPK is now fixed in the CVS HEAD version.
I also had some trouble compiling the Ocaml interface because it wanted to install the output files in /usr/lib/ocaml, which I don't have write access to on my system.
I have not been able to reproduce this problem. I did configure PPL 0.10 with the command
./configure --prefix=/tmp/dst
Then I did `make'. Then I did `make install' as an unprivileged user: this succeeded and installed everything under /tmp/dst .
Perhaps I have misunderstood what you wrote?
I mean: since you wrote that you don't have write access to /usr/lib/ocaml in your system, I guessed you configured with the --prefix option. Thus my hypothesis was that our makefiles were not "obeying" what the user specified as the --prefix argument. But my experiment did not show that.
However, I managed to fix this by editing the appropriate makefile, and now everything seems to be working well.
Good. Thanks again for the reports,
Roberto
P.S. Please, direct all PPL-related messages to ppl-devel@cs.unipr.it.

Roberto Bagnara writes:
Kenneth MacKenzie wrote:
...
I also had some trouble compiling the Ocaml interface because it wanted to install the output files in /usr/lib/ocaml, which I don't have write access to on my system.
I have not been able to reproduce this problem. I did configure PPL 0.10 with the command
./configure --prefix=/tmp/dst
Then I did `make'. Then I did `make install' as an unprivileged user: this succeeded and installed everything under /tmp/dst .
Perhaps I have misunderstood what you wrote?
I mean: since you wrote that you don't have write access to /usr/lib/ocaml in your system, I guessed you configured with the --prefix option. Thus my hypothesis was that our makefiles were not "obeying" what the user specified as the --prefix argument. But my experiment did not show that.
My apologies: the explanation I gave you was incorrect. Here's what really went wrong.
The problem is that the configure script expects MLGMP (the OCaml wrapper for gmp) to be installed in the directory containing the main ocaml installation:
ocamlgmp="no" if test x"$OCAMLC" = xocamlc then ocamlc_root=`ocamlc -where` # Checks for OCaml GMP. { $as_echo "$as_me:$LINENO: checking for OCaml-GMP module gmp.cma" >&5 $as_echo_n "checking for OCaml-GMP module gmp.cma... " >&6; } if test -f ${ocamlc_root}/gmp/gmp.cma; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } ocamlgmp="yes" else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ocamlgmp="no" fi
OCaml is installed on our system, and "ocamlc -where" returns /usr/lib/ocaml. However, MLGMP is not installed, and so "test -f ${ocamlc_root}/gmp/gmp.cma" fails silently. I'm not exactly sure what happens next, but when you run make && make install it completes without complaining, but it doesn't attempt to compile or install the OCaml interface. Since I don't have write access to /usr/lib/ocaml I'm unable to install gmp.cma in the place expected by the configuration script.
I was able to fix this by installing gmp.cma in a directory of my own and then changing the lines
OCAMLC_COMPILE_FLAGS = \ -I +gmp -I .. -ccopt -g
in interfaces/OCaml/Makefile to
OCAMLC_COMPILE_FLAGS = \ -I ${HOME}/lib/gmp -I .. -ccopt -g
and then running make && make install in interfaces/OCaml.
Here's what config.log says if I type
./configure --prefix=$PWD/lib --enable-interfaces="c cxx ocaml"
(Incidentally, I think that if you just try --enable-interfaces=ocaml then you eventually get a cryptic error due to the fact that the C++ interface is also required.)

Kenneth MacKenzie wrote:
The problem is that the configure script expects MLGMP (the OCaml wrapper for gmp) to be installed in the directory containing the main ocaml installation:
ocamlgmp="no" if test x"$OCAMLC" = xocamlc then ocamlc_root=`ocamlc -where` # Checks for OCaml GMP. { $as_echo "$as_me:$LINENO: checking for OCaml-GMP module gmp.cma" >&5 $as_echo_n "checking for OCaml-GMP module gmp.cma... " >&6; } if test -f ${ocamlc_root}/gmp/gmp.cma; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } ocamlgmp="yes" else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ocamlgmp="no" fi
OCaml is installed on our system, and "ocamlc -where" returns /usr/lib/ocaml. However, MLGMP is not installed, and so "test -f ${ocamlc_root}/gmp/gmp.cma" fails silently. I'm not exactly sure what happens next, but when you run make && make install it completes without complaining, but it doesn't attempt to compile or install the OCaml interface. Since I don't have write access to /usr/lib/ocaml I'm unable to install gmp.cma in the place expected by the configuration script.
I was able to fix this by installing gmp.cma in a directory of my own and then changing the lines
OCAMLC_COMPILE_FLAGS = \ -I +gmp -I .. -ccopt -g
in interfaces/OCaml/Makefile to
OCAMLC_COMPILE_FLAGS = \ -I ${HOME}/lib/gmp -I .. -ccopt -g
and then running make && make install in interfaces/OCaml.
Here's what config.log says if I type
./configure --prefix=$PWD/lib --enable-interfaces="c cxx ocaml"
Hi Kenneth,
you are right: we should allow ML GMP to be installed anywhere. I have just committed a change that adds a new `--with-mlgmp=DIR' configure option.
(Incidentally, I think that if you just try --enable-interfaces=ocaml then you eventually get a cryptic error due to the fact that the C++ interface is also required.)
I have tried to reproduce this, but I failed. Can you help me to identify also this problem? Thanks,
Roberto

Roberto Bagnara writes:
Hi Kenneth,
you are right: we should allow ML GMP to be installed anywhere. I have just committed a change that adds a new `--with-mlgmp=DIR' configure option.
Thanks for that.
(Incidentally, I think that if you just try --enable-interfaces=ocaml then you eventually get a cryptic error due to the fact that the C++ interface is also required.)
I have tried to reproduce this, but I failed. Can you help me to identify also this problem? Thanks,
I tried again with a newly-unpacked version of the tar file. After
./configure --prefix=$PWD/tmp --enable-interfaces=ocaml
and then "make", the compilation runs for a while and then fails with
libtool: link: ranlib .libs/libppl.a libtool: link: ( cd ".libs" && rm -f "libppl.la" && ln -s "../libppl.la" "libppl.la" ) g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O2 -frounding-math -W -Wall -MT ppl-config.o -MD -MP -MF .deps/ppl-config.Tpo -c -o ppl-config.o ppl-config.cc ppl-config.cc:24:18: error: ppl.hh: No such file or directory ppl-config.cc:29:2: error: #error "PPL version 0.8 or following is required" ppl-config.cc:26: error: ‘Parma_Polyhedra_Library’ is not a namespace-name ppl-config.cc:26: error: expected namespace-name before ‘;’ token ppl-config.cc: In function ‘int main(int, char**)’: ppl-config.cc:572: error: ‘PPL_VERSION’ was not declared in this scope ppl-config.cc:572: error: ‘PPL’ has not been declared ppl-config.cc:574: error: ‘PPL’ has not been declared ppl-config.cc:592: error: ‘PPL_CONFIGURE_OPTIONS’ was not declared in this scope ppl-config.cc:595: error: ‘PPL_VERSION’ was not declared in this scope ppl-config.cc:598: error: ‘PPL_VERSION_MAJOR’ was not declared in this scope ppl-config.cc:601: error: ‘PPL_VERSION_MINOR’ was not declared in this scope ppl-config.cc:604: error: ‘PPL_VERSION_REVISION’ was not declared in this scope ppl-config.cc:607: error: ‘PPL_VERSION_BETA’ was not declared in this scope ppl-config.cc:610: error: ‘PPL’ has not been declared ppl-config.cc:680: error: ‘assert’ was not declared in this scope make[3]: *** [ppl-config.o] Error 1 make[3]: Leaving directory `/disk/scratch/b/tmp/ppl-0.10/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/disk/scratch/b/tmp/ppl-0.10/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/disk/scratch/b/tmp/ppl-0.10' make: *** [all] Error 2
It works OK (modulo the earlier problems) if you use --enable-interfaces="c cxx ocaml"
A copy of config.log is attached below.
participants (2)
-
Kenneth MacKenzie
-
Roberto Bagnara