[gambit-list] Re: 64-bit compile on MacOS Tiger

Bradley Lucier lucier at math.purdue.edu
Tue May 17 23:32:40 EDT 2005


On May 17, 2005, at 10:03 PM, Bradley Lucier wrote:

> Marc:
>
> I installed Tiger 10.4.1 and built Gambit-C with CC='gcc -m64'.   
> Everything seemed to work, but I got the following warnings:

That was with gambc40b12, sorry.  Beta 13 is a mess.

First I built it with CC='gcc -m64' and got the following warnings.

os_dyn.c: In function 'dynamic_load_module':
os_dyn.c:258: warning: 'NSIsSymbolNameDefined' is deprecated  
(declared at /usr/include/mach-o/dyld.h:150)
os_dyn.c:260: warning: 'NSLookupAndBindSymbol' is deprecated  
(declared at /usr/include/mach-o/dyld.h:158)
os_dyn.c: In function '___make_c_closure':
os_dyn.c:1290: warning: cast from pointer to integer of different size
os_dyn.c:1292: warning: cast from pointer to integer of different size
os_dyn.c:1293: warning: cast from pointer to integer of different size
os_dyn.c:1296: warning: cast from pointer to integer of different size
os_dyn.c:1298: warning: cast from pointer to integer of different size
os_dyn.c:1299: warning: cast from pointer to integer of different size
os_dyn.c: In function '___is_a_c_closure':
os_dyn.c:1432: warning: cast from pointer to integer of different size
os_dyn.c:1434: warning: cast from pointer to integer of different size
os_dyn.c:1435: warning: cast from pointer to integer of different size

It then segfaulted in my bignum tests, so I did a make clean and  
reconfigure with -g and got

[descartes:~/programs/gambc40b13] lucier% make -j 2
making all in include
making all in lib
gcc -m64 -g -I../include -I. -no-cpp-precomp -Wall -W -Wno-unused -O1  
-fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict- 
aliasing -fomit-frame-pointer -fPIC -fno-common -DHAVE_CONFIG_H - 
D___PRIMAL -D___LIBRARY -D___GAMBCDIR=\"/usr/local/Gambit-C\" -c main.c
<stuff omitted>
../gsc/gsc -:=.. -f -c -check _kernel.scm
../gsc/gsc -:=.. -f -c -check _system.scm
../gsc/gsc -:=.. -f -c -check _num.scm
../gsc/gsc -:=.. -f -c -check _std.scm
make[1]: *** [_std.c] Segmentation fault
make[1]: *** Waiting for unfinished jobs....
make: *** [all-recursive] Error 1

So, for some reason, "make clean" removed the .c files.  Wow.

The crash occurs in bignum.make, at

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000024c7a6e1
0x00000000000d3520 in ___H__20___num (___ps=0x29f808) at _num.c:36170
36170           ___HEADER(result) = ___MAKE_HD_BYTES((n<<3),  
___sBIGNUM);
(gdb) p result
$1 = 6107202754022188770
(gdb) p n
$2 = 85
(gdb) p ___hp
$3 = (long int *) 0x27f3460

Hmmm.

Brad



More information about the Gambit-list mailing list