Hi all,
First: Thank you all for making the updates to the various scripts to make the POWERPC Mac compile so much cleaner for 22.1 !
Second: On my G4, we now only have the one final issue, which I guess, from reading the thread, is probably outside the scope of what can be altered, due to egtb.cpp being owned by a different author:
If we modify (per previously) the Makefile to allow it to work on G4 (ie - add the -DPOWERPC option), then we still get the errors due to the redefinition of 'lock_t', with the following 'invalid conversion' errors.
As mentioned, manual alteration of the egtb.cpp file to remove the definition of lock_t then allows the compile to complete successfully.
Probably no way to fix this issue, but just posting this as an FYI for any of us still running the old G4 chipsets....
Example of compile issue - original 22.1 egtb.cpp file.
--------------------------------------------------------------
$ make darwin
make target=FreeBSD \
CC=gcc CXX=g++ \
CFLAGS=' -Wall -pipe -O3' \
CXFLAGS= \
LDFLAGS= \
LIBS='-lstdc++' \
opt=' -DCPUS=2 -DPOWERPC' \
crafty-make
gcc -Wall -pipe -O3 -DCPUS=2 -DPOWERPC -DFreeBSD -c crafty.c
g++ -c -DCPUS=2 -DPOWERPC -DFreeBSD egtb.cpp
egtb.cpp:83:1: warning: "lock_t" redefined
In file included from egtb.cpp:54:
lock.h:78:1: warning: this is the location of the previous definition
egtb.cpp:4484: warning: 'TB_CRC_CHECK' initialized and declared 'extern'
egtb.cpp: In function 'void VTbCloseFile(int, color)':
egtb.cpp:5392: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5392: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:5398: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5398: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp: In function 'int TbtProbeTable(int, color, unsigned int, unsigned int)':
egtb.cpp:5741: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5741: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:5750: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5750: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:5765: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5765: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5782: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5782: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5794: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5794: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5796: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5796: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:5802: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5802: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5823: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5823: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5824: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5824: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:5825: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5825: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:5836: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5836: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5851: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5851: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5860: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5860: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5875: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5875: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:5897: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5897: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:5899: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5899: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:5994: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:5994: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:6007: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6007: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:6013: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6013: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:6023: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6023: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:6031: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6031: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:6033: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6033: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:6049: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6049: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:6050: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6050: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:6073: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6073: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:6074: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6074: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:6080: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6080: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
egtb.cpp:6082: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6082: error: initializing argument 1 of 'void OSSpinLockLock(OSSpinLock*)'
egtb.cpp:6086: error: invalid conversion from 'volatile int*' to 'OSSpinLock*'
egtb.cpp:6086: error: initializing argument 1 of 'void OSSpinLockUnlock(OSSpinLock*)'
make[2]: *** [egtb.o] Error 1
make[1]: *** [crafty-make] Error 2
make: *** [darwin] Error 2
$ make clean
rm -f *.o crafty
[success] - After modification to egtb.cpp, to remove definition of lock_t:
------------------------------------------------------------------------------------
$ make darwin
make target=FreeBSD \
CC=gcc CXX=g++ \
CFLAGS=' -Wall -pipe -O3' \
CXFLAGS= \
LDFLAGS= \
LIBS='-lstdc++' \
opt=' -DCPUS=2 -DPOWERPC' \
crafty-make
gcc -Wall -pipe -O3 -DCPUS=2 -DPOWERPC -DFreeBSD -c crafty.c
g++ -c -DCPUS=2 -DPOWERPC -DFreeBSD egtb.cpp
egtb.cpp:4483: warning: 'TB_CRC_CHECK' initialized and declared 'extern'
gcc -o crafty crafty.o egtb.o -lm -lstdc++
$