Re: Issues with ubuntu 18.04
Paulo Moura <[email protected]> Fri, 26 Mar 2021 07:56:24 +0000
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <[email protected]> |
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: >=20 > Hello, =20 >=20 > 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. >=20 > The test code is simple and instantiated in sit3.pl: >=20 > c(blue). > c(green). >=20 > sit3(X):-c(X). >=20 > On my other installations, the first solution X=3Dblue is returned as = expected.. On the ubuntu server 18.04 , I get an error, "uncaught = exception error(existence_error(procedure,c/0),sit3/0) =E2=80=9C = implying that c/0 doesn=E2=80=99t exist but I=E2=80=99m not calling c/0 = I=E2=80=99m calling c/1 as below: >=20 > {trace} > | ?- sit3(X). > 1 1 Call: sit3(_24) ?=20 > 2 2 Call: c ?=20 > 2 2 Exception: c ?=20 > 1 1 Exception: sit3(_24) ?=20 > uncaught exception: error(existence_error(procedure,c/0),sit3/0) > {trace} > | ?-=20 >=20 > If I assert the clauses from the terminal, all is well. >=20 > If I run c(X), trace returns: >=20 > | ?- c(X). > 1 1 Call: c(_24) ?=20 > 1 1 Exit: c(blue) ?=20 >=20 > X =3D blue ?=20 >=20 > Or=20 >=20 > | ?- asserta(cc(blue)). >=20 > yes > | ?- asserta(cc(green)). >=20 > yes > | ?- asserta((sit33(X):-cc(X))). >=20 > yes > | ?- sit33(X). >=20 > X =3D green ?=20 >=20 >=20 > This is a very simple example that should work. I=E2=80=99ve been = working with prolog since the late 80=E2=80=99s and unless there is an = ini file that is note allowing the clauses to be added correctly, I = could't find it. >=20 > Thanks