[Slackbuilds-users] gprolog build error

Andrew Antle andrew.antle at gmail.com
Thu Nov 4 15:06:32 UTC 2010


This is pretty long.  I apologize in advance.

make[1]: Entering directory `/tmp/SBo/gprolog-1.3.1/src/Fd2C'
gplc -c --fast-math fd2c.pl
fd2c.pl:215-220: fatal error: exception raised:
error(instantiation_error,sort/2)
compilation failed
make[1]: *** [fd2c.o] Error 1
make[1]: Leaving directory `/tmp/SBo/gprolog-1.3.1/src/Fd2C'
make: *** [all] Error 1


Seems to ignore $CFLAGS:


        -------------------------------
        --- GNU PROLOG INSTALLATION ---
        -------------------------------

GNU Prolog version: 1.3.1 (Feb 10 2009)
Operating system  : linux-gnu
Processor         : i486
Size of a word    : 32 bits
C compiler        : gcc
C flags           : -O3 -fomit-frame-pointer
C flags machine   : -march=i486
Loader flags      :
Loader libraries  : -lm
Use line editor   : Yes
Use piped consult : Yes
Use sockets       : Yes
Use FD solver     : Yes
Use fast call     : Yes
Use machine regs. : Yes
Working sigaction : Yes
Used register(s)  : ebx (TR)

        ------------------------------


So, I changed the SlackBuild to read:

./configure \
  --prefix=/usr \
  --build=$ARCH-slackware-linux \
  --with-c-flags="$SLKCFLAGS"


        -------------------------------
        --- GNU PROLOG INSTALLATION ---
        -------------------------------

GNU Prolog version: 1.3.1 (Feb 10 2009)
Operating system  : linux-gnu
Processor         : i486
Size of a word    : 32 bits
C compiler        : gcc
C flags           : -O2 -march=i486 -mtune=i686
C flags machine   : -march=i486
Loader flags      :
Loader libraries  : -lm
Use line editor   : Yes
Use piped consult : Yes
Use sockets       : Yes
Use FD solver     : Yes
Use fast call     : Yes
Use machine regs. : Yes
Working sigaction : Yes
Used register(s)  : ebx (TR)

        ------------------------------

But still:

make[1]: Entering directory `/tmp/SBo/gprolog-1.3.1/src/Fd2C'
gplc -c --fast-math fd2c.pl
fd2c.pl:215-220: fatal error: exception raised:
error(instantiation_error,sort/2)
compilation failed
make[1]: *** [fd2c.o] Error 1
make[1]: Leaving directory `/tmp/SBo/gprolog-1.3.1/src/Fd2C'
make: *** [all] Error 1


So then, I downloaded the latest unstable version as suggested on the
gprolog site:

http://gprolog.univ-paris1.fr/unstable/gprolog-20100713.tgz

and tried a vanilla

./configure

and received:


        -------------------------------
        --- GNU PROLOG INSTALLATION ---
        -------------------------------

GNU Prolog version: 1.4.0 (Jul 13 2010)
Operating system  : linux-gnu
Processor         : i686
Size of a word    : 32 bits
C compiler        : gcc
C flags           : -O3 -fomit-frame-pointer
C flags machine   : -march=pentiumpro
Loader flags      :
Loader libraries  : -lm
Use line editor   : Yes
Use piped consult : Yes
Use sockets       : Yes
Use FD solver     : Yes
Working sigaction : Yes
Use fast call     : Yes
Use machine regs. : Yes
Used register(s)  : ebx (TR)

        ------------------------------


So I tried disabling the fd solver:

./configure --disable-fd-solver


        -------------------------------
        --- GNU PROLOG INSTALLATION ---
        -------------------------------

GNU Prolog version: 1.4.0 (Jul 13 2010)
Operating system  : linux-gnu
Processor         : i686
Size of a word    : 32 bits
C compiler        : gcc
C flags           : -O3 -fomit-frame-pointer
C flags machine   : -march=pentiumpro
Loader flags      :
Loader libraries  : -lm
Use line editor   : Yes
Use piped consult : Yes
Use sockets       : Yes
Use FD solver     : No
Working sigaction : Yes
Use fast call     : Yes
Use machine regs. : Yes
Used register(s)  : ebx (TR)

        ------------------------------

and it built successfully.

The SlackBuild builds successfully as well.  I'm not sure if this defeats the
purpose though, as gprolog's tagline is "a free Prolog compiler with
constraint solving over finite domains".

Hope this helps,
-- 
Andrew Antle
<andrew dot antle at gmail dot com>


More information about the SlackBuilds-users mailing list