[GRASS5] GRASS binaries for Mac OS X

Markus Neteler neteler at itc.it
Mon Sep 22 11:55:56 EDT 2003


On Mon, Sep 22, 2003 at 10:24:12AM -0400, Scott W Mitchell wrote:
> 
> Is this it ?  This is how this was solved in WINE, as far as I can
> see/understand - you use crt_externs.h and define environ... well, here's
> the relevant patch:
> 
> Index: scheduler/process.c
> ===================================================================
> RCS file: /home/wine/wine/scheduler/process.c,v
> retrieving revision 1.213
> diff -u -r1.213 process.c
> --- scheduler/process.c 27 Apr 2003 00:47:58 -0000      1.213
> +++ scheduler/process.c 27 Apr 2003 20:05:52 -0000
> @@ -32,6 +32,11 @@
>  #ifdef HAVE_UNISTD_H
>  # include <unistd.h>
>  #endif
> +#ifdef __darwin__
> +# include <crt_externs.h>
> +# define environ (*_NSGetEnviron())
> +#endif
> +
>  #include "wine/winbase16.h"
>  #include "wine/winuser16.h"
>  #include "wine/exception.h"
> Index: scheduler/sysdeps.c
> ===================================================================

Thanks for looking into this. I was able to fix that meanhile with
another funny compiler flag:

SHLIB_LD="-dynamiclib -Wl,-flat_namespace,-U,_environ,-U,_cuserid"
SHLIB_CFLAGS="-fPIC -fno-common"

(all in CVS now). Maybe your suggestion above is better?

The libraries are completely compiled now, and I received file types like
this (looks good to me):

file /grass57exp/dist.powerpc-apple-darwin6.6/lib/libgrass_gis.dylib /grass57exp/dist.powerpc-apple-darwin6.6/lib/libgrass_gis.dylib: 
Mach-O dynamically linked shared library ppc

file /grass57exp/dist.powerpc-apple-darwin6.6/bin/d.ask: Mach-O executable ppc
file /grass57exp/dist.powerpc-apple-darwin6.6/etc/bin/cmd/d.ask /grass57exp/dist.powerpc-apple-darwin6.6/etc/bin/cmd/d.ask: Mach-O executable ppc

[compilation goes on at time...]

Hopefully I get relocatable binaries now.

BUG: It seems that there are mutual dependencies in
display/driver/lib
display/driver/XDRIVER

It wants e.g. Graph_Close() in display/driver/lib while
display/driver/XDRIVER is not compiled yet. This should also affect
GRASS 5.3.x. How to solve that?

Thanks,

 Markus




More information about the grass-dev mailing list