Mac SVN/Compile instructions

Questions or HOWTOs about the above? Post 'em here...
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Mac SVN/Compile instructions

Post by optic delusion »

When Apple switched to intel processors, we had to do a lot of funny things with SDL in order to compile BZFlag, because SDL was not yet a universal library. Now it's almost 2 years later and SDL has been updated. The entire process is much easier.
Get SDL-1.2.12.dmg from this page.http://www.libsdl.org/download-1.2.php
Copy SDL.framework to /Library/Frameworks

Of course you also need Apple's DevTools including X-Code to be installed.
EDIT You'll need Xcode 2.4.1... but xcode 2.5 will not work on OSX 10.4)

The BZFlag Developers have switched from CVS version control to SVN. There are many subversion clients, but unless you are going to be uploading you don't need a front-end.
I installed this package http://metissian.com/projects/macosx/subversion/
It is an easy install, just double click and follow the installer directions, but to make it work, you have to do ONE of these two things.
1. Every time you are ready to use svn, run this command first.. export PATH=$PATH:/usr/local/bin
2. Or you could edit /etc/profile including the path to subversion permanently. PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:"

Alright, now we are ready to download and compile, open your bash terminal and do these.
1. Do one of the two steps above so that bash knows where to find subversion.
2. To get BZflag version 2.99 use this command svn checkout https://bzflag.svn.sourceforge.net/svnr ... unk/bzflag
2a. To get the latest 2.0 compatible bzflag use this command svn checkout https://bzflag.svn.sourceforge.net/svnr ... nch/bzflag
3. cd bzflag
4. ./autogen.sh
5. ./configure
6. xcodebuild

BZFlag.app is located at /bzflag/build/Default
You can move it to wherever you like.


After some amount of time, you are going to want to get the latest changes that have happened. It's easy.
export PATH=$PATH:/usr/local/bin
cd bzflag
svn up
xcodebuild
Last edited by optic delusion on Wed Sep 17, 2008 3:58 pm, edited 3 times in total.
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.
selmoatse
Private
Private
Posts: 2
Joined: Tue Oct 30, 2007 5:42 am

xcodebuild error

Post by selmoatse »

I am running Mac OS X v10.5.1 and Xcode v3.0. This is what I did (mostly following your instructions):

1. Downloaded SDL-1.2.12.dmg and copied the SDL.framework directory to /Library/Frameworks.
2. svn checkout https://bzflag.svn.sourceforge.net/svnr ... nch/bzflag
3. cd bzflag
4. ./autogen.sh
5. ./configure --enable-optimized [I also tried ./configure, and the xcodebuild fails similarly.]
6. xcodebuild

I'm just curious as to what's going wrong and how to fix the problem(s).

EDIT: If I run "make" and "sudo make install" instead of "xcodebuild", bzflag compiles and installs fine and I can run bzflag 2.0.11 by executing "bzflag" in a command prompt. BZFlag can search for servers, but when I try to connect to any of them the program reports "Server not found". It would still be nice to have a Bzflag.app file (that can connect to servers) that I could contribute to the community.

Attached are the output from "./configure --enable-optimized" and "xcodebuild".
Attachments
configure.txt
./configure --enable-optimized
(13.6 KiB) Downloaded 404 times
xcodebuild.txt
xcodebuild
(34.22 KiB) Downloaded 404 times
Last edited by selmoatse on Sun Dec 02, 2007 7:23 am, edited 2 times in total.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Post by optic delusion »

Looks like you need to update your devtools, you're on an Intel Mac but MacOSX10.4u.sdk/ is a PPC file. Maybe this problem is OSX 10.5 specific?

Looking at your edit.. If you were able to build without xcode, you did not get a full application. and all the sounds/fonts/images are not in the package. You need to tell the bzflag.app where the resources file is. Open bzflag with the -directory option. The command will look something like this
./Users/Micheal/bzflag/default/BZFlag -directory /Users/Micheal/bzflag/data
Moving the data into a resources folder (where it looks like it should go) does not work.

Try to build trunk with xcodebuild. If you do not use xcodebuild, you will never get a full application.
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.
selmoatse
Private
Private
Posts: 2
Joined: Tue Oct 30, 2007 5:42 am

Post by selmoatse »

Interestingly enough, /Developer/SDKs/MacOSX10.5sdk/ is present but apparently isn't used?

Attached are the output of "./configure --enable-optimized" with trunk and "xcodebuild". A warning about something called FreeType seems to be causing some problems. I have FreeType v2.3.5 installed.
Attachments
configure.txt
./configure --enable-optimized
(23.3 KiB) Downloaded 390 times
xcodebuild.txt
xcodebuild
(67.96 KiB) Downloaded 385 times
Last edited by selmoatse on Sun Dec 02, 2007 7:19 am, edited 1 time in total.
temporal distraction
Sergeant
Sergeant
Posts: 250
Joined: Wed Jan 05, 2005 3:12 pm

Post by temporal distraction »

http://bzflag.pastebin.ca/803757

I also had the build fail at that point (FTVectoriser)

Building trunk - I tried both xcodebuild and make.
User avatar
zaphod
Sergeant
Sergeant
Posts: 352
Joined: Sun Jan 23, 2005 3:20 pm
Location: beteigeuze-system
Contact:

Post by zaphod »

idem .... my build failed at FTVectoriser too ....
is it a 10.5 problem?
anyone tried with 10.4?

Code: Select all

c/FTVectoriser.cpp' || echo './'`src/FTVectoriser.cpp
src/FTVectoriser.cpp: In member function 'void FTVectoriser::MakeMesh(FTGL_DOUBLE)':
src/FTVectoriser.cpp:186: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/FTVectoriser.cpp:186: error:   initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/FTVectoriser.cpp:187: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/FTVectoriser.cpp:187: error:   initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/FTVectoriser.cpp:188: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/FTVectoriser.cpp:188: error:   initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/FTVectoriser.cpp:189: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/FTVectoriser.cpp:189: error:   initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/FTVectoriser.cpp:190: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/FTVectoriser.cpp:190: error:   initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
make[3]: *** [FTVectoriser.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
ERROR: make failed -- aborting
** BUILD FAILED **
.
.
.
Image
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Post by Enigma »

According to the plug-in releases forum, you want to build version 2.0.11, correct? You checked out version 2.1, which isn't what you want.

The svn command to get 2.0.11 is...

Code: Select all

svn co https://bzflag.svn.sourceforge.net/svnroot/bzflag/branches/v2_0branch/bzflag
There are also issues with compiling bzflag2.0.11 on Mac OS 10.5, so it would be easiest to only build bzfs and the plugins by disabling the client and bzadmin:

Code: Select all

./configure --enable-shared --enable-plugins --disable-client --disable-bzadmin
. This is what I do, as I can get the latest changes to the bzfs plugin API.

I was able to compile the client and bzadmin, but the client crashes nonstop. I think I had to restart the client 10 times while on lasermania, so I gave up and went back to 2.0.10. You can still compile plugins and bzfs without problems.
User avatar
zaphod
Sergeant
Sergeant
Posts: 352
Joined: Sun Jan 23, 2005 3:20 pm
Location: beteigeuze-system
Contact:

Post by zaphod »

as you suggested, i got the v2_0branch version through SVN ...
then:
cd to bzflag ::: ./autogen.sh ::: ./configure ::: xcodebuild
and got that error at the end ....!
(same with ./configure --enable-shared --enable-plugins --disable-client --disable-bzadmin)

Code: Select all

ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib for architecture i386
collect2: ld returned 1 exit status
ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/jA/jAWs+VUxH2m8+pmbS4SutU+++TI/-Tmp-//ccy6FkEY.out (No such file or directory)
make[2]: *** [bzfs] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
** BUILD FAILED **
any idea what could be the problem?
is it a permission issue?
.
.
.
Image
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

zaphod wrote:

Code: Select all

ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib for architecture i386
collect2: ld returned 1 exit status
ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/jA/jAWs+VUxH2m8+pmbS4SutU+++TI/-Tmp-//ccy6FkEY.out (No such file or directory)
make[2]: *** [bzfs] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
** BUILD FAILED **
Are you intentionally trying to build a Universal Binary?
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Post by Enigma »

To get bzfs to compile, you can enter

Code: Select all

export LDFLAGS=${LDFLAGS}-L/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries
into the terminal before running configure. Make sure you use the same shell for both commands.

This will get rid of the error from ld:

Code: Select all

ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

tz. wrote:am i doing something teh noob?

Code: Select all

BZFlag-2.0.10.20080510 with the following:
     curses: -lncurses
     SDL
     no bzadmin client binary!
     no bzflag client binary!
You'd have to read any error up higher on the output to see what the problem is. And you might even have to review the config.log file to see the real error.
"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
User avatar
Skeeve
Private First Class
Private First Class
Posts: 122
Joined: Sun Jun 04, 2006 3:27 pm
Location: Near Aix La Chappel

Post by Skeeve »

After installing XCode 2.5 on my PPC OS X 10.4 and checking out bzflag, I get an Error with autogen.sh

Code: Select all

$ ./autogen.sh 
Preparing the BZFlag build system...please wait

Found GNU Autoconf version 2.59
Found GNU Automake version 1.6.3
Found GNU Libtool version 1.5

Automatically preparing build ... Warning: autoreconf failed
Attempting to run the preparation steps individually

Preparing build ... ERROR: libtoolize failed
What can I do now?
Avatar created with South Park Studio

Don't you hate it when your posts get deleted without any note?
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

Skeeve wrote:After installing XCode 2.5 on my PPC OS X 10.4 and checking out bzflag, I get an Error with autogen.sh

Code: Select all

$ ./autogen.sh 
Preparing the BZFlag build system...please wait

Found GNU Autoconf version 2.59
Found GNU Automake version 1.6.3
Found GNU Libtool version 1.5

Automatically preparing build ... Warning: autoreconf failed
Attempting to run the preparation steps individually

Preparing build ... ERROR: libtoolize failed
What can I do now?
Please run autogen.sh with the --verbose flag and either paste it here or pastebin it.
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
Skeeve
Private First Class
Private First Class
Posts: 122
Joined: Sun Jun 04, 2006 3:27 pm
Location: Near Aix La Chappel

Post by Skeeve »

A Meteorite wrote: Please run autogen.sh with the --verbose flag and either paste it here or pastebin it.
Thanks for the hint. The problem seems to lie in libtoolize:

"libtoolize: cannot list files in `/usr/share/libtool'"
Attachments
autogenverbos.txt
(1.7 KiB) Downloaded 386 times
Avatar created with South Park Studio

Don't you hate it when your posts get deleted without any note?
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Post by Enigma »

Skeeve wrote:
A Meteorite wrote: Please run autogen.sh with the --verbose flag and either paste it here or pastebin it.
Thanks for the hint. The problem seems to lie in libtoolize:

"libtoolize: cannot list files in `/usr/share/libtool'"

Code: Select all

sudo ln -s /usr/bin/glibtoolize /usr/bin/libtoolize
User avatar
Skeeve
Private First Class
Private First Class
Posts: 122
Joined: Sun Jun 04, 2006 3:27 pm
Location: Near Aix La Chappel

Post by Skeeve »

Enigma wrote:
Skeeve wrote:
A Meteorite wrote:

Code: Select all

sudo ln -s /usr/bin/glibtoolize /usr/bin/libtoolize
That didn't help because I already did that before running autogen.sh --verbose.
Avatar created with South Park Studio

Don't you hate it when your posts get deleted without any note?
User avatar
Skeeve
Private First Class
Private First Class
Posts: 122
Joined: Sun Jun 04, 2006 3:27 pm
Location: Near Aix La Chappel

Post by Skeeve »

It seems XCode 2.5 isn't that much compatible :-( Everything seems to be installed under /Developer. But I have no idea how to fix it.

Just found this info:
Xcode 2.5 no longer provides /usr/share/libtool so the solution is to use the MacPorts libtool port instead. The attached patch makes this change. Please let me know if I may commit this change to your port. Thanks.
Does this help? Do I need to go back to XCode 2.4?
Avatar created with South Park Studio

Don't you hate it when your posts get deleted without any note?
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme »

Skeeve wrote:Does this help? Do I need to go back to XCode 2.4?
Why are you using such an old version of Xcode? The current version of Xcode is 3.1.

On my system, /usr/share/libtool/ exists and is a directory, so I'm not sure what the problem is.
User avatar
Skeeve
Private First Class
Private First Class
Posts: 122
Joined: Sun Jun 04, 2006 3:27 pm
Location: Near Aix La Chappel

Post by Skeeve »

Constitution wrote:Why are you using such an old version of Xcode? The current version of Xcode is 3.1.
This release (XCode 3.1) provides additional GCC and LLVM compiler options, general bug fixes, and must be installed on Leopard, Mac OS X 10.5.0 and higher.
Skeeve wrote: After installing XCode 2.5 on my PPC OS X 10.4 and
Enough quoted?
Avatar created with South Park Studio

Don't you hate it when your posts get deleted without any note?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

he actualy has libtool, as the autogen detects, the problem seems that it dosn't work the way the makefile expects it.

Honestly, since it's such an old version, it sounds like apple just busted something in 2.5. If it works with 2.4 then just use that, I doubt you'll be getting any major advantage out of 2.5
ImageJeffM
User avatar
Skeeve
Private First Class
Private First Class
Posts: 122
Joined: Sun Jun 04, 2006 3:27 pm
Location: Near Aix La Chappel

Post by Skeeve »

JeffM wrote:I doubt you'll be getting any major advantage out of 2.5
Just downloading it. MacPORTS wanted to install too much so I removed it before it even finished. I think 2.4 will work because it did before.
Avatar created with South Park Studio

Don't you hate it when your posts get deleted without any note?
User avatar
Skeeve
Private First Class
Private First Class
Posts: 122
Joined: Sun Jun 04, 2006 3:27 pm
Location: Near Aix La Chappel

Post by Skeeve »

Okay… No libtool problem in in autogen with XCode 2.4.1. Still configuring.

Update: xcodebuild on commandline fails. Starting xcode and building using the gui succeeds.

If anyone is interested in messages to investigate for the reason of the failure, just tell me.
Avatar created with South Park Studio

Don't you hate it when your posts get deleted without any note?
jpenguin
Private First Class
Private First Class
Posts: 128
Joined: Wed Jun 11, 2008 11:56 pm

Re: Mac SVN/Compile instructions

Post by jpenguin »

Ya, 2.5 is broken. My laptop, runs leopard, has xcode 3.x and build bzflag fine
User avatar
fluffy mcduff
Private First Class
Private First Class
Posts: 68
Joined: Sun Mar 09, 2008 9:39 pm
Location: in my mind, slowly going insane.

Re: Mac SVN/Compile instructions

Post by fluffy mcduff »

i have a problem compiling on my mac....

i have a white macbook running loepard 10.5.7, xcode 3.1.3, and im trying to compile bzflag 2.0.12
i downloaded SDL 1.2.13, and put it in the System/Library/Frameworks folder. i then ran these commands:

cd /Applications/bzflag-2.0.12 (i keep the source folder in applications)
./autogen.sh (worked fine)
./configure (also worked fine)
make (ERROR!!!!1!!)

this is the error i got:

Code: Select all

ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [bzflag] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
whats wrong?
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Mac SVN/Compile instructions

Post by blast »

That's not the error. Look above the stuff you posted.

Is there a reason that the 2.0.10 binary package doesn't work for you? Version 2.0.12 was released just to fix issues building on Linux, so it won't give you any new features.
"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
Post Reply