[PPL-devel] Difficulty compiling PPL

Roberto Bagnara bagnara at cs.unipr.it
Fri Jan 23 22:27:13 CET 2009


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

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it



More information about the PPL-devel mailing list