Trying to build trunk on leopard

For all the help you need with Armagetron!
Post Reply
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Trying to build trunk on leopard

Post by voodoo »

Hi,

Here is the picture :
New comp (macbook pro).
New system (macos 10.5)
I've install developer tools, mac port and a few libs:
- bison @2.3_2 (active)
- freetype @2.3.5_1 (active)
- ftgl @2.0.8_0 (active)
- glib2 @2.14.5_0+darwin_9 (active)
- libpng @1.2.24_0 (active)
- m4 @1.4.10_1 (active)
- ruby @1.8.6-p110_0+darwin_9+thread_hooks (active)
- swig @1.3.33_0 (active)
among others ...
I've download the last trunk
I've adjusted the path to all frameworks and libs
When I'm trying to build the client, an amazing 2029 errors are reported (sic).

Any help ? What did I forget to setup ?

Here's the beginning of built log, just in case:
Building target “Armagetron Advanced” of project “Armagetron Advanced” with configuration “Release” — (2029 errors, 18 warnings)
mkdir "/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../../armagetronad-build/build/Armagetron Advanced.build/Release/Armagetron Advanced.build/DerivedSources"
cd /Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS
/bin/sh -c "/opt/local/bin/swig -c++ -ruby -autorename -I../src/engine -I../src/network -I../src/render -I../src/tools -I../src/tron -I../src/ui -I../src/macosx/client -I../src/macosx -o \"${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}_wrap.cxx\" \"${INPUT_FILE_PATH}\""
/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/swig/ext/network/nNetObject.i:29: Warning(312): Nested class not currently supported (ignored).
../src/ui/uMenu.h:427: Warning(312): Nested class not currently supported (ignored)
/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/swig/ext/std/sstream.i:10: Warning(401): Nothing known about base class 'ios'. Ignored.
/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/swig/ext/tools/tString.i:16: Warning(402): Base class 'std::string' is incomplete.

Edit: Here are the first errors. SDL frameworks are installed and included in the project.
/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/macosx/client/aa_config.h:1:27: error: config_common.h: No such file or directory
/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/render/rSDL.h:7:17: error: SDL.h: No such file or directory
User avatar
Z-Man
God & Project Admin
Posts: 11736
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Sorry, I neither have Leopard, nor have I even tried building the trunk on OSX. All I can say is that the million warnings from SWIG can be ignored.

Edit: how about the 0.2.8 branch? Does that build for you?
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Post by voodoo »

Yes I've built 0.2.8 successfully with some tweaking in the project properties.
Although, the script 1 run endlessly the first time I tried to build it, it was fine the second time ...

The main problem for the trunk seems that it did not built config_common.h ... Seems although there's a problem with ruby ...
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

I seem to remember last time I built the trunk (on linux) I had to use the flag --disable-ruby or something. Whatever version of ruby I installed I couldn't get it to work without that flag.
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Although ruby works (or at least compiles) for me I suggest you disable it if you don't want to do any ruby-related development. It prints tons of warnings, making it easy to miss “real” ones.
There's no place like ::1
User avatar
Z-Man
God & Project Admin
Posts: 11736
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Never miss any warnings with -Werror in CXXFLAGS :) Yep, it does not apply to the tons of warnings from SWIG and the code it generates.
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Post by voodoo »

So ...
I've restart from scratch as it was stuck on script 1 the first time I try to build it.
Still stuck there on the script 1 ... The script is quite simple:
#!/bin/bash -l
rake xcode:prepare

I don't know what it is suppose to do but python is eating all resources it can:
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
342 Python 99.7% 40:44.64 1 14 62 1896K 312K 3256K 20M

If I stop it, it will not be stuck again but will produce the same situation I faced before. With config_common.h, version.h and a few other file missing ...

I'll let the script running during lunchtime to see where it goes ...

Edit:
actually the log refer to the python script sortresources.py. Let's have a look into it.

Edit 2: well I stopped the build after 1h30 ... Same issues: no config_common.h, no version.h which seems to lead to these thousands error during compilation ... May be I should copy them from windows or unix build !
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Post by voodoo »

Ok, let's talk about this a bit more:
So as said before, I've installed macports and the required libs.

A important point here: the ftgl package is broken in mac port repo (better to say broken for leopard). So you have to cancel the build during compilation and change a piece of the FTVectoriser.cpp file. Look for a apple specific proto and remove the "..." there ... sic! Then restart the build and install it.

For the current trunk, there's also to adjust some file mappings (replace eAuthentification.* by eAuthentication.* plus a few frameworks) in the xcode project. Also, I retrive from internet shttpd source code and copy it into arma src/thirdparty directory in order to please xcode (or remap the 2 files to the proper dir).

I also have to include path to the ruby headers to please the compiler (into the "user path headers" option of project properties)

So far it's much better. But I still haven't built it. I faced a few more error during compilation. Here are the messages :

Code: Select all

    cd Advanced.build/Release/Armagetron Advanced.build/DerivedSources/armagetronad_wrap.cxx:13225: error: cannot allocate an object of abstract type 'eGameObject'
	/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eGameObject.h:45: note:   because the following virtual functions are pure within 'eGameObject':
	/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eGameObject.h:106: note:  virtual void eGameObject::AddRef()
	/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eGameObject.h:107: note:  virtual void eGameObject::Release()
	/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../../armagetronad-build/build/Armagetron Advanced.build/Release/Armagetron Advanced.build/DerivedSources/armagetronad_wrap.cxx:13296: error: cannot allocate an object of abstract type 'eGameObject'
	/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eGameObject.h:45: note:   since type 'eGameObject' has pure virtual functions

/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eCamera.cpp:58:
/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eSoundMixer.h:40:23: error: SDL_mixer.h: No such file or directory
../src/engine/sound/base/eChannel.h:65: error: ISO C++ forbids declaration of 'Mix_Chunk' with no type
../src/engine/sound/base/eChannel.h:65: error: expected ';' before '*' token
../src/engine/sound/base/eChannel.h:71: error: ISO C++ forbids declaration of 'Mix_Chunk' with no type
../src/engine/sound/base/eChannel.h:71: error: expected ';' before '*' token
../src/engine/sound/base/eChannel.h: In member function 'void eChannel::StopSound()':
../src/engine/sound/base/eChannel.h:95: error: 'Mix_HaltChannel' was not declared in this scope
../src/engine/sound/sdl_mixer/eChannelSDLMixer.h: At global scope:
../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:66: error: ISO C++ forbids declaration of 'Mix_Chunk' with no type
../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:66: error: expected ';' before '*' token
../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:72: error: ISO C++ forbids declaration of 'Mix_Chunk' with no type
../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:72: error: expected ';' before '*' token
../src/engine/sound/sdl_mixer/eChannelSDLMixer.h: In member function 'void eChannelSDLMixer::StopSound()':
../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:96: error: 'Mix_HaltChannel' was not declared in this scope
	In file included from /Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eCamera.cpp:58:
		/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eSoundMixer.h:40:23: error: SDL_mixer.h: No such file or directory
	../src/engine/sound/base/eChannel.h:65: error: ISO C++ forbids declaration of 'Mix_Chunk' with no type
	../src/engine/sound/base/eChannel.h:65: error: expected ';' before '*' token
	../src/engine/sound/base/eChannel.h:71: error: ISO C++ forbids declaration of 'Mix_Chunk' with no type
	../src/engine/sound/base/eChannel.h:71: error: expected ';' before '*' token
	../src/engine/sound/base/eChannel.h:95: error: 'Mix_HaltChannel' was not declared in this scope
	../src/engine/sound/sdl_mixer/eChannelSDLMixer.h: At global scope:
	../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:66: error: ISO C++ forbids declaration of 'Mix_Chunk' with no type
	../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:66: error: expected ';' before '*' token
	../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:72: error: ISO C++ forbids declaration of 'Mix_Chunk' with no type
	../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:72: error: expected ';' before '*' token
	../src/engine/sound/sdl_mixer/eChannelSDLMixer.h:96: error: 'Mix_HaltChannel' was not declared in this scope

I think I've disabled ruby so I'm a bit confused with the fact I've needed to include ruby's headers path and with the first part of the errors ...
User avatar
Z-Man
God & Project Admin
Posts: 11736
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

voodoo wrote:

Code: Select all

cd Advanced.build/Release/Armagetron Advanced.build/DerivedSources/armagetronad_wrap.cxx:13225: error: cannot allocate an object of abstract type 'eGameObject'
	/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eGameObject.h:45: note:   because the following virtual functions are pure within 'eGameObject':
Ah, that would be one of my last changes breaking the ruby wrappers. You can temporarily work around it by removing the =0 from the offending functions, I think, or by disabling ruby support (don't ask me, xcode is even more cryptic than automake to me).
voodoo wrote:

Code: Select all

/Users/erollet/Sources/Armagetron/fromsvn/trunk/armagetronad/MacOS/../src/engine/eSoundMixer.h:40:23: error: SDL_mixer.h: No such file or directory
That says you need the SDL_mixer library :) And the rest of the errors are followups on that.
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

I'll be looking into building trunk on OS X... probably at the end of the month becuase I am very busy with work and school at the moment. If you can wait a little it will be evened out. Sorry.
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Post by voodoo »

Hi dlh and thx.

I'll be looking forward my myself as well, this is my personal tutorial for 'how does xcode work'... ;)
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

Building trunk should now work on 10.5. You don't need anything installed from macports. You can download the required libraries/support files from the armagetronad sf download page.
User avatar
DDMJ
Reverse Outside Corner Grinder
Posts: 1882
Joined: Thu Jun 08, 2006 12:15 am
Location: LA, CA, USA, NA
Contact:

Post by DDMJ »

Where it says: "Active Build Configuration", the "Release" option failed to build, but "Debug" did. Is this supposed to happen?

Anyways, I'm going to try and build the stable version now, we'll see how that goes...

EDIT: Tried the 0.2.8 branch, both "Release" and "Debug" failed, now going to try the stable 0.2.8.2 branch.

EDIT2: 0.2.8.2 failed also. Nemo, I think it's best we speak on IRC about this than have an 8 page forum thread. I'll find you tomorrow.
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

*For very large values of tomorrow.

I think you're better off posting the problem you have here. :wink:
User avatar
DDMJ
Reverse Outside Corner Grinder
Posts: 1882
Joined: Thu Jun 08, 2006 12:15 am
Location: LA, CA, USA, NA
Contact:

Post by DDMJ »

Everything works perfectly now 8).
Post Reply