[PPL-devel] Problema nella compilazione sotto mac os x 10.4.9

Roberto Bagnara bagnara at cs.unipr.it
Tue May 15 14:26:13 CEST 2007


Roberto Bagnara wrote:
> Valerio Senni wrote:
>> I don't understand from the linker's error message to which library
>> belong the symbols he's looking for...
>> whether they belong to the gmp library (which it may be the case I 
>> compiled with the wrong options)
>> or to the SICStus' library or to PPL.
> 
> Dear Valerio,
> 
> I had he occasion to put my hands on a machine like yours, so I could
> investigate the problem more deeply.  I have got the impression this
> might be a problem of the `spld' and `splfr' utilities that shows
> up on Mac OS X.  I have alreay informed the SICStus team, but I also
> have a workaround, in case you don't want to wait for a better fix.
> 
> I assume that you are compiling the PPL in some directory and that
> you are using the latest version of SICStus Prolog.
> Then:
> 
> 1) cd into that directory
> 2) make (it will fail, as you know)
> 3) cd interfaces/Prolog/SICStus
> 4) cp /usr/local/bin/spconfig-3.12.8 myspconfig
> 5) edit myspconfig to change the line "CC=gcc" to
>     "CC=g++", so that the command
> 
>       diff -c /usr/local/bin/spconfig-3.12.8 myspconfig
> 
>     gives you something like
> 
> *** /usr/local/bin/spconfig-3.12.8      Thu May 10 16:34:55 2007
> --- myspconfig  Tue May 15 13:29:57 2007
> ***************
> *** 13,19 ****
>    # Keep this list sorted.
>    BDBLIB=-L/sw/lib -ldb-4.1
>    BDB_PATH=/sw
> ! CC=gcc
>    CC_NOLIBPATH=
>    CFLAGS=-no-cpp-precomp   -g -O2 -pipe -fno-common
>    CHARMAINOBJ=charmain.o intrpt.o
> --- 13,19 ----
>    # Keep this list sorted.
>    BDBLIB=-L/sw/lib -ldb-4.1
>    BDB_PATH=/sw
> ! CC=g++
>    CC_NOLIBPATH=
>    CFLAGS=-no-cpp-precomp   -g -O2 -pipe -fno-common
>    CHARMAINOBJ=charmain.o intrpt.o
> 
> 6) edit Makefile to change the invocations of `spld'
>     and `splfr' so that they use the `--config=myspconfig'
>     option, that is, the change should be such that the
>     command
> 
>       diff Makefile~ Makefile
> 
>     give you
> 
> 690c690
> <       spld --main=prolog \
> ---
>  >       spld --config=myspconfig --main=prolog \
> 698c698
> <       splfr --static $(srcdir)/ppl_sicstus.pl ppl_sicstus_sd.o
> ---
>  >       splfr --config=myspconfig --static $(srcdir)/ppl_sicstus.pl ppl_sicstus_sd.o
> 
> 7) make
> 8) make check

Meanwhile Per Mildner (of the SICStus team) confirmed that the workaround
I suggested is basically the only thing that can be done.  However, when
I wrote the message above, I tried `make' and `make check'.  When I tried
`make install' I figured out I had forgotten one instance of `splfr'
and one instance of the `--static' option.

Here is the correct diff:


679c679
<       splfr $(srcdir)/ppl_sicstus.pl .libs/ppl_sicstus_sd.o -o $@ \
---
 >       splfr --config=myspconfig --static $(srcdir)/ppl_sicstus.pl .libs/ppl_sicstus_sd.o -o $@ \
690c690
<       spld --main=prolog \
---
 >       spld --config=myspconfig --main=prolog \
695c695
<                -lm -L/usr/local/lib -lgmpxx -L/usr/local/lib -lgmp -R/usr/local/lib -R/usr/local/lib
---
 >               -lm -L/usr/local/lib -lgmpxx -L/usr/local/lib -lgmp -R/usr/local/lib -R/usr/local/lib
698c698
<       splfr --static $(srcdir)/ppl_sicstus.pl ppl_sicstus_sd.o
---
 >       splfr --config=myspconfig --static $(srcdir)/ppl_sicstus.pl ppl_sicstus_sd.o


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