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:
gcc -m64 -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 os_dyn.c 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:1286: warning: cast from pointer to integer of different size os_dyn.c:1288: warning: cast from pointer to integer of different size os_dyn.c:1289: 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:1294: warning: cast from pointer to integer of different size os_dyn.c:1295: warning: cast from pointer to integer of different size os_dyn.c: In function '___is_a_c_closure': os_dyn.c:1428: warning: cast from pointer to integer of different size os_dyn.c:1430: warning: cast from pointer to integer of different size os_dyn.c:1431: warning: cast from pointer to integer of different size
This looks like a real problem; is there any info I can give to help you out with this?
Brad
Afficher les réponses par date
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
On May 17, 2005, at 10:32 PM, Bradley Lucier wrote:
Beta 13 is a mess.
...
It then segfaulted in my bignum tests,
...
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
This has gone away after I built gambc40b13 with
env CC='gcc -mcpu=970 -m64 -force_cpusubtype_ALL' ./configure --enable-single-host
and
[descartes:~/programs/gambc40b13] lucier% gcc -v Using built-in specs. Target: powerpc-apple-darwin8.1.0 Configured with: ../configure --prefix=/pkgs/gcc-4.0.0-apple --with-gmp=/pkgs/gmp-4.1.4 --with-mpfr=/pkgs/gmp-4.1.4 --enable-languages=c,c++,f95 Thread model: posix gcc version 4.0.0 (Apple Computer, Inc. build 5018)
So it seems to be a problem with Apple's
[descartes:~/programs/gambc40b13] lucier% /usr/bin/gcc -v Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8 Thread model: posix gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
as distributed. (And don't blame the FSF, Apple's distributed compiler was branched on October 26, 2004, when the FSF sources still had a lot of bugs; the FSF 4.0.0 compiler wasn't released until last month.)
Marc: It will be *really cool* when I can run a 64-bit Gambit on my 2GHz G5.
Brad