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 «Previous 1 2
#1
12/09/2005 (5:20 pm)
Did you download the engine from CVS or from the My Account section of the website?
#2
12/12/2005 (5:05 pm)
What's the correct answer? Should we get it via CVS or My Account? :)

I previously compiled Torque 1.3 in both Cygwin and FreeBSD. I'm about to try compiling Torque 1.4 in Mac OS X 10.4 and would like to do it the recommended way. At this time I'm having a hard time tracking down the instructions to compile in the Mac environment. This is my first time using a Mac, so this whole "xcode" stuff is still Greek to me. :)
#3
12/12/2005 (7:30 pm)
I am also trying to compile TGE 1.4 under xcode 2.2 and Tiger 10.4.3.. I get a single error:

"Command /Developer/Private/jam failed with exit code 1", location: Tool:0

I had no idea what to do. If anybody has a guess, that would be great, I have been stuck for way too long.

thanks
andrew
#4
12/13/2005 (5:06 pm)
I ask about CVS / My Account because the fix-frameworks.command script is not needed unless you get the code from CVS. This is because CVS mangles the symbolic links in frameworks.

If you get 1.4 from the My Account page, you'll be getting a version that's been run through some testing, and is known to work. That said, there are still lurking bugs & opportunities for improvement in the code, and the latest goodies are usually on CVS. But using the latest code, and dealing with CVS, is not trivial. You can think of it either as not-for-novices, or as an exercise in self edification & education. Depends on your perspective.

@Dave Shay: Xcode is the recommended way. Preferably Xcode 2.1 or greater. Read the readme for more info. As for getting the code, the My Account page is the recommended way.

@Andrew: In Xcode, you can get the raw text log from the build tool like this:
1. After the build fails, go to the Build menu and choose "Build Results", to show the results window.
2. In the build results window, you should see an upper and a lower pane, with a dividing bar between them. On the left hand side of this dividing bar, you should see 4 small square buttons: a check mark, a yellow warning sign, some dotted lines that resemble a .txt file icon, and a solid black down arrow.
3. Click the third button, the one that looks like a text icon. A third pane will open between the upper and lower panes.
4. In the upper pane, click on the error you want more information about.
5. Look in the middle pane, a full description of the error will be there. It may be cryptic, if you don't understand it, try posting it in the forums, and someone may be able to explain it to you.
#5
12/14/2005 (8:30 am)
Paul, thanks for the answers!
#6
12/14/2005 (3:29 pm)
Paul, thanks a lot for your help. > here comes the full error message:

///////////////////////////////////////////

Building target "Torque-MacCarb-Debug" of project "torque_xcode_2_1"


Checking Dependencies
JamToolExecution Torque-MacCarb-Debug
cd "/Users/ahierony/TORQUE/Torque SDK/example"
setenv ASCII_OUTPUT_ANNOTATION YES
setenv ENABLE_APPLE_JAM_EXTENSIONS YES
setenv ENABLE_APPLE_JAM_OUTPUT_ANNOTATION YES
setenv GROUP ahierony
setenv MACOSX_DEPLOYMENT_TARGET 10.3
setenv NATIVE_ARCH ppc
setenv USER ahierony
/Developer/Private/jam -d1 -j1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=/Users/ahierony/TORQUE/Torque\ SDK/example/build/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=4_0 CONFIGURATION=Default BUILD_STYLE=Default CPP_HEADERMAP_FILE=/Users/ahierony/TORQUE/Torque\ SDK/example/build/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/Torque\ Demo\ Debug\ OSX.hmap SRCROOT=/Users/ahierony/TORQUE/Torque\ SDK/example OBJROOT=/Users/ahierony/TORQUE/Torque\ SDK/example/build SYMROOT=/Users/ahierony/TORQUE/Torque\ SDK/example/build DSTROOT=/tmp/torque_xcode_2_1.dst

PhaseScriptExecution "/Users/ahierony/TORQUE/Torque SDK/example/build/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh" "/Users/ahierony/TORQUE/Torque SDK/example/build/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh"
echo "=== Script ==="
cat "/Users/ahierony/TORQUE/Torque SDK/example/build/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh"
echo "--- Output ---"
"/Users/ahierony/TORQUE/Torque SDK/example/build/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh"
_result=$?
echo "=== Exit code: ${_result} ==="
exit ${_result}
=== Script ===
#!/bin/sh
./fix\ frameworks.command
--- Output ---
/Users/ahierony/TORQUE/Torque SDK/example/build/torque_xcode_2_1.build/Default/Torque-MacCarb-Debug.build/BPTag000-script.sh: line 2: ./fix frameworks.command: No such file or directory
=== Exit code: 127 ===

///////////////////////////////////////////

the way I organised my folders is that I copied "torque_xcode_2_1.xcodeproj" in the example folder. Maybe that's the problem? Should I compile it from a different location?

thanks
andrew
#7
12/15/2005 (2:49 pm)
The project file is pretty much set up to run from the pb/ directory.
It's looking for the "fix frameworks.command" script, but not finding it.
It expects the script to be in the same folder as the project file, so...

There's your error man. Either move the xcode project back to the pb folder, or move the scripts to it.

Maybe those external script files need to go away...

/Paul
#8
12/16/2005 (9:31 am)
Well, not that simple, thanks for your help though.

If launch the xcode project from the pb file, with "fix framework.command, I get the following error messages:

./fix\ frameworks.command
--- Output ---
started in directory: /Users/ahierony/TORQUE/Torque SDK/pb
moving to directory: /Users/ahierony/TORQUE/Torque SDK
-------- fixing OpenAL.framework ---------
entering lib/openal/macosx/OpenAL.framework
./fix frameworks.command: line 63: cd: /Users/ahierony/TORQUE/Torque: No such file or directory
-------- fixing Ogg.framework ---------
entering lib/xiph/macosx/Ogg.framework
./fix frameworks.command: line 39: cd: lib/xiph/macosx/Ogg.framework: No such file or directory
chmod: Versions/Current/Ogg: No such file or directory
rm: Ogg: No such file or directory
fixing lib/xiph/macosx/Ogg.framework/Ogg
./fix frameworks.command: line 63: cd: /Users/ahierony/TORQUE/Torque: No such file or directory
-------- fixing Vorbis.framework ---------
entering lib/xiph/macosx/Vorbis.framework
./fix frameworks.command: line 39: cd: lib/xiph/macosx/Vorbis.framework: No such file or directory
chmod: Versions/Current/Vorbis: No such file or directory
rm: Vorbis: No such file or directory
fixing lib/xiph/macosx/Vorbis.framework/Vorbis
./fix frameworks.command: line 63: cd: /Users/ahierony/TORQUE/Torque: No such file or directory
-------- fixing Theora.framework ---------
entering lib/xiph/macosx/Theora.framework
./fix frameworks.command: line 39: cd: lib/xiph/macosx/Theora.framework: No such file or directory
chmod: Versions/Current/Theora: No such file or directory
rm: Theora: No such file or directory
fixing lib/xiph/macosx/Theora.framework/Theora
./fix frameworks.command: line 63: cd: /Users/ahierony/TORQUE/Torque: No such file or directory
=== Exit code: 1 ===


this is the message at the top of the fix framework.command:

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


# Different versions of macosx set the working directory to different places.
# We try to cope, by finding the working dir of this .command file.

>

so I guess fix framework is not working on my os x configuration.

what now?

anybody has gone through the same issue?

(btw I downloaded my copy of 1.4 directly from my account, does that make a difference?)

thanks
andrew
#9
12/16/2005 (6:40 pm)
I'm dealing with the same issue... I get this in my output window

JamToolExecution Torque-MacCarb-Debug
cd /Developer/Torque1-4/pb
setenv ASCII_OUTPUT_ANNOTATION YES
setenv ENABLE_APPLE_JAM_EXTENSIONS YES
setenv ENABLE_APPLE_JAM_OUTPUT_ANNOTATION YES
setenv GROUP Sumner
setenv NATIVE_ARCH ppc
setenv USER Sumner
/Developer/Private/jam -d1 -j1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=/Developer/Torque1-4/pb/../example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Torque-MacCarb-Debug.jam build ACTION=build _DEFAULT_GCC_VERSION=4.0 GCC_VERSION_IDENTIFIER=4_0 CONFIGURATION=Development BUILD_STYLE=Development CPP_HEADERMAP_FILE=/Developer/Torque1-4/pb/../example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Torque\ Demo\ Debug\ OSX.hmap SRCROOT=/Developer/Torque1-4/pb OBJROOT=/Developer/Torque1-4/pb/../example SYMROOT=/Developer/Torque1-4/pb/../example DSTROOT=/tmp/torque_pb_2_1.dst

CompileCplusplus /Developer/Torque1-4/pb/../example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Objects-normal/ppc/audioDataBlock.o ../engine/audio/audioDataBlock.cc
/usr/bin/g++-4.0 -c "-I/Developer/Torque1-4/pb/../example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Torque Demo Debug OSX.hmap" -F/Developer/Torque1-4/pb/../example/Development -F../lib/openal/macCarb -I/Developer/Torque1-4/pb/../example/Development/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../lib/openal/maccarb -I../lib/openal/maccarb/al -I/Developer/Headers/FlatCarbon -I../lib/vorbis/include -I../lib/lpng -I../lib/zlib -I../lib/ljpeg -I../lib/lungif -I../engine/audio -arch ppc -fno-common -fpascal-strings -O0 -w -pipe "-fmessage-length=0" -mdynamic-no-pic -g "-fpermissive" "-force_cpusubtype_ALL" "-D__MACOSX__" ../engine/audio/audioDataBlock.cc -o /Developer/Torque1-4/pb/../example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Objects-normal/ppc/audioDataBlock.o
../engine/platform/event.h:127: error: 'data' was not declared in this scope
../engine/platform/event.h:127: error: expected primary-expression before ')' token
../engine/platform/event.h:127: error: a function call cannot appear in a constant-expression
../engine/platform/event.h:130: error: 'data' was not declared in this scope
../engine/platform/event.h:130: error: expected primary-expression before ')' token
../engine/platform/event.h:130: error: a function call cannot appear in a constant-expression
../engine/platform/event.h:133: error: 'data' was not declared in this scope
../engine/platform/event.h:133: error: expected primary-expression before ')' token
../engine/platform/event.h:133: error: a fu

ETC

Please Help!
:)
Sumner
#10
12/16/2005 (9:38 pm)
Sorry... did the GCC 4.0 patch and have 1 error...


StandaloneExecutable.LinkUsingFileList "/Developer/Torque1-4/pb/../example/Development/Torque Demo Debug OSX.app/Contents/MacOS/Torque Demo Debug OSX" /Developer/Torque1-4/pb/../example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Objects-normal/LinkFileList
/usr/bin/g++-4.0 -o "/Developer/Torque1-4/pb/../example/Development/Torque Demo Debug OSX.app/Contents/MacOS/Torque Demo Debug OSX" "-L/Developer/Torque1-4/pb/../example/Development" "-L../lib/vorbis/macosx" "-F/Developer/Torque1-4/pb/../example/Development" "-F../lib/openal/macCarb" -filelist /Developer/Torque1-4/pb/../example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Objects-normal/LinkFileList "-arch" "ppc" "-prebind" "-Wl,-no_arch_warnings" "-flat_namespace" "-framework" "AGL" "-framework" "Carbon" "-framework" "OpenGL" "-framework" "CoreFoundation" "-framework" "DrawSprocket" "-framework" "CoreServices" "-logg" "-lvorbis"
/usr/bin/ld: table of contents for archive: ../lib/vorbis/macosx/libogg.a is out of date; rerun ranlib(1) (can't load from it)
/usr/bin/ld: table of contents for archive: ../lib/vorbis/macosx/libvorbis.a is out of date; rerun ranlib(1) (can't load from it)
/usr/bin/ld: warning prebinding disabled because dependent library: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices can't be searched
collect2: ld returned 1 exit status


Still stuck... thanks for getting me this far
:)
Sumner
#11
12/17/2005 (8:57 pm)
@Sumner: Just as it says, you need to run ranlib on the libraries. This can be done by opening a terminal window, navigating to the directory that contains the .a files, and typing "ranlib *.a". Also, you appear to be using an old project file. The version I've just tested from the downloads section does not use the .a files.

@Andrew: Ah... Looks like it's choking on that space in the path name. Fun fun fun. Simple fix: remove the space from "Torque SDK", so that the full path is /Users/ahierony/TORQUE/TorqueSDK/pb. That, or you can open the script, and change line# 63 from this
cd $basename
to this
cd "$basename"

@Everyone: Always be sure you're using the project file published with the version of torque you're using. The project file is a living work in progress, just like the rest of the engine. You may *expect* problems if you don't stay up to date with it.
#12
12/18/2005 (8:42 pm)
I ran into the same problem with the space in the name of the "Torque SDK" folder. I renamed it to "Torque" and everything built with no errors. I didn't have to run "ranlib" on anything. I'm new to the mac but I found it to be relatively painless once I renamed the folder.
#13
12/19/2005 (7:19 pm)
Works now, thanks a lot for your help Paul!

andrew
#14
01/31/2006 (6:04 pm)
Personally, I simply downloaded from my accounts, hit the readme, ran the command (not knowing why but I figured why not) and then opened the project file and hit build. It took forever to get done but compiled first time. No problems since. Lucky
#15
02/01/2006 (5:13 am)
@ALL

I see you guys are running the Demo DEBUG version. Have any of you had problems with the DEPLOYMENT release ?
#16
02/20/2006 (7:06 am)
I cant compile with xCode 2.2.1

please help.

Most of my errors are in compiledEval.cc (7 errors)

It says
"error: Invalid use of undefined type 'struct Resmanager'"

and another error I get is

"Command /Developer/Private/Jam failed with exit code 1"

Using Development release
#17
02/20/2006 (5:33 pm)
@Shayaan: Please start a new thread, for the new issue. In the new thread, be sure to say what version of Torque you are using, because this sounds like an old issue that has been fixed.
#18
02/21/2006 (9:39 pm)
I am new TGE 1.4 indie member. Wow. I seem to have similar problem. I cannot compile source code. I seem to get something like "Command /Developer/Private/Jam failed with exit code 1". I am using Xcode 2.2.1 with MacOS 10.4.5.

Please help

Thanks
#19
02/22/2006 (7:48 am)
@Jesse,

Check this same Mac forum for previous messages about the Jam error.
Page «Previous 1 2