
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
Please let me know if this works for you. All the best,
Roberto