Hi troops,
Has anybody successfully compiled GPC under MacOSX Lion? I've tried doing so using Adriaan's sources (gpc346u4-sources.dmg) but I encountered the following errors (as listed below).
Any help would be greatly appreciated.
Cheers, Leo Brewin School of Mathematical Sciences Monash University
stage1/xgcc -Bstage1/ -B/Users/leo/tmp-pascal/gpc346u4/i386-apple-darwin11/bin/ -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -o genmodes \ genmodes.o errors.o ../libiberty/libiberty.a ld: warning: -macosx_version_min not specificed, assuming 10.7 Undefined symbols for architecture i386: "___bzero", referenced from: _htab_empty in libiberty.a(hashtab.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status make[2]: *** [genmodes] Error 1 make[1]: *** [stage2_build] Error 2 make: *** [bootstrap] Error 2
Leo Brewin wrote:
Hi troops,
Has anybody successfully compiled GPC under MacOSX Lion? I've tried doing so using Adriaan's sources (gpc346u4-sources.dmg) but I encountered the following errors (as listed below).
Any help would be greatly appreciated.
I have an alpha version for 10.7 here http://microbizz.nl/gpc436u1-20110712.dmg. Current problems still to be solved
- line numbers of error messages are 0, which is not handy - packed arrays of boolean are broken for PowerPC code
Instructions on how to build
1. Move the unpacked gpc436u1-20110712 directory to the booting hard-disk at a location where there are no spaces in the full pathname 2. Double-click the build-gpc.command file 3. Building can take a long time, please standby to type your Administrator password several times in the build process.
A range of packages is needed to build the compiler. These will be downloaded automatically by the script into the packages subfolder (unless the packages are already in that folder). Upon completion, the compiler and compiler docs will be installed in the /Developer/Pascal directory of the booting hard-disk.
However, there is some added complexity for 10.7 and Xcode 4 if you need to build the PowerPC cross compiler
1. Xcode 4 doesn't install the Mac OS X 10.5 SDK. Please copy (or symlink) the MacOSX10.5.sdk folder from a previous Xcode installation to /Developer/SDKs/
2. Xcode 4 doesn't install the assemblers for 32/64-bit PowerPC. If, in the Terminal application, you type the command "open /usr/libexec/gcc/darwin" the Finder will open the /usr/libexec/gcc/darwin folder. You will see there the subfolders "i386" and "x86_64". The subfolders "ppc" and "ppc64" from this http://microbizz.nl/powerpc-assembler.zip zip file, have to be added there.
3. Mac OS X 10.7 doen't install Rosetta, so you can't run PowerPC code. You need to transfer the output of the PowerPC cross compiler to another machine and test there.
Regards,
Adriaan van Os
Hi Adriaan,
You are a life-saver! Thank you so so much (yes, it worked like a charm). I am very relieved.
I did have one small problem. The compilation of gcc failed during the configure stage because /usr/bin/gcc-4.2 could not be found despite having installed Xcode 4.2. But that was easily fixed with a symlink to /usr/bin/gcc (which itself was a symlink to llvm-gcc-4.2).
I ran the testsuite with the following results
For the 32 bit gpc:
# of tests 5111 # of expected passes 5095 # of unexpected failures 10 # of unsupported tests 6
and for the 64 bit gpc:
# of tests 5111 # of expected passes 5081 # of unexpected failures 24 # of unsupported tests 6
Thanks once again,
Best wishes Leo Brewin
On 25/10/2011, at 6:30 PM, Adriaan van Os wrote:
Leo Brewin wrote:
Hi troops, Has anybody successfully compiled GPC under MacOSX Lion? I've tried doing so using Adriaan's sources (gpc346u4-sources.dmg) but I encountered the following errors (as listed below). Any help would be greatly appreciated.
I have an alpha version for 10.7 here http://microbizz.nl/gpc436u1-20110712.dmg. Current problems still to be solved
- line numbers of error messages are 0, which is not handy - packed arrays of boolean are broken for PowerPC code
Instructions on how to build
1. Move the unpacked gpc436u1-20110712 directory to the booting hard-disk at a location where there are no spaces in the full pathname 2. Double-click the build-gpc.command file 3. Building can take a long time, please standby to type your Administrator password several times in the build process.
A range of packages is needed to build the compiler. These will be downloaded automatically by the script into the packages subfolder (unless the packages are already in that folder). Upon completion, the compiler and compiler docs will be installed in the /Developer/Pascal directory of the booting hard-disk.
However, there is some added complexity for 10.7 and Xcode 4 if you need to build the PowerPC cross compiler
1. Xcode 4 doesn't install the Mac OS X 10.5 SDK. Please copy (or symlink) the MacOSX10.5.sdk folder from a previous Xcode installation to /Developer/SDKs/
2. Xcode 4 doesn't install the assemblers for 32/64-bit PowerPC. If, in the Terminal application, you type the command "open /usr/libexec/gcc/darwin" the Finder will open the /usr/libexec/gcc/darwin folder. You will see there the subfolders "i386" and "x86_64". The subfolders "ppc" and "ppc64" from this http://microbizz.nl/powerpc-assembler.zip zip file, have to be added there.
3. Mac OS X 10.7 doen't install Rosetta, so you can't run PowerPC code. You need to transfer the output of the PowerPC cross compiler to another machine and test there.
Regards,
Adriaan van Os
_______________________________________________ Gpc mailing list Gpc@gnu.de https://www.g-n-u.de/mailman/listinfo/gpc