Problems with SWI-Prolog interface [Was: Re: Why this?]

Matthew Mundell wrote:
So any idea why plld only finds libpl when -lpl is given explicitly?
Because the installation of SWI-Prolog you are using is broken. If you try the following command on your machine you will get
$ pl -dump-runtime-variables CC="/usr/local/gcc-3.4.3/bin/gcc"; PLBASE="/usr/local/pl/lib/pl-5.4.7"; PLARCH="i686-linux"; PLLIBS="-ldl -lreadline -lncurses -lm "; PLLIB=""; PLLDFLAGS="-export-dynamic -O3"; PLSOEXT="so"; PLVERSION="50407"; PLSHARED="yes"; PLTHREADS="no";
If you do the same on any machine with a decently installed version of SWI-Prolog, you will get, instead
$ pl -dump-runtime-variables CC="gcc"; PLBASE="/usr/local/lib/pl-5.4.7"; PLARCH="i686-linux"; PLLIBS="-ldl -lreadline -lncurses -lm -lrt "; PLLIB="-lpl"; PLLDFLAGS="-export-dynamic -O3 -pthread"; PLSOEXT="so"; PLVERSION="50407"; PLSHARED="yes"; PLTHREADS="yes";
Notice the difference concerning the value of `PLLIB'. My advice is to erase your installation of SWI-Prolog completely and then re-install it again from the sources with a standard ./configure ; make ; sudo make install Ciao,
Roberto

Roberto Bagnara bagnara@cs.unipr.it writes:
Matthew Mundell wrote:
So any idea why plld only finds libpl when -lpl is given explicitly?
Because the installation of SWI-Prolog you are using is broken. If you try the following command on your machine you will get
$ pl -dump-runtime-variables CC="/usr/local/gcc-3.4.3/bin/gcc"; PLBASE="/usr/local/pl/lib/pl-5.4.7"; PLARCH="i686-linux"; PLLIBS="-ldl -lreadline -lncurses -lm "; PLLIB=""; PLLDFLAGS="-export-dynamic -O3"; PLSOEXT="so"; PLVERSION="50407"; PLSHARED="yes"; PLTHREADS="no";
If you do the same on any machine with a decently installed version of SWI-Prolog, you will get, instead
$ pl -dump-runtime-variables CC="gcc"; PLBASE="/usr/local/lib/pl-5.4.7"; PLARCH="i686-linux"; PLLIBS="-ldl -lreadline -lncurses -lm -lrt "; PLLIB="-lpl"; PLLDFLAGS="-export-dynamic -O3 -pthread"; PLSOEXT="so"; PLVERSION="50407"; PLSHARED="yes"; PLTHREADS="yes";
Notice the difference concerning the value of `PLLIB'. My advice is to erase your installation of SWI-Prolog completely and then re-install it again from the sources with a standard ./configure ; make ; sudo make install
Thanks Roberto. I've rebuilt SWI in /usr/not-backed-up and PLLIB only contains -lpl if --enable-mt is passed to configure. So I think that if the existing SWI installation is rebuilt with multi-threading then the PPL interface will compile. I doubt that a standard ./configure will work, even from a fresh set of source.
Ciao,
Roberto
-- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
participants (2)
-
Matthew Mundell
-
Roberto Bagnara