gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: gcl-2.6.8pre on MAC OSX 10.2


From: Camm Maguire
Subject: [Gcl-devel] Re: gcl-2.6.8pre on MAC OSX 10.2
Date: 18 Oct 2006 11:24:38 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!  And thanks so much for looking into this!  Comments
below. 

"Page, Bill" <address@hidden> writes:

> 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.)
> 

I thought that gettext was no longer required, as it was included in
the local bfd build (from configure.in:)

        cd binutils/bfd && chmod +x configure && ./configure 
--with-included-gettext && cd ../..

We do need sed.  I guess OSX has none, or it is incompatible?

Is Fink so non-standard that it must be avoided?  What is the
canonical way to get gnu software on OSX?


> 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'`
> 

OK, this is going in, but I think we can lose the -lintl too.  Anyone
want to try to verify?

> 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  */
> 

I don't get this one, as we emulate sbrk here.  Where is the system
definition required?

> 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 ? "" :
> ",");}' >$@
> 

OK.  This is quite ugly, but its a hack to begin with.  Suggestions
most welcome.

> 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>
> 

OK, I take it you are using objc/malloc.h.  We need configure code to
look for this, and bomb if it cannot find one, just on macosx.  I'll
take a stab unless someone else wants to.

May I suggest we also lose the diagnostic output on save-system on
this platform?

Thanks again!  Will post when something is checked in.

BTW, I'm pushing 2.6.8 (in the guise of 2.6.7) and all the apps
through the Debian autobuilder system before releasing 2.6.8.  Please
let me know of any other 2.6.8 issues you may be encountering in your
axiom work asap.  Bug fix only at this point, of course.

Take care,

> 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.
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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