[plt-scheme] preliminary "Snow Leopard" report

From: John Clements (clements at brinckerhoff.org)
Date: Sat Sep 5 01:01:59 EDT 2009

On Sep 4, 2009, at 7:27 PM, John Clements wrote:

>
> On Sep 4, 2009, at 6:02 PM, John Clements wrote:
>
>> Trying to run mzscheme after installing 10.6 gives this error:
>>
>> You need the Rosetta software to run mzscheme. The Rosetta  
>> installer is in Optional Installs on your Mac OS X installation disc.
>> Schmoop-Box-3:~ clements$
>>
>>
>> I haven't even tried googling for this error to see what the  
>> problem is; it might be as simple as recompiling.
>
> Yep; leftover PPC code. Looks like a "please ignore this message."

Okay, more fun.  A clean build (with the new version of XCode, 3.2) of  
the svn head gives first a simple error:

cd gc; make ../libmzgc.a
gcc  -I../../../mzscheme/gc/include -DNO_SIGNALS -g -O2  -Wall  -DOS_X  
-D_DARWIN_UNLIMITED_SELECT   -fno-common  -DNO_EXECUTE_PERMISSION - 
DSILENT -DNO_GETENV -DLARGE_CONFIG -DATOMIC_UNCOLLECTABLE - 
DINITIAL_MARK_STACK_SIZE=8192 -c ../../../mzscheme/gc/alloc.c
In file included from ../../../mzscheme/gc/include/private/gc_priv.h:66,
                  from ../../../mzscheme/gc/alloc.c:19:
../../../mzscheme/gc/include/private/gcconfig.h:476: error: expected  
identifier or ‘(’ before ‘--’ token
../../../mzscheme/gc/alloc.c: In function ‘GC_expand_hp_inner’:
../../../mzscheme/gc/alloc.c:966: warning: suggest parentheses around  
&& within ||
make[6]: *** [alloc.o] Error 1
make[5]: *** [g-c] Error 2
make[4]: *** [common] Error 2
make[3]: *** [cgc] Error 2
make[2]: *** [3m] Error 2
make[1]: *** [3m] Error 2
make: *** [all] Error 2

... This turns out to be because the code in gcconfig.h doesn't have a  
case for this system, apparently.  Since I don't have a pre-10.6  
machine to experiment with, I guessed that we wanted to wind up in the  
32-bit intel macosx bin, and I changed

#   if defined(__i386__)
#    define I386

into

#   if defined(__i386__) || defined(__x86_64__)
#    define I386

Unfortunately, the mzschemecgc that results from this dumps core:

env XFORM_PRECOMP=yes ../mzschemecgc -cqu ../../../mzscheme/gc2/ 
xform.ss --setup . --cpp "gcc -E -I./.. -I../../../mzscheme/gc2/../ 
include -DOS_X -D_DARWIN_UNLIMITED_SELECT  -fno-common  - 
DNEWGC_BTC_ACCOUNT  "  --keep-lines -o xsrc/precomp.h ../../../ 
mzscheme/gc2/precomp.c
make[4]: *** [xsrc/precomp.h] Segmentation fault
make[3]: *** [all] Error 2
make[2]: *** [3m] Error 2
make[1]: *** [3m] Error 2
make: *** [all] Error 2


So, just for fun, I tried adding a new #ifdef clause to special-case  
the x86_64:

#   if defined(__x86_64__)
#    define X86_64
#    define mach_type_known
#   endif

... but this leads to an error about an undefined variable DATASTART:

^^^^Starting command^^^^
gcc  -I../../../mzscheme/gc/include -DNO_SIGNALS -g -O2  -Wall  -DOS_X  
-D_DARWIN_UNLIMITED_SELECT   -fno-common  -DNO_EXECUTE_PERMISSION - 
DSILENT -DNO_GETENV -DLARGE_CONFIG -DATOMIC_UNCOLLECTABLE - 
DINITIAL_MARK_STACK_SIZE=8192 -c ../../../mzscheme/gc/os_dep.c
../../../mzscheme/gc/os_dep.c: In function ‘GC_get_stack_base’:
../../../mzscheme/gc/os_dep.c:1069: error: ‘result’ undeclared (first  
use in this function)
../../../mzscheme/gc/os_dep.c:1069: error: (Each undeclared identifier  
is reported only once
../../../mzscheme/gc/os_dep.c:1069: error: for each function it  
appears in.)
../../../mzscheme/gc/os_dep.c: In function ‘GC_register_data_segments’:
../../../mzscheme/gc/os_dep.c:1457: error: ‘DATASTART’ undeclared  
(first use in this function)
make[6]: *** [os_dep.o] Error 1
make[5]: *** [g-c] Error 2
make[4]: *** [common] Error 2
make[3]: *** [cgc] Error 2
make[2]: *** [3m] Error 2
make[1]: *** [3m] Error 2
make: *** [all] Error 2

... which suggests to me (per earlier plt-scheme discussions) that  
mzscheme + OS X + 64-bit is not working.

FWIW, the downloaded intel binary from plt-scheme.org still works just  
fine.

Again, I don't have a 10.5 machine to see exactly what bin it's  
*supposed* to wind up in, so there may be a simple fix for this.

All the best,

John





Posted on the users mailing list.