axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] gcl-2.6.8pre on MAC OSX 10.2


From: Page, Bill
Subject: [Axiom-developer] gcl-2.6.8pre on MAC OSX 10.2
Date: Tue, 17 Oct 2006 23:23:38 -0400

Camm,

I have succeeded in compiling gcl-2.6.8pre on MAC OSX 10.2 on the
SourceForge compile farm 'ppc-osx3' server, however some patches
were necessary. This machine has Xcode installed by not Fink.

First, I checked out gcl-2.6.8pre from cvs on October 15, 2006,
created a tarball and scp'd it and the standard gnu gettext-0.15
and sed-4.1.4 tarballs to my home directory on SourceForge.

Next I compiled and installed gettext and sed with
  --prefix=/home/users/b/bi/billpage/osx
creating the ~/osx/bin and ~/osx/lib directories. These are
apparently required to satisfy the gcl build dependencies on
OSX 10.2. (Note: A Fink installation might also have provided
these in the /sw directory.)

Then I added:

  export PATH=/home/users/b/bi/billpage/osx/bin:$PATH
  export LIBRARY_PATH=/home/users/b/bi/billpage/osx/lib:$LIBRARY_PATH
  export CPPFLAGS="-no-cpp-precomp"
  cd osx

to ~/.profile so that after re-login the environment was set
appropriately.

I untarred gcl into the osx directory creating ~/osx/gcl-2.6.8pre
Then I applied the following patches (most of which have been
previously reported on the gcl email list by other people):

------------------------
ppc-osx3:~/osx billpage$ diff -Naur old/gcl* new/gcl*

This patch required so libintl is found in $LIBRARY_PATH.

diff -Naur old/gcl-2.6.8pre/h/powerpc-macosx.defs
new/gcl-2.6.8pre/h/powerpc-macosx.defs
--- old/gcl-2.6.8pre/h/powerpc-macosx.defs      Thu Jul 15 09:28:43 2004
+++ new/gcl-2.6.8pre/h/powerpc-macosx.defs      Sun Oct 15 22:07:45 2006
@@ -6,7 +6,7 @@

 # Set this to avoid warnings when linking against libncurses.
 # This is due to the requirements of the two level namespace.
-LIBS := `echo $(LIBS) | sed -e 's/-lncurses/ /'` /sw/lib/libintl.dylib
+LIBS := `echo $(LIBS) | sed -e 's/-lncurses/ /'` -lintl

 # Set this for the linker to operate correctly.
 MACOSX_DEPLOYMENT_TARGET = 10.2
@@ -32,4 +32,4 @@
 # This appears to be no longer necessary on Panther.
 ARRS = libtool -static -o

-FINAL_CFLAGS := `echo $(FINAL_CFLAGS) | sed -e 's:-g::g'`
\ No newline at end of file
+FINAL_CFLAGS := `echo $(FINAL_CFLAGS) | sed -e 's:-g::g'`

This patch is required to define sbrk.

diff -Naur old/gcl-2.6.8pre/h/powerpc-macosx.h
new/gcl-2.6.8pre/h/powerpc-macosx.h
--- old/gcl-2.6.8pre/h/powerpc-macosx.h Thu Dec  8 17:31:25 2005
+++ new/gcl-2.6.8pre/h/powerpc-macosx.h Sun Oct 15 21:32:23 2006
@@ -38,8 +38,9 @@
 #undef SET_REAL_MAXPAGE
 #define SET_REAL_MAXPAGE { my_sbrk(0); real_maxpage = (int)
mach_maplimit/PAGESIZE; }

-#define sbrk my_sbrk
+#include <unistd.h> /* to get sbrk defined */
 extern void *my_sbrk(int incr);
+#define sbrk my_sbrk


 /** (si::save-system "...") a.k.a. unexec implementation  */

This patch is required to remove functions symbols from plt.

diff -Naur old/gcl-2.6.8pre/o/makefile new/gcl-2.6.8pre/o/makefile
--- old/gcl-2.6.8pre/o/makefile Fri Sep 15 10:45:18 2006
+++ new/gcl-2.6.8pre/o/makefile Mon Oct 16 22:03:52 2006
@@ -154,7 +154,7 @@
                             print a}' \
                        k=$(LEADING_UNDERSCORE) |\
                        sort | \
-                       grep -v '[^ \t_]_' |\
+                       grep -v 'restFP' | grep -v 'saveFP' | grep -v
'[^ \t_]_' |\
                        $(AWK) '{A[++k]=$$0} END {for (i=1;i<=k;i++) \
                                printf("MY_PLT(%s)%s\n",A[i],i==k ? "" :
",");}' >$@

This patch is required to find malloc.h on some OSX machines.

diff -Naur old/gcl-2.6.8pre/o/unexmacosx.c
new/gcl-2.6.8pre/o/unexmacosx.c
--- old/gcl-2.6.8pre/o/unexmacosx.c     Thu Dec 15 10:48:43 2005
+++ new/gcl-2.6.8pre/o/unexmacosx.c     Tue Oct 17 18:55:04 2006
@@ -124,7 +124,13 @@
 #endif
 #include <mach-o/nlist.h>
 #include <mach-o/getsect.h>
+/* not <sys/malloc.h> */
+/* not <malloc.h> */
+#if defined (HAVE_MALLOC_MALLOC_H)
 #include <malloc/malloc.h>
+#else
+#include <objc/malloc.h>
+#endif

 #include <sys/mman.h>

ppc-osx3:~/osx billpage$

------------------------

Finally I built gcl with the following commands:

  ./configure --prefix=/home/users/b/bi/billpage/osx \
     --disable-tkconfig  --disable-statsysbfd --enable-locbfd
  make
  make install

---------

The resulting gcl binary (unixport/saved_gcl) in available here:

  http://page.axiom-developer.org/gcl-2.6.8-osx10-20061017.bin

I would be very happy if anyone with a MAC OSX machine would try
this version of gcl on their systems and let me know of any
problems.

I am currently working on completing the Axiom build based on the
new build-improvements branch.

Regards,
Bill Page.




reply via email to

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