Game Development Community

Issues building on Mac PPC

by Jason White · in Torque 3D Professional · 06/28/2009 (2:58 am) · 6 replies

I'm trying to build the code, but I am getting a lot of errors similar to the following:

cd "/Users/jason/Torque_3D_2009_SDK_Beta_3_Mac/Genre Kits/FPS Genre Kit/buildFiles/Xcode"
/Developer/usr/bin/gcc-4.0 -x c++ -arch ppc -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -D__MACOSX__ -DTORQUE_UNICODE -DTORQUE_SHADERGEN -DTORQUE_PLAYER -DTORQUE_UNICODE -DTORQUE_SHARED -DTORQUE_OGGVORBIS -DTORQUE_OGGTHEORA -DBAN_OPCODE_AUTOLINK -DICE_NO_DLL -DTORQUE_OPCODE -DTORQUE_COLLADA -DDOM_INCLUDE_TINYXML -DPCRE_STATIC -D__MACOSX__ -DLTM_DESC -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mtune=G5 -fvisibility-inlines-hidden -mmacosx-version-min=10.4 -gdwarf-2 -iquote "/Users/jason/Torque_3D_2009_SDK_Beta_3_Mac/Genre Kits/FPS Genre Kit/buildFiles/Xcode/build/FPS Genre Kit Bundle.build/Release/FPS Genre Kit Bundle.build/FPS Genre Kit Bundle-generated-files.hmap" "-I/Users/jason/Torque_3D_2009_SDK_Beta_3_Mac/Genre Kits/FPS Genre Kit/buildFiles/Xcode/build/FPS Genre Kit Bundle.build/Release/FPS Genre Kit Bundle.build/FPS Genre Kit Bundle-own-target-headers.hmap" "-I/Users/jason/Torque_3D_2009_SDK_Beta_3_Mac/Genre Kits/FPS Genre Kit/buildFiles/Xcode/build/FPS Genre Kit Bundle.build/Release/FPS Genre Kit Bundle.build/FPS Genre Kit Bundle-all-target-headers.hmap" -iquote "/Users/jason/Torque_3D_2009_SDK_Beta_3_Mac/Genre Kits/FPS Genre Kit/buildFiles/Xcode/build/FPS Genre Kit Bundle.build/Release/FPS Genre Kit Bundle.build/FPS Genre Kit Bundle-project-headers.hmap" -Wall -Wno-sign-compare -Wpointer-arith -Wno-unknown-pragmas -Wno-unused-parameter -Wno-non-virtual-dtor -Wno-reorder "-F../../game/FPS Genre Kit.app/Contents/Frameworks" -F../../../../engine/lib/openal/macosx -F../../../../engine/lib/xiph/macosx "-I../../game/FPS Genre Kit.app/Contents/Frameworks/include" -I../../game/shaders -I../../../../Engine/lib/lmng -I../../../../Engine/lib/lpng -I../../../../Engine/lib/ljpeg -I../../../../Engine/lib/lungif -I../../../../Engine/lib/zlib -I../../../../Engine/lib/tinyxml -I../../../../Engine/lib/opcode -I../../../../Engine/lib/libvorbis/include -I../../../../Engine/lib/libogg/include -I../../../../Engine/lib/libtheora/include -I../../../../Engine/lib/squish -I../../source -I../../../../Engine/source -I../../../../Engine/lib -I../../../../Engine/lib/fmod/mac/inc -I../../../../Engine/lib/collada/include -I../../../../Engine/lib/collada/include/1.4 "-I/Users/jason/Torque_3D_2009_SDK_Beta_3_Mac/Genre Kits/FPS Genre Kit/buildFiles/Xcode/build/FPS Genre Kit Bundle.build/Release/FPS Genre Kit Bundle.build/DerivedSources" -c "/Users/jason/Torque_3D_2009_SDK_Beta_3_Mac/Genre Kits/FPS Genre Kit/buildFiles/Xcode/../../../../Engine/source/T3D/fx/lightning.cpp" -o "/Users/jason/Torque_3D_2009_SDK_Beta_3_Mac/Genre Kits/FPS Genre Kit/buildFiles/Xcode/build/FPS Genre Kit Bundle.build/Release/FPS Genre Kit Bundle.build/Objects-normal/ppc/lightning.o"
../../../../Engine/source/platform/platformIntrinsics.gcc.h: In function 'bool dCompareAndSwap(volatile U64&, U64, U64)':
../../../../Engine/source/platform/platformIntrinsics.gcc.h:52: error: 'OSAtomicCompareAndSwap64' was not declared in this scope

I'm building on a Mac (G5 PPC Quad Core) with Xcode 3.1 and OS X 10.5.7.

Any help greatly appreciated...

#1
06/28/2009 (5:19 am)

#ifdef out the 64bit versions of dCompareAndSwap. OSAtomicCompareAndSwap64 is not available on the PPC.

IIRC, the 64bit CAS variants are not used anywhere at the moment, so anything should compile fine then.
#2
06/29/2009 (1:59 pm)
Torque 3D as well as TGEA, do not support non-Intel CPUs, which is why I'm guessing this isn't working.
#3
06/29/2009 (2:08 pm)
I've added a couple of #ifdefs as suggested by //FIXME (thanks for the suggestion) around the offending sections and all is good now. I can at least get on and run the code and start learning the engine. Hopefully, PPC will still be a valid platform after Beta 3 as I don't own an Intel MAC. Still have around 200 warning's but it does run.


#4
06/29/2009 (2:08 pm)
It will likely compile with the above change but I don't know how well Torque handles big-endianess. Certainly a bunch other surprises as well. Would be interesting to know if this thing gets up and running on a PPC.

//Edit: Simultaneous post; we've already got the answer
#5
06/29/2009 (2:24 pm)
I have been keeping the core behaving on PPC and big-endian CPUs. MacOS though, I have no idea ;)
#6
06/29/2009 (8:56 pm)
Good for PPCs that the X360 use a PPC bigendian CPU (G5.x) as well, isn't it :D