that bug is fixed in the current distribution, e.g. package version 1.4.5.0-3 it's in the current LTS (20.4)
best, -spa > On 26 Mar 2021, at 07:56, Paulo Moura <[email protected]> wrote: > > The Ubuntu .deb package is broken. You need to compile and install GNU Prolog > from sources. > >> On 25 Mar 2021, at 21:25, Jerry Hancock <[email protected]> wrote: >> >> Hello, >> >> Please excuse me for asking about something so old. I installed gnu-prolog >> 1.4.5 on ubuntu server 18.04. The underlying hardware is an HP dl380 with >> at least 24 cores. I had some code that runs perfectly but slowly on other >> servers so I thought I would try my cloud server. >> >> The test code is simple and instantiated in sit3.pl: >> >> c(blue). >> c(green). >> >> sit3(X):-c(X). >> >> On my other installations, the first solution X=blue is returned as >> expected.. On the ubuntu server 18.04 , I get an error, "uncaught exception >> error(existence_error(procedure,c/0),sit3/0) “ implying that c/0 doesn’t >> exist but I’m not calling c/0 I’m calling c/1 as below: >> >> {trace} >> | ?- sit3(X). >> 1 1 Call: sit3(_24) ? >> 2 2 Call: c ? >> 2 2 Exception: c ? >> 1 1 Exception: sit3(_24) ? >> uncaught exception: error(existence_error(procedure,c/0),sit3/0) >> {trace} >> | ?- >> >> If I assert the clauses from the terminal, all is well. >> >> If I run c(X), trace returns: >> >> | ?- c(X). >> 1 1 Call: c(_24) ? >> 1 1 Exit: c(blue) ? >> >> X = blue ? >> >> Or >> >> | ?- asserta(cc(blue)). >> >> yes >> | ?- asserta(cc(green)). >> >> yes >> | ?- asserta((sit33(X):-cc(X))). >> >> yes >> | ?- sit33(X). >> >> X = green ? >> >> >> This is a very simple example that should work. I’ve been working with >> prolog since the late 80’s and unless there is an ini file that is note >> allowing the clauses to be added correctly, I could't find it. >> >> Thanks > >
