Gale Paeper wrote:
On Mar 14, 2008, at 12:23 PM, Peter Schorn wrote:
I'm trying to build the latest gpc (gpc-20070904.tar.bz2) with Adriaan's patches on a Macintosh OS X 10.5.2. with Intel.
I configure with ../gcc-4.1.2/configure --enable-languages=pascal,c --enable-threads=posix --prefix=/Developer/Pascal/gpc412
but the "make bootstrap" fails with
Undefined symbols: "___sysctl", referenced from: ___enable_execute_stack in _enable_execute_stack_s.o ld: symbol(s) not found /usr/bin/libtool: internal link edit command failed make[3]: *** [libgcc_s.dylib] Error 1 make[2]: *** [libgcc.a] Error 2 make[1]: *** [stage1_build] Error 2 make: *** [bootstrap] Error 2
What am I missing?
I think you're missing the trampoline patch. I'm not sure what avenue I got it from Adriaan, but below is the trampoline patch that Adriaan and I ended up using in our attempts to get a gcc-4.1.2 based gpc-20070904 Mac OS X compiler built. Note: Last time I checked there's no fix for the back-end bug affecting the usability for production work for the Mac OS X gcc-4.1.2 based gpc-20070904 GPC build.
Actually I had installed the patch Gale mentioned and actually there is a problem. For some reason under 10.5.2 the symbol __sysctl is not found but sysctl works. I therefore replaced __sysctl by sysctl in the patch and the build now proceeds to a new kind of problem:
...
../.././xgpc -B../.././ -L../.. -I../rts --automake --executable-file-name -W -Wall -Wmissing-prototypes -Wmissing-declarations -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING --executable-path=. --unit-path=/Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/rts --unit-path=/Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/units "/Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/utils/binobj.pas" can't find atom for N_GSYM stabs Gpc_input:G(0,2) in ../../libgpc.a(files.o) can't find atom for N_GSYM stabs Gpc_output:G(0,2) in ../../libgpc.a(files.o)
... more "can't find atom ..." ...
../.././xgpc -B../.././ -L../.. -I../rts --automake --executable-file-name -W -Wall -Wmissing-prototypes -Wmissing-declarations -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING --executable-path=. --unit-path=/Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/rts --unit-path=/Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/units -I. -I "/Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p" "/Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/utils/gpidump.pas" /Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/utils/gpidump.pas: In procedure `Flags': /Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/utils/gpidump.pas:439: error: undeclared identifier `FUNCTION_TYPE' (first use in this routine)
... more syntax errors
/Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/utils/gpidump.pas: In procedure `ProcessFile': /Users/peterschorn/projects/gpc4/gcc-4.1.2/gcc/p/utils/gpidump.pas:1315: error: syntax error before `Close' make[3]: *** [gpidump] Error 1 make[2]: *** [pascal.utils] Error 2 make[1]: *** [stage1_build] Error 2 make: *** [bootstrap] Error 2
Any ideas what could be the problem?
Peter Schorn --- peter.schorn@acm.org