[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gplc and linking with other libraries

From: Daniele Peri
Subject: Re: gplc and linking with other libraries
Date: 08 Mar 2002 12:15:14 +0100

Il ven, 2002-03-08 alle 10:14, Daniel Diaz ha scritto:
> It seems GNU Prolog has some problem to be compiled with gcc 3.0.3. I have to 
> check this (I use
> 2.96). Maybe you can try the configure with:
> ./configure --disable-ebp  --disable-regs
> I think the problems comes from the use of a machine register. These option 
> prevent their use. If
> you try it I'd like to have your feedback. 
> Thank you
I experienced a similar problem linking with Gtk. Any attempt to call a
prolog predicate, either with Pl_Query_Call (I used all the
Pl_Query_Begin() parameter values) or Pl_Exec_Continuation from a
callback invoked by Gtk main loop ended in a segmentation fault. I tried
with either gcc 2.96 or 3.0.1 
After some debugging sessions I realized that the problem stood in
GProlog being compiled with -fomit-frame-pointer and Gtk being not. In
some way the GProlog stack manipulations in predicate calls interfered
with the stack.
I also tried to compile my external C functions with frame pointers.
Then I linked the resulting objects to the usual optimized gprolog and
the same Gtk I used before. The results were the same, but at least I
was able to get deeper with debug. In some cases, manually restoring the
stack pointer after a call to a predicate worked. Unfortunately I wasn't
able to find out more.
That said, I would like to thank Daniel Diaz for his great work on
GProlog. I really like this environment.

Daniele Peri
DIE - Universita' degli Studi di Palermo
v.le delle Scienze, 90128 Palermo, Italy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]