users-prolog
[Top][All Lists]
Advanced

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

Re: mac port not really working


From: Daniel Diaz
Subject: Re: mac port not really working
Date: Tue, 10 Mar 2009 17:50:33 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

The problem also occurs on other architectures and comes from missing C header files.
You can find a source tarball + precompiled binaries (rpm) + a leopard-intel package (thanks to Paolo Moura) in the unstable directory:

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

Otherwise,  a quick way to fix it from a source distribution is to modify the following file:

src/TopComp/top_level.c (line 30)

replace

#include "../EnginePl/engine_pl.h"
#include "copying.c"

by (adding 2 includes)

#include "../EnginePl/engine_pl.h"
#include "../BipsPl/c_supp.h"
#include "../BipsPl/inl_protos.h"
#include "copying.c"


Daniel


John Velman a écrit :
For the record, I'm running OS X 10.5.6 on iMac with 2.4GHz Intel Core 2 Duo, and Gnu prolog 1.3.0 compiled from source gprolog-1.3.0.tar.gz on my machine with no problem.

When I ran  running's example, copied and pasted into a terminal it works fine, viz:

---
jrv:~ jr$  gprolog --init-goal 'write(before), nl' --entry-goal 'write(inside),
  
nl' --query-goal 'append([a,b],[c,d],X)'
    
before
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
inside
| ?- append([a,b],[c,d],X).

X = [a,b,c,d]

yes
| ?-         
-----

I find that with Mac's excellent developers package, I do best by compiling from source rather than using a package.  I also installed both macports and fink when I first transitioned to Mac from Linux, but found that (for me, at least) I was better off without them.  

(I haven't tried (gprolog 1.3.1 yet -- too many irons in the fire to keep up to date on everything).  

By the way, Daniel, thanks for the fine prolog!

Best,

John Velman

Daniel Diaz <address@hidden> writes:
  
Hi Karel & Paulo

Thanks for the bug report. I try to fix it as soon as possible.

Daniel


Paulo Moura a écrit :
    
On 2009/03/09, at 21:52, running wrote:

      
I want to use mac port of gprolog and it's not really working.

My problem is this - I can run the "gnuprolog" program, without
parameters, just fine - but after I use the --entry-goal or
--query-goal , it just falls down with:
"Fatal Error: Segmentation Violation"
error message.

So, if I run the example from the manual:

" gprolog --init-goal 'write(before), nl' --entry-goal 'write(inside),
nl' --query-goal 'append([a,b],[c,d],X)' "

I have "before" and "Fatal Error: Segmentation Violation" on shell.
Even if I run only

"gprolog --query-goal 'something(else)'" or "gprolog --entry-goal
'something(else)'", I have the same fatal error. If I run gprolog and
THEN enter, manually, the same query into gprolog, it works just fine.

Well, more about my computer - I use Mac OS X 10.5.6 build 9G55, 1.66
GHz Intel Core Duo processor. I tried to install gprolog both through
macports (with "port install gprolog") and the package on your site,
both with the same effect. I am clueless what's going on.
        
I'm able to reproduce the problem in my MacBook Pro. I only use
"--init-goal" in my applications, which works as expected. Follows a
gdb back-trace:

pmmbp:~ pmoura$ gdb gprolog
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40
UTC 2008)
Copyright 2004 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-apple-darwin"...Reading symbols for
shared libraries ... done

(gdb) run --init-goal 'write(before), nl' --entry-goal
write(inside), nl' --query-goal 'append([a,b],[c,d],X)'
Starting program: /opt/local/bin/gprolog --init-goal 'write(before),
nl' --entry-goal 'write(inside), nl' --query-goal
append([a,b],[c,d],X)'
Reading symbols for shared libraries ++. done
before

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000004
0x0007ad12 in G_Assign_Element ()
(gdb) bt
#0  0x0007ad12 in G_Assign_Element ()
#1  0x000a83ba in Call_Next ()
Cannot access memory at address 0x80000007
(gdb)

Daniel, is the information above helpful for diagnosing the problem?

Cheers,

Paulo


-----------------------------------------------------------------
Paulo Jorge Lopes de Moura, PhD
Assistant Professor
Dep. of Computer Science, University of Beira Interior
6201-001 Covilhã, Portugal

Office 4.3  Ext. 3257
Phone: +351 275319891 Fax: +351 275319899
Email: <mailto:address@hidden>

Home page: <http://www.di.ubi.pt/~pmoura>
Research:  <http://logtalk.org/>
-----------------------------------------------------------------






_______________________________________________
Users-prolog mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/users-prolog

      

  


--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.

reply via email to

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