The most recent Apple version of GCC that I can find on the web (http://www.opendarwin.org/en/news.php#20) is "gcc3-1205 Darwin". Installing and using it doesn't change reported problems. Yet, I can use it to build a new GCC from the standard GCC-3.2.1 sources. This gives me a GCC-3.2.1 that installs and runs on Darwin. If I use this new GCC (3.2.1) to build GPC 20021128, there are no building problems: reported problems 1 to 4 have disappeared ! Unfortunately, the linking problem is still the same:
[G4:doc/gpc/demos] adriaan% gpc hello.pas /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(init.o) malformed object (bad indirect symbol table entry (76) (symbol at index 241 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(error.o) malformed object (bad indirect symbol table entry (60) (symbol at index 972 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(getopt.o) malformed object (bad indirect symbol table entry (24) (symbol at index 435 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(string.o) malformed object (bad indirect symbol table entry (30) (symbol at index 1251 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(string2.o) malformed object (bad indirect symbol table entry (48) (symbol at index 570 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(heap.o) malformed object (bad indirect symbol table entry (15) (symbol at index 235 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(files.o) malformed object (bad indirect symbol table entry (70) (symbol at index 431 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(endian.o) malformed object (bad indirect symbol table entry (10) (symbol at index 178 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(filename.o) malformed object (bad indirect symbol table entry (122) (symbol at index 2390 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(math.o) malformed object (bad indirect symbol table entry (34) (symbol at index 385 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(move.o) malformed object (bad indirect symbol table entry (4) (symbol at index 96 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(numtodec.o) malformed object (bad indirect symbol table entry (18) (symbol at index 281 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(random.o) malformed object (bad indirect symbol table entry (38) (symbol at index 251 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(rtsc.o) malformed object (bad indirect symbol table entry (12) (symbol at index 77 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(sets.o) malformed object (bad indirect symbol table entry (12) (symbol at index 774 is not external) /usr/bin/ld: /usr/lib/gcc-lib/powerpc-apple-darwin6.0/3.2.1/libgpc.a(time.o) malformed object (bad indirect symbol table entry (50) (symbol at index 933 is not external) collect2: ld returned 1 exit status
When I look in gpclib.a (with otool), I find the following entries for these indices. They all read:
"Indirect symbols for (__DATA,__nl_symbol_ptr) ... entries" address index name 0x00001b88 241 _fini_GPC_Init 0x00006624 972 _fini_GPC_Error 0x00001fa0 435 _fini_GPC_Getopt 0x00002424 1251 _fini_GPC_String 0x000018e0 570 _fini_GPC_String2 0x0000095c 235 _fini_GPC_Heap 0x00001520 431 _fini_GPC_Files 0x000005c8 178 _fini_GPC_Endian 0x000081c8 2390 _fini_GPC_Filename 0x00001078 385 _fini_GPC_Math 0x00000260 96 _fini_GPC_Move 0x000008e8 281 _fini_GPC_Numtodec 0x00000ce0 251 _fini_GPC_Random 0x000001b4 77 _fini_GPC_Rtsc 0x0000115c 774 _fini_GPC_Sets 0x00004828 933 _fini_GPC_Time
I hope this additional information is useful in finding the cause of the linking problem.
Best regards,
Adriaan