[PPL-devel] Re: gplc and linking with other libraries

Roberto Bagnara bagnara at cs.unipr.it
Thu Mar 7 19:44:58 CET 2002


Daniel Diaz wrote:
> Hello Roberto,
> 
> I have fixed this problem recently because it was really problematic. It is fixed in 1.2.10 which
> you can find in the unstable directory:
> ftp://ftp.inria.fr/INRIA/Projects/contraintes/gprolog/unstable/gprolog-1.2.10.tar.gz
> (a RPM is also available - compiled under RedHat 7.2)
> 
> So something like:  gplc -o EXENAME some.pl some.o -L '-Lmylibdir -lmylib' should work now...


Thanks Daniel.  It works indeed: I am now able to produce a working GNU Prolog engine
statically linked with our library.  There is something strange however:
the _standard_ `gprolog' executable created by configure, make, make install
dies with a segmentation fault.  Here is what happens:

$ gdb /usr/local/bin/gprolog
GNU gdb Red Hat Linux (5.1-1)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) r
Starting program: /usr/local/bin/gprolog

Fatal Error: Memory allocation fault (malloc) in top_level.c:90

Program exited with code 01.
(gdb)

I know 1.2.10 is of the unstable kind, but I though you would like to know.
I have compiled it with

$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/specs
Configured with: ../gcc-3.0.3/configure --prefix=/usr/local
Thread model: single
gcc version 3.0.3

and my machine is a RedHat 7.2 GNU/Linux system.
All the best

      Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it




More information about the PPL-devel mailing list