Adriaan van Os wrote:
On Mac OS X "make bootstrap" dies as follows (reproducible after a restart):
../.././xgpc -B../.././ -I../rts --automake --executable-file-name -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -g -O2 --executable-path=. --unit-path=/Users/adriaan/gnu/gpc-3.3/gcc/p/rts --unit-path=/Users/adriaan/gnu/gpc-3.3/gcc/p/units `cat needed-options` -I. -I "/Users/adriaan/gnu/gpc-3.3/gcc/p" "/Users/adriaan/gnu/gpc-3.3/gcc/p/utils/gpidump.pas" In file included from /Users/adriaan/gnu/gpc-3.3/gcc/p/utils/gpidump.pas:52: ./tree.inc: In procedure `ProcessFile': ./tree.inc:115: error: undeclared identifier `LANG_HOOKS_IDENTIFIER_SIZE' (first use in this routine) ....
When I hack gpidump out of gcc/p/utils/Makefile, gpc-20030507 builds with gcc-3.3 on Mac OS X. However, compiling any .pas file results in a bunch of malloc warnings:
[G4:~/gnu/testgpc/adriaan] adriaan% gpc --automake -o hello hello.pas *** malloc[463]: Deallocation of a pointer not malloced: 0xc92360; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug *** malloc[463]: Deallocation of a pointer not malloced: 0xc92340; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug *** malloc[463]: Deallocation of a pointer not malloced: 0xc92300; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug *** malloc[463]: Deallocation of a pointer not malloced: 0xc92440; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug *** malloc[463]: Deallocation of a pointer not malloced: 0xc92400; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug *** malloc[463]: Deallocation of a pointer not malloced: 0xc924c0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug *** malloc[463]: Deallocation of a pointer not malloced: 0xc92480; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
I did some debugging with gdb to locate the problem:
(gdb) bt #0 0x900039f8 in free () #1 0x0000a278 in do_spec_1 (spec=0x7b340 "/Developer/Pascal/gpc33d2/lib/gcc-lib/powerpc-apple-darwin/3.3/gpc1", inswitch=0, soft_matched_part=0x1ce10 "") at ../../gpc-3.3/gcc/p/gpc.c:4607 #2 0x0000c3e8 in handle_braces (p=0x75f35 "-o %{|!pipe:%g.s} |\n as %(asm_options) %{!pipe:%g.s} %A }") at ../../gpc-3.3/gcc/p/gpc.c:5835 #3 0x0000c18c in do_spec_1 (spec=0x7b340 "/Developer/Pascal/gpc33d2/lib/gcc-lib/powerpc-apple-darwin/3.3/gpc1", inswitch=0, soft_matched_part=0x0) at ../../gpc-3.3/gcc/p/gpc.c:5370 #4 0x0000a9b0 in do_spec_1 (spec=0x7b340 "/Developer/Pascal/gpc33d2/lib/gcc-lib/powerpc-apple-darwin/3.3/gpc1", inswitch=0, soft_matched_part=0x0) at ../../gpc-3.3/gcc/p/gpc.c:5479 #5 0x0000c3e8 in handle_braces (p=0x7b218 "%(invoke_as)} ") at ../../gpc-3.3/gcc/p/gpc.c:5835 #6 0x0000c18c in do_spec_1 (spec=0x7b340 "/Developer/Pascal/gpc33d2/lib/gcc-lib/powerpc-apple-darwin/3.3/gpc1", inswitch=0, soft_matched_part=0x0) at ../../gpc-3.3/gcc/p/gpc.c:5370 #7 0x0000c3e8 in handle_braces (p=0x7b0f5 "gpc1 %{!pipe:%g.i} %(cc1_options) %{!famtmpfile*:%eInternal GPC problem: internal option `--amtmpfile' not given} %{!fsyntax-only:%(invoke_as)} }") at ../../gpc-3.3/gcc/p/gpc.c:5835 #8 0x0000c18c in do_spec_1 (spec=0x7b340 "/Developer/Pascal/gpc33d2/lib/gcc-lib/powerpc-apple-darwin/3.3/gpc1", inswitch=0, soft_matched_part=0x0) at ../../gpc-3.3/gcc/p/gpc.c:5370 #9 0x0000c3e8 in handle_braces (p=0x7b046 "%{!E:gpc1 %{!pipe:%g.i} %(cc1_options) %{!famtmpfile*:%eInternal GPC problem: internal option `--amtmpfile' not given} %{!fsyntax-only:%(invoke_as)} }}") at ../../gpc-3.3/gcc/p/gpc.c:5835 #10 0x0000c18c in do_spec_1 (spec=0x7b340 "/Developer/Pascal/gpc33d2/lib/gcc-lib/powerpc-apple-darwin/3.3/gpc1", inswitch=0, soft_matched_part=0x0) at ../../gpc-3.3/gcc/p/gpc.c:5370 #11 0x0000c3e8 in handle_braces (p=0x18349 "%{!MM:%{!E:gpc1 %{!pipe:%g.i} %(cc1_options) %{!famtmpfile*:%eInternal GPC problem: internal option `--amtmpfile' not given} %{!fsyntax-only:%(invoke_as)} }}}") at ../../gpc-3.3/gcc/p/gpc.c:5835 #12 0x0000c18c in do_spec_1 (spec=0x7b340 "/Developer/Pascal/gpc33d2/lib/gcc-lib/powerpc-apple-darwin/3.3/gpc1", inswitch=0, soft_matched_part=0x0) at ../../gpc-3.3/gcc/p/gpc.c:5370 #13 0x00009f48 in do_spec (spec=0x1819c "gpcpp %{fbig-endian:-D__BITS_BIG_ENDIAN__=1 -D__BYTES_BIG_ENDIAN__=1 -D__WORDS_BIG_ENDIAN__=1} %{flittle-endian:-D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_LITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1"...) at ../../gpc-3.3/gcc/p/gpc.c:4522 #14 0x0000dab8 in main (argc=0, argv=0x0) at ../../gpc-3.3/gcc/p/gpc.c:6515 #15 0x00001990 in _start (argc=5, argv=0xbffffdec, envp=0xbffffe04) at /SourceCache/Csu/Csu-45/crt.c:267 #16 0x00001810 in start ()
Regards,
Adriaan van Os