[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Making GProlog 1.2.18 on Mac OS X with GCC4
From: |
Lindsey Spratt |
Subject: |
Making GProlog 1.2.18 on Mac OS X with GCC4 |
Date: |
Sun, 5 Mar 2006 10:09:17 -0500 |
Below are diffs for a simple change to 1.2.18 that will make it build
and run on Mac OS X using the GCC 4 compiler.
I used a configure command with no optimization specified: when I used
the default compilation with '-O3', I got the error:
gplc -c --fast-math fd2c.pl
system_error(cannot_catch_throw(error(domain_error('',fx),op/3)))
warning: /home/diaz/GP/src/src/Pl2Wam/read_file.pl:106: system
directive failed
fatal error: exception raised:
error(domain_error('',prolog_name),current_prolog_flag/2)
compilation failed
To build:
cd to the directory containing the gprolog to be patched.
Create a file with the patches at the end of this email called
'diffs-to-patch-18-for-gcc4'.
Apply the patches, cd into /src, and build:
patch -p1 <../diffs-to-patch-18-for-gcc4
cd src
./autoconf
./configure "--with-c-flags=-fomit-frame-pointer"
make
The build creates a lot of warning messages (which should be cleaned up
eventually and may be reported as errors on other platforms), but the
result seems to run OK on Mac OS X.
HTH,
Lindsey Spratt
http://homepage.mac.com/lspratt
==================== PATCHES ================================
diff -Naur
--exclude-from=/Users/lindsey/Documents/MyDev/CocoaDev/xgp/doc/
nonpatch_file_patterns gprolog-1.2.18/src/BipsPl/flag_c.c
gprolog-1.2.18.gcc4/src/BipsPl/flag_c.c
--- gprolog-1.2.18/src/BipsPl/flag_c.c 2003-01-06
07:18:08.000000000 -0500
+++ gprolog-1.2.18.gcc4/src/BipsPl/flag_c.c 2006-03-04
15:11:58.000000000 -0500
@@ -77,7 +77,7 @@
static int atom_on;
static int atom_off;
-static int atom_error;
+/* static int atom_error; --GCC4 CHANGE-- */
static int atom_warning;
static int atom_fail;
diff -Naur
--exclude-from=/Users/lindsey/Documents/MyDev/CocoaDev/xgp/doc/
nonpatch_file_patterns gprolog-1.2.18/src/BipsPl/os_interf_c.c
gprolog-1.2.18.gcc4/src/BipsPl/os_interf_c.c
--- gprolog-1.2.18/src/BipsPl/os_interf_c.c 2003-11-03
05:08:18.000000000 -0500
+++ gprolog-1.2.18.gcc4/src/BipsPl/os_interf_c.c 2006-03-04
15:13:32.000000000 -0500
@@ -94,8 +94,8 @@
static int atom_dt;
-static int atom_read;
-static int atom_write;
+/* static int atom_read; --GCC4 CHANGE-- */
+/* static int atom_write; --GCC4 CHANGE-- */
static int atom_execute;
static int atom_search;
diff -Naur
--exclude-from=/Users/lindsey/Documents/MyDev/CocoaDev/xgp/doc/
nonpatch_file_patterns gprolog-1.2.18/src/EnginePl/obj_chain.h
gprolog-1.2.18.gcc4/src/EnginePl/obj_chain.h
--- gprolog-1.2.18/src/EnginePl/obj_chain.h 2004-01-16
11:01:00.000000000 -0500
+++ gprolog-1.2.18.gcc4/src/EnginePl/obj_chain.h 2006-03-04
15:14:59.000000000 -0500
@@ -76,7 +76,8 @@
#ifndef _MSC_VER
-extern ObjChain *obj_chain_stop;
+
+static ObjChain *obj_chain_stop; /* --GCC4 CHANGE-- */
static ObjChain obj_chain_start =
{ OBJ_CHAIN_MAGIC_1, OBJ_CHAIN_MAGIC_2, &obj_chain_stop, OBJ_INIT };
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Making GProlog 1.2.18 on Mac OS X with GCC4,
Lindsey Spratt <=