Jump to content

[OS X] Make error [on obj/lowlevel_Debug/snd_mgr.o]


Recommended Posts

Hi !

After compiling the game on Windows, I have to get it to work on my Mac now to play with my son !

So I am under Mac OS X 10.4, latest revision.

I installed all the dependencies through Mac Ports and needed to install also libxml2 which is not mentionned in the mac doc (required-libraries-mac.txt) ... althought it is in the general build section in the wiki.

The only difference with the dependencies required is devIl that I installed in 1.7.8, don't know if this hurts.

I also installed gcc 4.3 because OS X 10.4 is shipped with 4.01 and I got many errors on compilation (switching to 4.3 solved many of the previous errors).

I can build fcollada without errors and go to game build, but now I get this error :


==== Building AtlasObject ====
AtlasObjectImpl.cpp
DOMEvent.cpp
snd_mgr.cpp
In file included from ../../../source/lib/external_libraries/openal.h:27,
from ../../../source/lib/res/sound/snd_mgr.cpp:46:
/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:182: error: '<anonymous>' has incomplete type
/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:182: error: invalid use of 'ALCvoid'
AtlasObjectText.cpp
make[1]: *** [obj/lowlevel_Debug/snd_mgr.o] Error 1
make: *** [lowlevel] Error 2
make: *** Waiting for unfinished jobs....

I'll post the complete output at the end of this topic (there are many warnings before this, but no errors).

I found this similar topic on the forum (http://www.wildfiregames.com/forum/index.php?showtopic=12448&pid=199848&st=0entry199848), but as I am not a really good developper and there was so many other errors solved in this topic, I did not understand what was made and what would solve my problem.

Could someone give me a hint on this problem solution ?

TIA

Arnaud

--

The complete output, since ./updateworkspace.sh :


ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces arnaud$ ./update-workspaces.sh
==== Building Premake ====
sharpdev.c
vs2005.c
io.c
sharpdev_cs.c
script.c
platform_posix.c
arg.c
vs6_cpp.c
util.c
vs6.c
gnu_helpers.c
os.c
vs2005_cs.c
gnu.c
gnu_cpp.c
gnu_cs.c
platform_windows.c
project.c
vs2002_cs.c
clean.c
premake.c
vs.c
path.c
vs2002.c
lauxlib.c
ldebug.c
ltablib.c
liolib.c
lstrlib.c
ldo.c
ltests.c
ldump.c
lundump.c
ldblib.c
lmem.c
lmathlib.c
lstate.c
ltm.c
lvm.c
ltable.c
llex.c
lgc.c
loadlib.c
lfunc.c
lparser.c
lopcodes.c
lbaselib.c
lzio.c
lobject.c
lstring.c
lapi.c
lcode.c
Linking Premake
Generating GNU makefiles:
...pyrogenesis
...network
...engine
...graphics
...i18n
...atlas
...gui
...lowlevel
...AtlasObject
...AtlasScript
...wxJS
...AtlasUI
...ActorEditor
...ColourTester
...Collada
...test_gen
...test
ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces arnaud$ cd gcc/
ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces/gcc arnaud$ make -j3
==== Building network ====
==== Building graphics ====
==== Building engine ====
precompiled.cpp
precompiled.cpp
precompiled.cpp
fsm.cpp
Camera.cpp
NetClient.cpp
CConsole.cpp
CinemaTrack.cpp
../../../source/network/NetClient.cpp: In static member function 'static bool CNetClient::OnError(void*, CFsmEvent*)':
../../../source/network/NetClient.cpp:253: warning: comparison between signed and unsigned integer expressions
../../../source/network/NetClient.cpp: In static member function 'static bool CNetClient::OnAuthenticate(void*, CFsmEvent*)':
../../../source/network/NetClient.cpp:367: warning: comparison between signed and unsigned integer expressions
ColladaManager.cpp
Color.cpp
DefaultEmitter.cpp
Frustum.cpp
NetLog.cpp
CLogger.cpp
../../../source/ps/CLogger.cpp:171: warning: unused parameter 'category'
../../../source/ps/CLogger.cpp:188: warning: unused parameter 'category'
GameView.cpp
ConfigDB.cpp
NetMessage.cpp
CStr.cpp
HFTracer.cpp
DllLoader.cpp
LightEnv.cpp
MapReader.cpp
Errors.cpp
NetServer.cpp
FileIo.cpp
../../../source/network/NetServer.cpp: In static member function 'static bool CNetServer::OnError(void*, CFsmEvent*)':
../../../source/network/NetServer.cpp:395: warning: comparison between signed and unsigned integer expressions
Filesystem.cpp
Font.cpp
Game.cpp
NetSession.cpp
MapWriter.cpp
GameAttributes.cpp
Network.cpp
ServerSocket.cpp
Material.cpp
SocketBase.cpp
GameRecord.cpp
MaterialManager.cpp
Globals.cpp
Hotkey.cpp
MeshManager.cpp
StreamSocket.cpp
MiniPatch.cpp
i18n.cpp
Linking network
Model.cpp
Interact.cpp
KeyName.cpp
Loader.cpp
ModelDef.cpp
Overlay.cpp
ObjectBase.cpp
Parser.cpp
../../../source/ps/Parser.cpp: In member function 'bool CParserLine::ParseString(const CParser&, const std::string&)':
../../../source/ps/Parser.cpp:557: warning: comparison between signed and unsigned integer expressions
../../../source/ps/Parser.cpp:605: warning: comparison between signed and unsigned integer expressions
../../../source/ps/Parser.cpp:657: warning: comparison between signed and unsigned integer expressions
../../../source/ps/Parser.cpp:793: warning: comparison between signed and unsigned integer expressions
==== Building i18n ====
precompiled.cpp
Player.cpp
ObjectEntry.cpp
ObjectManager.cpp
Profile.cpp
ParticleEmitter.cpp
ProfileViewer.cpp
ParticleEngine.cpp
BufferVariable.cpp
Pyrogenesis.cpp
Patch.cpp
CLocale.cpp
SkeletonAnimDef.cpp
StringConvert.cpp
SkeletonAnimManager.cpp
Util.cpp
../../../source/ps/Util.cpp: In function 'void WriteSystemInfo()':
../../../source/ps/Util.cpp:96: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
../../../source/ps/Util.cpp:96: warning: format '%d' expects type 'int', but argument 6 has type 'size_t'
../../../source/ps/Util.cpp:96: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
../../../source/ps/Util.cpp:109: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'size_t'
../../../source/ps/Util.cpp:109: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'
Sprite.cpp
World.cpp
Interface.cpp
Terrain.cpp
ScriptInterface.cpp
../../../source/graphics/Terrain.cpp: In member function 'void CTerrain::Resize(ssize_t)':
../../../source/graphics/Terrain.cpp:368: warning: comparison between signed and unsigned integer expressions
JSCollection.cpp
TerrainProperties.cpp
JSInterface_Console.cpp
StringBuffer.cpp
JSInterface_Selection.cpp
TranslatedString.cpp
TSComponent.cpp
TextureEntry.cpp
JSInterface_VFS.cpp
Linking i18n
TextureManager.cpp
Atlas.cpp
==== Building atlas ====
precompiled.cpp
CmdLineArgs.cpp
Unit.cpp
Config.cpp
GameSetup.cpp
UnitAnimation.cpp
UnitManager.cpp
JSInterface_Camera.cpp
Xeromyces.cpp
ActorViewer.cpp
JSInterface_LightEnv.cpp
AlphaMapCalculator.cpp
XeroXMB.cpp
FixedFunctionModelRenderer.cpp
Brushes.cpp
XMLWriter.cpp
CommandProc.cpp
HWLightingModelRenderer.cpp
AStarEngine.cpp
GameLoop.cpp
InstancingModelRenderer.cpp
InputProcessor.cpp
ModelRenderer.cpp
MessagePasserImpl.cpp
Aura.cpp
../../../source/tools/atlas/GameInterface/MessagePasserImpl.cpp: In constructor 'MessagePasserImpl::MessagePasserImpl()':
../../../source/tools/atlas/GameInterface/MessagePasserImpl.cpp:37: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
PatchRData.cpp
Misc.cpp
Register.cpp
SimState.cpp
BoundingObjects.cpp
PlayerRenderer.cpp
Collision.cpp
Renderer.cpp
../../../source/renderer/Renderer.cpp: In member function 'virtual CStr8 CRendererStatsTable::GetCellText(size_t, size_t)':
../../../source/renderer/Renderer.cpp:152: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
../../../source/renderer/Renderer.cpp:158: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
../../../source/renderer/Renderer.cpp:164: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
../../../source/renderer/Renderer.cpp:170: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
../../../source/renderer/Renderer.cpp:176: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
View.cpp
Entity.cpp
BrushHandlers.cpp
RenderModifiers.cpp
CameraCtrlHandlers.cpp
RenderPathVertexShader.cpp
CinemaHandler.cpp
Scene.cpp
ShadowMap.cpp
CommandHandlers.cpp
EntityFormation.cpp
SkyManager.cpp
ElevationHandlers.cpp
TerrainOverlay.cpp
EnvironmentHandlers.cpp
EntityHandles.cpp
TerrainRenderer.cpp
GraphicsSetupHandlers.cpp
EntityManager.cpp
TransparencyRenderer.cpp
../../../source/simulation/EntityManager.cpp: In member function 'HEntity CEntityManager::Create(CEntityTemplate*, CVector3D, float, const std::set<CStr8, std::less<CStr8>, std::allocator<CStr8> >&, const CStrW*)':
../../../source/simulation/EntityManager.cpp:225: warning: comparison between signed and unsigned integer expressions
MapHandlers.cpp
VertexArray.cpp
EntityRendering.cpp
MessageHandler.cpp
VertexBuffer.cpp
MiscHandlers.cpp
VertexBufferManager.cpp
ObjectHandlers.cpp
WaterManager.cpp
EntityScriptInterface.cpp
../../../source/renderer/WaterManager.cpp: In member function 'int WaterManager::LoadWaterTextures()':
../../../source/renderer/WaterManager.cpp:114: warning: format '%02d' expects type 'int', but argument 5 has type 'long unsigned int'
../../../source/renderer/WaterManager.cpp:131: warning: format '%02d' expects type 'int', but argument 5 has type 'long unsigned int'
Linking graphics
TerrainHandlers.cpp
EntityStateProcessing.cpp
TriggerHandler.cpp
==== Building gui ====
precompiled.cpp
EntitySupport.cpp
EntityTemplate.cpp
Linking atlas
CButton.cpp
==== Building lowlevel ====
precompiled.cpp
EntityTemplateCollection.cpp
CCheckBox.cpp
EventHandlers.cpp
CDropDown.cpp
Formation.cpp
CGUI.cpp
FormationCollection.cpp
app_hooks.cpp
FormationManager.cpp
base32.cpp
bits.cpp
byte_order.cpp
debug.cpp
LOSManager.cpp
debug_stl.cpp
fat_time.cpp
PathfindEngine.cpp
CGUIList.cpp
fnv_hash.cpp
frequency_filter.cpp
CGUIScrollBarVertical.cpp
input.cpp
lib.cpp
PathfindSparse.cpp
CGUISprite.cpp
lib_errors.cpp
lockfree.cpp
CImage.cpp
module_init.cpp
ogl.cpp
ProductionQueue.cpp
CInput.cpp
path_util.cpp
rand.cpp
regex.cpp
Projectile.cpp
secure_crt.cpp
self_test.cpp
CList.cpp
svn_revision.cpp
timer.cpp
wsecure_crt.cpp
Scheduler.cpp
CProgressBar.cpp
aligned_allocator.cpp
allocators.cpp
bucket.cpp
CRadioButton.cpp
dynarray.cpp
headerless.cpp
ScriptObject.cpp
CText.cpp
mem_util.cpp
pool.cpp
Simulation.cpp
shared_ptr.cpp
CTooltip.cpp
string_pool.cpp
dbghelp.cpp
file.cpp
GUIbase.cpp
file_system.cpp
file_system_posix.cpp
Stance.cpp
GUIRenderer.cpp
file_system_util.cpp
Technology.cpp
GUItext.cpp
path.cpp
archive.cpp
archive_builder.cpp
archive_zip.cpp
GUITooltip.cpp
codec.cpp
GUIutil.cpp
codec_zlib.cpp
TechnologyCollection.cpp
stream.cpp
file_loader.cpp
file_stats.cpp
TerritoryManager.cpp
real_directory.cpp
IGUIButtonBehavior.cpp
trace.cpp
IGUIObject.cpp
block_cache.cpp
io.cpp
TRAStarEngine.cpp
TriggerManager.cpp
io_align.cpp
write_buffer.cpp
IGUIScrollBar.cpp
file_cache.cpp
IGUIScrollBarOwner.cpp
vfs.cpp
IGUITextOwner.cpp
vfs_lookup.cpp
TurnManager.cpp
vfs_path.cpp
MiniMap.cpp
vfs_populate.cpp
SimulationScriptInit.cpp
vfs_tree.cpp
posix.cpp
h_mgr.cpp
JSInterface_GUITypes.cpp
CMusicPlayer.cpp
JSInterface_IGUIObject.cpp
CPlayList.cpp
cursor.cpp
ogl_shader.cpp
JSI_Sound.cpp
../../../source/lib/res/graphics/ogl_shader.cpp: In function 'const char* shader_type_to_string(GLenum, char*, size_t)':
../../../source/lib/res/graphics/ogl_shader.cpp:60: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'GLenum'
ogl_tex.cpp
../../../source/lib/res/graphics/ogl_tex.cpp: In function 'LibError OglTex_to_string(const OglTex*, char*)':
../../../source/lib/res/graphics/ogl_tex.cpp:482: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
SoundGroup.cpp
Linking gui
unifont.cpp
SoundGroupMgr.cpp
ogghack.cpp
==== Building AtlasObject ====
AtlasObjectImpl.cpp
DOMEvent.cpp
snd_mgr.cpp
In file included from ../../../source/lib/external_libraries/openal.h:27,
from ../../../source/lib/res/sound/snd_mgr.cpp:46:
/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:182: error: '<anonymous>' has incomplete type
/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:182: error: invalid use of 'ALCvoid'
AtlasObjectText.cpp
make[1]: *** [obj/lowlevel_Debug/snd_mgr.o] Error 1
make: *** [lowlevel] Error 2
make: *** Waiting for unfinished jobs....
JSConversions.cpp
AtlasObjectXML.cpp
JSUtil.cpp
Linking AtlasObject
ScriptableComplex.cpp
ScriptableObject.cpp
ScriptCustomTypes.cpp
ScriptGlue.cpp
ScriptingHost.cpp
SynchedJSObject.cpp
../../../source/scripting/ScriptGlue.cpp: In function 'void InitJsTimers()':
../../../source/scripting/ScriptGlue.cpp:648: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
Bound.cpp
Brush.cpp
Matrix3D.cpp
Noise.cpp
NUSpline.cpp
Plane.cpp
Quaternion.cpp
Vector3D.cpp
JSInterface_Vector3D.cpp
Linking engine

Link to comment
Share on other sites

Hmm, weird error...

What errors did you get from the default compiler? It could be that GCC 4.3 is causing the OpenAL compile error (it wouldn't surprise me if that header depends on some apple-specific gcc extension, for example) - and in either case I think the default gcc from apple should be supported.

Link to comment
Share on other sites

wow, I'm lost between the two topics (I answered you in the other one). Anyway, so now I stay in this topic ...

So I'll try this evening compiling with gcc 4.0.1 provided by Apple (from XCode 2.5). Don't know if there is a newer one available from Apple and that is not for Leopard.

Which version of gcc do you have olsner ? I should maybe rather try with your's, don't you think ?

Link to comment
Share on other sites

Here is the latest svn revision compiled with gcc 4.0.1 (default Apple gcc for Tiger, I did not found gcc 4.1 for less than Leopard unfortunately) : I get the following error :


XMLFix.cpp
../../../source/collada/XMLFix.cpp: In function 'void FixBrokenXML(const char*, const char**, size_t*)':
../../../source/collada/XMLFix.cpp:178: error: invalid conversion from 'int*' to 'intptr_t*'
../../../source/collada/XMLFix.cpp:178: error: initializing argument 3 of 'void xmlDocDumpFormatMemory(xmlDoc*, xmlChar**, intptr_t*, int)'
make[1]: *** [obj/Collada_Debug/XMLFix.o] Error 1
make: *** [Collada] Error 2
make: *** Waiting for unfinished jobs....

and many, many, many warnings like :


JSUtil.cpp
../../../source/tools/atlas/wxJS/ext/jsmembuf.cpp:73: warning: unused parameter 'obj'
../../../source/tools/atlas/wxJS/ext/jsmembuf.cpp:101: warning: unused parameter 'obj'
../../../source/tools/atlas/wxJS/ext/jsmembuf.cpp:166: warning: unused parameter 'obj'
../../../source/tools/atlas/wxJS/ext/jsmembuf.cpp:166: warning: unused parameter 'constructing'
../../../source/tools/atlas/wxJS/ext/jsmembuf.cpp:226: warning: unused parameter 'rval'

or


menuitem.cpp
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:287: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:342: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:342: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:376: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:376: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:413: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:413: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:452: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:473: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:473: warning: unused parameter 'argv'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:473: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:492: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:492: warning: unused parameter 'argv'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:492: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:516: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:545: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:573: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:606: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:606: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:644: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:644: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:676: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:704: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:737: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:782: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:782: warning: unused parameter 'rval'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:816: warning: unused parameter 'argc'
../../../source/tools/atlas/wxJS/gui/control/menu.cpp:816: warning: unused parameter 'rval'

Note that fcollada seemed to compile OK, except many warnings like above.

Any idea ?

Link to comment
Share on other sites

Could you tell me more ? I thought I already have the latest OpenAL version cause it came with macport when I installed the dependencies.

Looking at it closer, I have OpenAL :

- in Apple's /Developper/Library/... folder,

- in 0ad's library folder,

- in macport's /opt/local/... folder

Question is : which one is taken in account for compilation ? Should I delete one ?

Link to comment
Share on other sites

Well, I tryed compiling with gcc4.2 and same error occurs :


snd_mgr.cpp
SoundGroup.cpp
In file included from ../../../source/lib/external_libraries/openal.h:27,
from ../../../source/lib/res/sound/snd_mgr.cpp:46:
/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:182: error: '<anonymous>' has incomplete type
/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:182: error: invalid use of 'ALCvoid'
Linking AtlasObject
acpi.cpp
make[1]: *** [obj/lowlevel_Debug/snd_mgr.o] Error 1
make[1]: *** Waiting for unfinished jobs....
==== Building AtlasScript ====
ScriptInterface.cpp
make: *** [lowlevel] Error 2
make: *** Waiting for unfinished jobs....

What should be modified in openal.h to get it work ?

Edited by arn34
Link to comment
Share on other sites

I've been exchanging PMs with arn34.

The problem appears to be in OpenAL's header:

- the offending function declaration is similar to others except for the use of ALCvoid;

- C allows parameters typedefed to void, C++ does not;

- GCC >=4.2 are now strict about the error.

Using GCC 4.1 appears to be a no-go since it (surprisingly) doesn't honor #pragma pack. The GCC documentation indicates it to be supported, but not when it was added. We need such a feature for various byte-oriented stuff like Zip archive headers, and supporting GCC's insane syntax and the widespread #pragma pack is definitely not desirable.

Until the OpenAL header is fixed (which could be quite a while on OSX), I'd recommend manually replacing all instances of ALCvoid with void except for the very first occurence (a typedef).

Link to comment
Share on other sites

We need such a feature for various byte-oriented stuff like Zip archive headers, and supporting GCC's insane syntax and the widespread #pragma pack is definitely not desirable.

That's why depending on struct layout is a bad idea :)

Looking at it closer, I have OpenAL :

- in Apple's /Developper/Library/... folder,

- in 0ad's library folder,

- in macport's /opt/local/... folder

Given the error messages, you definitely seem to be getting the Apple installation of OpenAL. If the headers in /opt/local don't have the same problem, maybe you can change the compilation settings for OpenAL to use the macports openal instead of the "framework".

To try that out change extern_libs.lua and just remove the line where we include the OpenAL framework (I think the line will look like osx_frameworks = {"OpenAL"}). If the macports-installed headers are in /opt/local/include/AL/alc.h rather than OpenAL/alc.h you will also have to change the openal.h file in our sources to include AL/* instead of OpenAL/*.

If that fixes it, we may want to explicitly use the macports openal instead of apple's preinstalled one.

Link to comment
Share on other sites

Well, I think that Macports OpenAL will have the same problem as this issue is related to a custom type (ALCvoid) defined by OpenAL. Not sure they are going to go back to "classic" void. I am at work so I can't say it for sure, but I'll have a look at macport's OpenAL this evening and give you the definitive answer.

Edited by arn34
Link to comment
Share on other sites

Hello there.

:)

Without hijacking this thread. I would like to ask for some assistance. I recently cut all my ties to the Microsoft and PC world. I am currently trying to operate 0A.D. on my Macpro (nehalem 8 core) I am new to the world of mac and getting the game to build is quite overwhelming.

In the spirit of contributing to 0AD, if there were a kind soul who has already gotten 0AD to build and run on their mac, It would be greatly appreciated if you could spend some time with me on MSN or Phone and possibly get me up and running.

Please drop me a PM in the forums if you can help.

Sincerely,

Link to comment
Share on other sites

Hi Matt,

I just got it to work on my MBP (under Tiger) and terato (under Leopard) also.

These two topics will help you :

- terato's buil : http://www.wildfiregames.com/forum/index.p...98entry200298

- my build : http://www.wildfiregames.com/forum/index.p...75entry200375

Terato made a lot of patchs that were integrated in revisions 7000 and above, so you don't need to do all what he wrote in his topic.

Basically, you now need :

1) install Macports : http://www.macports.org/install.php

2) install Apple's XCode for your system : see your Mac OsX install DVD

3) sudo port install gcc 4.3 if this is not the one provided by Apple (on my MBP under Tiger, I can only get gcc 4.0.1 which will fail on compiling 0ad) - I believe you don't need this step under Leopard as it is already provided with 4.3 (if this is 4.1, install 4.3, gcc 4.1 will fail also)

4) sudo port install the following packages :

- boost

- libsdl

- spidermonkey

- xercesc

- wxWidgets

- ffmpeg

- libxml2

5) As mentionned in the help file : "You also need to install DevIL manually. It depends on some libraries downloaded through MacPorts above, so get those first. Next, obtain DevIL 1.6.8 RC2 from http://openil.sourceforge.net/download.php. Then extract the archive, and run ./configure, make, and sudo make install." - I downloaded 1.7.8 which is the latest version and it seems to work as well.

[edit] 5') You also need the enet library for networking : http://enet.bespin.org/ [/edit]

6) Then, you're almost ready to compile 0ad : first delete libraries/fcollada/src/FCollada/LibXML and libraries/fcollada/include/LibXML as they override system libraries and are making compile errors that system library don't.

[edit] 6') Secondly, you need to patch Apple's OpenAL (/System/Library/Frameworks/OpenAL.Framework/alc.h : replace all ALCvoid by void (except first one which is a typedef) [/edit]

7) then recompile FCollada

8) then compile the game (I still get a last error, but it seems harmless)

You should be done !

PM if something fails.

Edited by arn34
Link to comment
Share on other sites

Do you mean the instructions I posted this evening ? Or the one previously written ?

The error with OpenAL comes from gcc 4.3 indeed (as Jan said : "C allows parameters typedefed to void, C++ does not; GCC >=4.2 are now strict about the error"). So the two solutions are : use gcc < 4.2 or modify alc.h, but for another reason I don't remember exactly, gcc 4.1 failed in compiling 0ad (something in gcc that should have been implemented but that was not actually). And gcc 4.0.1 gave me tons of other warnings and errors if I remember well, so switching to 4.3 is a good thing I believe. And with MacPorts it's just so easy ...

I'll try to compile on Leopard with the default gcc (4.0.1) and modify the wiki if I succeed (I should cause you did it), letting other users know there are two ways to do it.

edit : XCode >= 3.1 is needed for Leopard in order to build wxWidget dependencies (tiff actually). See output here under :


---> Fetching tiff
---> Attempting to fetch tiff-3.8.2.tar.gz from ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/ports/distfiles/
---> Verifying checksum(s) for tiff
---> Extracting tiff
On Mac OS X 10.5, tiff 3.8.2 requires Xcode 3.1 or later but you have Xcode 3.0.
Error: Target org.macports.extract returned: incompatible Xcode version
Error: The following dependencies failed to build: tiff
Error: Status 1 encountered during processing.

Edited by arn34
Link to comment
Share on other sites

Arn, what were some of the errors you got under gcc 4.0.1? I was able to build Collada according to the instructions on the wiki and then to go into build/workspaces and make pyrogenesis. There were some errors compiling AtlasUI (if I just type make), were those the ones you saw?

Link to comment
Share on other sites

He mentioned errors related to #pragma pack - GCC was saying that they would be ignored, and our code had some compile-time safety checks that indicated that they were indeed not being honored.

Strange, since #pragma pack is mentioned in the GCC docs and I can't imagine that it was added as late as 4.2.

Could it be that Apple has some "enable language extensions" switches that are flipped on dev systems but not normally?

Link to comment
Share on other sites

Right, I managed to compile 0ad under Leopard this morning, with gcc 4.0.1, althought I got at last two errors like the one I encountered before about AtlasUI_Debug (I was in a hurry this morning, so I did not take time to copy the errors, but basically they were the same as this one) :


make[1]: *** [obj/AtlasUI_Debug/ColourTesterImageCtrl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [AtlasUI] Error 2

Indeed, there were tons of warnings but no more error. So don't know if the previously mentionned errors were just related to Tiger, as I was compiling on my MBP under Tiger before.

Unfortunately, I can not launch the game under Leopard, but not sure this is not due to my configuration (it is a "simple" mac Mini, with poor CPU and even worst GPU :D ). As I said, I was in a hurry, so I did not copy the crash log. I am now at work, I'll see it this evening.

I'll update the wiki to mention that, for those who don't manage to compile with gcc 4.0.1, there is also the solution with gcc 4.3

edit : wiki updated (and I learned by the same time a new function gcc_select, nice :) !)

Edited by arn34
Link to comment
Share on other sites

I'm curious whether Atlas works on Mac when compiled with gcc 4.3. It used to have problems caused by wxwidgets. If you run pyrogenesis_dbg -editor, does it start up and can you interact with it?

My guess is that the problem on the mac mini would be the lack of a GPU, but you can also try the gcc 4.3 version there to see if it works.

Link to comment
Share on other sites

As far as I'm aware, it has never worked correctly under OS X.

If it freezes, can you find where it's freezing? (probably by running in gdb, using ctrl+c to interrupt it when it's frozen, then using bt, and being careful to look in the right thread since it has one for UI and one for the game engine (and the engine has some others for random bits and pieces))

Link to comment
Share on other sites

Hmm, maybe the game thread is still running but the UI thread is frozen? (Judging by the screenshot, it seems to have stopped somewhere in the middle of loading the UI.)

(I don't have the game installed on OS X myself, and I'd prefer not to go to all the effort of doing so, and I know nothing about OS X development, so I'd be very happy if someone else had time and patience and a debugger and sorted out the problems in my code :))

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...