Compiling using xcodebuild on Mac OS 10.4 Intel

Questions or HOWTOs about the above? Post 'em here...
Post Reply
dgmul
Private First Class
Private First Class
Posts: 6
Joined: Thu Dec 20, 2007 11:36 pm

Compiling using xcodebuild on Mac OS 10.4 Intel

Post by dgmul » Thu Dec 20, 2007 11:47 pm

Hey there!

I own a 20" first generation Intel iMac. I tried to compile BZFlag 2.0.10 from source using XCode, but I got an error while it was compiling. If anyone with any knowledge on this matter would be kind enough to give me any help, it would be greatly appreciated!

Here's the error:

Code: Select all

OpenGLGState.cxx:1582:24: error: GL/glx.h: No such file or directory
OpenGLGState.cxx:1582:24: error: GL/glx.h: No such file or directory
 g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -DINSTALL_DATA_DIR=\"/usr/local/share/bzflag\" -fsigned-char -Wno-deprecated -g -O2 -pipe -pedantic -fno-exceptions -W -Wall -Wundef -Wno-import -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -O0 -c RenderNode.cxx  -fno-common -DPIC -o .libs/RenderNode.o
 g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -DINSTALL_DATA_DIR=\"/usr/local/share/bzflag\" -fsigned-char -Wno-deprecated -g -O2 -pipe -pedantic -fno-exceptions -W -Wall -Wundef -Wno-import -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -O0 -c RenderNode.cxx -o RenderNode.o >/dev/null 2>&1
OpenGLGState.cxx: In static member function 'static bool OpenGLGState::haveGLContext()':
OpenGLGState.cxx:1597: error: 'glXGetCurrentContext' was not declared in this scope
OpenGLGState.cxx: In static member function 'static bool OpenGLGState::haveGLContext()':
OpenGLGState.cxx:1597: error: 'glXGetCurrentContext' was not declared in this scope
OpenGLGState.cxx:1602: warning: control reaches end of non-void function
OpenGLGState.cxx:1602: warning: control reaches end of non-void function
lipo: can't open input file: /var/tmp//ccnSuCPu.out (No such file or directory)
make[2]: *** [OpenGLGState.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
** BUILD FAILED **

User avatar
macsforme
General
General
Posts: 2026
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Thu Dec 20, 2007 11:50 pm

Do you have the latest version of Xcode/Developer Tools?

Alternatively, if you just need a binary, you could use our test binary at http://beta.bzflag.bz/builds/2.0.x/MacO ... 2.0.10.dmg
Last edited by macsforme on Thu Dec 20, 2007 11:53 pm, edited 1 time in total.

dgmul
Private First Class
Private First Class
Posts: 6
Joined: Thu Dec 20, 2007 11:36 pm

Post by dgmul » Thu Dec 20, 2007 11:51 pm

Constitution wrote:Do you have the latest version of Xcode/Developer Tools?
Hm, don't know. How would I find that out?

User avatar
macsforme
General
General
Posts: 2026
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Thu Dec 20, 2007 11:55 pm

dgmul wrote:
Constitution wrote:Do you have the latest version of Xcode/Developer Tools?
Hm, don't know. How would I find that out?
Your Xcode tools should have a version in the readme somewhere... compare that to the version of the latest download from Apple.

It looks like the compiler can't find your OpenGL headers, which is strange. Perhaps you could attach the entire output?

dgmul
Private First Class
Private First Class
Posts: 6
Joined: Thu Dec 20, 2007 11:36 pm

Post by dgmul » Fri Dec 21, 2007 12:03 am

Turns out I have XCode 2.2.1. The newest version is apparently XCode 3.0, but that is a part of Mac OS 10.5 Leopard, and I have Mac OS 10.4 Tiger. To upgrade to XCode 3.0 I would have to buy Leopard.

Attached is the entire output.
Attachments
bzflagcompileoutput.txt
The entire output.
(30.56 KiB) Downloaded 98 times

User avatar
macsforme
General
General
Posts: 2026
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Fri Dec 21, 2007 12:18 am

dgmul wrote:Turns out I have XCode 2.2.1.
I believe the latest Xcode tools for Tiger is version 2.5... see http://developer.apple.com/tools/download/

It looks indeed like XCode can't find your OpenGL headers.

Code: Select all

checking GL/glx.h usability... no
checking GL/glx.h presence... no
checking for GL/glx.h... no
These should be included with Xcode (any version), so the issue is confusing. Try updating to the latest Xcode tools, and if you still can't build, you might try building from the command line first (and then using Xcode to create the final package).

User avatar
optic delusion
Special Forces
Special Forces
Posts: 1011
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Post by optic delusion » Fri Dec 21, 2007 2:17 pm

Copy SDL.framework to /Library/Frameworks
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

dgmul
Private First Class
Private First Class
Posts: 6
Joined: Thu Dec 20, 2007 11:36 pm

Post by dgmul » Fri Dec 21, 2007 9:55 pm

Optic Delusion wrote:Copy SDL.framework to /Library/Frameworks
Yeah, I had done that.

Now I get a different looking error with XCode 2.5, which is attached.
Attachments
bzflagcompileoutput.txt
Output for "xcodebuild" using XCode 2.5.
(30.56 KiB) Downloaded 95 times

User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak » Fri Dec 21, 2007 11:53 pm

It looks like it's not configured correctly. Macs should not be using GLX calls, they should be using Apple's GL Framework. Try re-running configure and/or editing config.h as applicable.

dgmul
Private First Class
Private First Class
Posts: 6
Joined: Thu Dec 20, 2007 11:36 pm

Post by dgmul » Sat Dec 22, 2007 2:39 am

DTRemenak wrote:It looks like it's not configured correctly. Macs should not be using GLX calls, they should be using Apple's GL Framework. Try re-running configure and/or editing config.h as applicable.
How might one go about doing that?

User avatar
blast
General
General
Posts: 4784
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast » Sun Dec 23, 2007 3:23 am

dgmul wrote:
DTRemenak wrote:It looks like it's not configured correctly. Macs should not be using GLX calls, they should be using Apple's GL Framework. Try re-running configure and/or editing config.h as applicable.
How might one go about doing that?
To run configure, launch Terminal.app. Then, cd into the BZFlag source directory, and run ./configure
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

dgmul
Private First Class
Private First Class
Posts: 6
Joined: Thu Dec 20, 2007 11:36 pm

Post by dgmul » Sun Dec 30, 2007 12:56 am

Whoops, attached the wrong error there in my last post.

Attached is the output I get for "xcodebuild" using XCode 2.5, and then the output I get when I reconfigure, and try to build using "make".
Attachments
bzflagcompileoutput2.txt
Output for "xcodebuild" using XCode 2.5.
(32.86 KiB) Downloaded 84 times
bzflagcompileoutput3.txt
Output for "make" after reconfiguring.
(5.8 KiB) Downloaded 93 times

Enigma
Private First Class
Private First Class
Posts: 211
Joined: Sat Apr 23, 2005 3:13 am

Post by Enigma » Sun Dec 30, 2007 3:25 am

Code: Select all

cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (can't load from it)
/Developer/usr/bin/../libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_curl_easy_cleanup
_curl_easy_getinfo
_curl_easy_init
_curl_easy_perform
_curl_easy_setopt
_curl_formadd
_curl_formfree
_curl_global_init
_curl_multi_add_handle
_curl_multi_fdset
_curl_multi_info_read
_curl_multi_init
_curl_multi_perform
_curl_multi_remove_handle
_curl_version

You don't have a universal binary of libcurl; you are missing the ppc part.

Post Reply