Re: mac port not really working

Paulo Moura <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
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:[email protected]>

Home page: <http://www.di.ubi.pt/~pmoura>
Research:  <http://logtalk.org/>
-----------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.