Game Development Community

Problem compiling TGE under Xcode 2.2 on 10.4.3

by Laurent Daudelin · in Torque Game Engine · 12/07/2005 (2:56 pm) · 30 replies

I'm just starting with TGE. I did install the whole thing, fixed the 'fix frameworks.command' file, updated the targets to native and tried to build everything. It did compile quite a few files but then generated errors in macCarbNet.cc, specifically:

/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc: In static member function 'static void Net::process()':
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc:412: error: invalid conversion from 'U32*' to 'socklen_t*'
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc:412: error: initializing argument 6 of 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)'
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc:416: error: invalid conversion from 'U32*' to 'socklen_t*'
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc:416: error: initializing argument 6 of 'ssize_t recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)'
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc:476: error: invalid conversion from 'unsigned int*' to 'int*'
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc:476: error: initializing argument 5 of 'int getsockopt(int, int, int, void*, int*)'
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc: In static member function 'static NetSocket Net::accept(NetSocket, NetAddress*)':
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc:657: error: invalid conversion from 'U32*' to 'socklen_t*'
/Users/laurent/Documents/Development/Personal/Torque/pb/../engine/platformMacCarb/macCarbNet.cc:657: error: initializing argument 3 of 'int accept(int, sockaddr*, socklen_t*)'

Has anybody else got this error? I'm a little reluctant to make changes to the original source code.

About the author

Recent Threads

Page«First 1 2 Next»
#21
02/23/2006 (10:29 am)
Hello:

About the JAM error:

I changed one thing in the "fix framework.command" file in the pb folder from (cd $basename) to (cd "$basename") as indicated in the forum notes.

The TGE compiles.

I noticed that the compiled TorqueDemo.app is not the same as the original in the example folder via running the application in its place. I say this because when clicking the icon for the wolrd editor, the application quits.

Where would I find in the documentation, broader view, a road map, FLOW CHART, or something that gives the overall picture of TGE?

Thanks
Jesse
#22
02/25/2006 (8:51 pm)
That fixed my problem as well
#23
07/04/2006 (3:34 pm)
I just downloaded the 1.4 SDK and got some wierd file not found errors when I tried to build under XCode 2.2, regaurding a custom shell script? I tried it a couple of times.

Errors....
mv: rename ./build/Default to ./build/Default-old-07.04.2006-16.19.23: No such file or directory
ln: ./build/Default: No such file or directory

I added the directory structure /build/Default to the example folder and, tried building again. It failed again with a different error I didn't catch. I tried it one more time and the build completed just fine.

I hope this helps if any one else comes accross this type of error, could someone explain what this is about? It works now but I would like to know why.

Thanks,
Jason
#24
07/05/2006 (8:12 pm)
@jason: If that starts happening, generally just delete the "build" folder
#25
07/10/2006 (7:14 am)
That didn't help me, still get the same errors... 2 errors:

mv: rename ./build/Default to ./build/Default-old-07.10.2006-16.13.00: No such file or directory
ln: ./build/Default: No such file or directory


tried to delete the build-folder, but no luck...
#26
07/10/2006 (7:58 am)
This happened to me the last time I grabbed the latest & greatest from CVS. The script is trying to back up the contents of "Default" which is basically your last build. However, if you've never made a build before, it fails.

The fix is easy: make an empty directory called "Default" in the "build" folder. Or, you can just remove this script from your build target.
#27
07/24/2006 (4:30 pm)
Ok, I repro'd this one, and fixed the script.
In all the targets in the Xcode file, double click the 'Fix Build Products Path' build phase, and change one line

from
if [ ! -h ./build/Default ]; then
to
if [ -e ./build/Default -a ! -h ./build/Default ]; then

Share and Enjoy
/Paul
#28
07/24/2006 (5:03 pm)
Dang, man...I was struggling with this one until I realized what made it work: it needed to have a "build" folder inside the "pb" folder. Not sure why it was looking there, but as soon as I created a /pb/build directory, all was well (using that old script).
#29
11/13/2006 (8:33 pm)
Help!

Building target "Torque-MacCarb-Debug" of project "torque_xcode_2_1" with configuration "Default"


Checking Dependencies
JamToolExecution Torque-MacCarb-Debug
cd /Users/jameslangford/Desktop/mmokit-1.5/pb
setenv ASCII_OUTPUT_ANNOTATION YES
setenv ENABLE_APPLE_JAM_EXTENSIONS YES
setenv ENABLE_APPLE_JAM_OUTPUT_ANNOTATION YES
setenv GROUP jameslangford
setenv NATIVE_ARCH i386
setenv USER jameslangford
/Developer/Private/jam -d1 -j2 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/Torque-MacCarb-Debug.jam build ACTION=build _DEFAULT_GCC_VERSION=4.0 GCC_VERSION_IDENTIFIER=3_3 CONFIGURATION=Default BUILD_STYLE=Default CPP_HEADERMAP_FILE=/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/TorqueDemoDebugOSX.hmap SRCROOT=/Users/jameslangford/Desktop/mmokit-1.5/pb OBJROOT=/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo SYMROOT=/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo DSTROOT=/tmp/torque_xcode_2_1.dst

PhaseScriptExecution "/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh" /Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh
echo "=== Script ==="
cat /Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh
echo "--- Output ---"
/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh
_result=$?
echo "=== Exit code: ${_result} ==="
exit ${_result}
=== Script ===
#!/bin/sh
#!/bin/bash

################################################################################
# Fixes damaged frameworks after they have been checked out of CVS.
# This is neccesary because CVS does not deal well with symbolic links.
################################################################################

# The following few lines can be used to make sure a .command file is run in it's local dir,
# and are saved here for archival & educational purposes.
## Different versions of macosx set the working directory to different places.
## We try to cope, by finding the working dir of this .command file.
#
#dir='dirname "$0"'
#echo 'started in directory:' 'pwd'
#if [ -e $dir ]; then
# cd $dir
#fi

# Ok, we're now pretty sure we're in the /.../torque/pb directory.
# Move up one dir, and save it off for future use.
cd ..
basedir='pwd'
echo "moving to directory: $basedir"


# We set up some convinience variables here...
openaldir="lib/openal/macosx"
xiphdir="lib/xiph/macosx"
version='A'
current='Versions/Current'
headers='Headers'
resources='Resources'


for frameworkname in "$openaldir/OpenAL" "$xiphdir/Ogg" "$xiphdir/Vorbis" "$xiphdir/Theora" ; do
framework="$frameworkname.framework"
frameworkname='basename "$frameworkname"'
echo "-------- fixing " 'basename "$framework"' " ---------"
echo "entering $framework"
cd $framework
if [ ! -h $current ]; then
rm $current
ln -s "$version/" $current
echo "fixing $framework/$current"
fi
if [ ! -h $headers ]; then
rm $headers
ln -s "$current/$headers/" $headers
echo "fixing $framework/$headers"
fi
if [ ! -h $resources ]; then
rm $resources
ln -s "$current/$resources/" $resources
echo "fixing $framework/$resources"
fi
if [ ! -x "$current/$frameworkname" ]; then
chmod 755 "$current/$frameworkname"
fi
if [ ! -h $frameworkname ]; then
rm $frameworkname
ln -s "$current/$frameworkname" $frameworkname
echo "fixing $framework/$frameworkname"
fi
cd $basedir
done

--- Output ---
moving to directory: /Users/jameslangford/Desktop/mmokit-1.5

CompileCplusplus /Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/Objects-normal/i386/audio.o ../engine/audio/audio.cc
/usr/bin/g++-3.3 -c -Wp,-header-mapfile,/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/TorqueDemoDebugOSX.hmap -F/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/Default -F../lib/openal/macosx -F../lib/xiph/macosx -F/Users/jameslangford/Desktop/mmokit-1.5/pb -I/Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/Default/include -I../engine -I../lib -I/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Headers -I/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/OT.framework/Headers -I/System/Library/Frameworks/ApplicationServices.framework/Versions/Current/Frameworks/QD.framework/Headers -I/System/Library/Frameworks/Carbon.framework/Versions/Current/Frameworks/HIToolbox.framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers -I/System/Library/Frameworks/Carbon.framework/Headers -I/System/Library/Frameworks/AGL.framework/Headers -I/Developer/Headers/FlatCarbon -I../lib/xiph/include -I../lib/lpng -I../lib/zlib -I../lib/ljpeg -I../lib/lungif -I../lib/openal/macosx/eax -I../engine/audio -arch i386 -fno-common -fpascal-strings -O0 -w -Wunused -Wunused-parameter -pipe "-fmessage-length=0" -mdynamic-no-pic -g "-force_cpusubtype_ALL" "-D__MACOSX__" "-DTORQUE_MULTITHREAD" "-DTORQUE_DEBUG" "-DENABLE_PROFILER" "-faltivec" "-falign-functions=16" "-falign-loops=16" "-falign-labels=16" "-falign-jumps=16" "-mcpu=G4" "-mtune=G4" "-malign-natural" "-mno-multiple" "-DTORQUE_UNICODE" "-gfull" ../engine/audio/audio.cc -o /Users/jameslangford/Desktop/mmokit-1.5/pb/mmo/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/Objects-normal/i386/audio.o
g++-3.3: installation problem, cannot exec 'cc1plus': No such file or directory
#30
11/25/2006 (10:55 pm)
@James: This thread is and old thread, that was only relevant to compile issues under Xcode 2.2 and MacOSX 10.4.3.
1. The latest version of Xcode and MacOSX are 2.4.1, and 10.4.8, respectively, as of the date of this message. If you are still using those versions, you should update. MacOSX operating system updates are available through the Software Update program on your mac. Xcode updates are available from connect.apple.com/. You should, in general, try to use the latest versions of MacOSX and Xcode with Torque, because that's what'll be best supported.

I also see that you're trying to compile the MMOKit. I'm not sure what the status of that project is.
I'm far more interested in whether you can compile TGE 1.4.2 and TGE 1.5.0.

The specific problem you're having appears to be a bad install of Xcode. You should probably remove your existing copy of Xcode, and install the latest copy, along with the latest updates to MacOSX. The instructions for removing Xcode are in the Xcode disk image that you'll download from http://connect.apple.com

/Paul
Page«First 1 2 Next»