Compiling the PPL Debian package with SWI Prolog support

Hi all,
I am trying to obtain a PPL Debian package with Prolog support, because the official package is only compiled with C and C++ support. However, I am facing a strange problem while trying to compile the package, because one of the tests is not passed.
The Debian package scripts execute the configure script with the following options (for my laptop):
./configure --build i486-linux-gnu --host i486-linux-gnu --enable-interfaces=c,cxx,swi_prolog --disable-ppl_lpsol --disable_ppl_lcdd --prefix=/usr --mandir=${prefix}/share/man --infodir=${prefix}/share/info CFLAGS=-Wall -g -O2 Then make is called with the following options:
make -j2
Everything goes right until the SWI Prolog tests are done. One of them fails. The conflicting test is called "ppl_prolog_generated_test", in the interfaces/Prolog/SWI directory, and it fails with the following error:
ERROR: ppl_new_C_Polyhedron_from_constraints_2_test/0: Undefined procedure: member/2
(full output available at http://pastebin.com/f478e4360)
This is strange, because member/2 is part of SWI Prolog, and AFAIK it should be available by default.
The test tries to execute the Prolog programs using a modified version of SWI Prolog, with a binary called ppl_pl, that is linked against some of the PPL libraries. Interestingly, when trying to execute or compile the same programs from a "standard" SWI Prolog session, it runs fine.
I can still build the package skipping those tests. But I want to file a bug report against the Debian package to get SWI Prolog support included in the official package, and I suspect that it has not yet been included because of this issue.
It might be related to SWI Prolog instead of PPL. But maybe someone in this list has faced a similar problem before.
Any clue about why is this failing?
Cheers, Israel
PS: I am not subscribed to the list. Thanks for replying to me in CC.

By the way, this happens with the Debian Sid package, corresponding to PPL 0.10.2.
Cheers, Israel

Israel Herraiz wrote:
By the way, this happens with the Debian Sid package, corresponding to PPL 0.10.2.
Hi Israel,
the problem you describe seems more related to SWI-Prolog than to the PPL. Anyway, I have tried to reproduce your observations on a machine where we have Debian, but it is the Etch version. Moreover, here is what I obtain trying to install SWI-Prolog:
debian:~# apt-get install swi-prolog Reading package lists... Building dependency tree... E: Package swi-prolog has no installation candidate Package swi-prolog is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
Any suggestion? Which version of SWI-Prolog are you using? Did you install it from sources? All the best,
Roberto

Excerpts from Roberto's message on Aug 5, 2009 about 11 AM:
the problem you describe seems more related to SWI-Prolog than to the PPL. Anyway, I have tried to reproduce your observations on a machine where we have Debian, but it is the Etch version. Moreover, here is what I obtain trying to install SWI-Prolog:
debian:~# apt-get install swi-prolog Reading package lists... Building dependency tree... E: Package swi-prolog has no installation candidate Package swi-prolog is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
Umm. I am trying with Debian Sid, which is the unstable version of Debian. It contains (somewhat) up to date packages. Among them, SWI Prolog.
Any suggestion? Which version of SWI-Prolog are you using? Did you install it from sources?
I am using SWI Prolog 5.6.59, installed using the swi-prolog package of Debian Sid.
It can also be reproduced with the latest Ubuntu (9.04, Jaunty). If you want to try, I can provide instructions to compile the package in another message (it requires to modify the packaging scripts to add the SWI Prolog support, which is disabled by default).
In any case, if this is the first time you see this, it is likely that it is related to SWI Prolog, or to the packaging scripts, or both.
I have seen similar errors in the Debian bug tracking system, with other packages depending on SWI Prolog. However, the solution was not posted. I thought it could be related to the Prolog sources, that's why I asked here. I am going to contact the Debian maintainers of those packages, and of PPL, maybe they know how to fix it.
In the end, this means that I am going to ask for PPL support to be added to the official PPL Debian packages. I will post to this list if there is any news about this.
Actually, I have managed to compile the packages, just skipping the tests, but I don't like this solution, because after all tests are there for something :-). If you are curious or you want to try the packages out, I can provide info about the repositories where I have the packages (only for Debian Sid and Ubuntu Jaunty).
Thanks for the feedback.
Israel

Israel Herraiz wrote:
Excerpts from Roberto's message on Aug 5, 2009 about 11 AM:
the problem you describe seems more related to SWI-Prolog than to the PPL. Anyway, I have tried to reproduce your observations on a machine where we have Debian, but it is the Etch version. Moreover, here is what I obtain trying to install SWI-Prolog:
debian:~# apt-get install swi-prolog Reading package lists... Building dependency tree... E: Package swi-prolog has no installation candidate Package swi-prolog is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
Umm. I am trying with Debian Sid, which is the unstable version of Debian. It contains (somewhat) up to date packages. Among them, SWI Prolog.
Any suggestion? Which version of SWI-Prolog are you using? Did you install it from sources?
I am using SWI Prolog 5.6.59, installed using the swi-prolog package of Debian Sid.
It can also be reproduced with the latest Ubuntu (9.04, Jaunty). If you want to try, I can provide instructions to compile the package in another message (it requires to modify the packaging scripts to add the SWI Prolog support, which is disabled by default).
In any case, if this is the first time you see this, it is likely that it is related to SWI Prolog, or to the packaging scripts, or both.
I have seen similar errors in the Debian bug tracking system, with other packages depending on SWI Prolog. However, the solution was not posted. I thought it could be related to the Prolog sources, that's why I asked here. I am going to contact the Debian maintainers of those packages, and of PPL, maybe they know how to fix it.
In the end, this means that I am going to ask for PPL support to be added to the official PPL Debian packages. I will post to this list if there is any news about this.
Hi Israel,
this would be great, thanks.
Actually, I have managed to compile the packages, just skipping the tests, but I don't like this solution, because after all tests are there for something :-). If you are curious or you want to try the packages out, I can provide info about the repositories where I have the packages (only for Debian Sid and Ubuntu Jaunty).
We have upgraded to Lenny and now we are able to reproduce the problem. Apparently, SWI-Prolog on Debian is packaged differently from, e.g., Fedora. The attached patch solves the problem by making the test code self-contained. Please let us know if it works for you. All the best, and thanks for the report,
Roberto

Excerpts from Roberto's message on Aug 5, 2009 about 2 PM:
We have upgraded to Lenny and now we are able to reproduce the problem. Apparently, SWI-Prolog on Debian is packaged differently from, e.g., Fedora. The attached patch solves the problem by making the test code self-contained. Please let us know if it works for you. All the best, and thanks for the report,
It works. Thanks!
I am going to add this patch to the application to get SWI Prolog added in the PPL Debian package. Another option is to add that to the upstream sources.
I will come back to the list once I get a reply from the maintainer.
Cheers, Israel
participants (2)
-
Israel Herraiz
-
Roberto Bagnara