arn34 Posted July 24, 2009 Report Share Posted July 24, 2009 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.cppDOMEvent.cppsnd_mgr.cppIn 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.cppmake[1]: *** [obj/lowlevel_Debug/snd_mgr.o] Error 1make: *** [lowlevel] Error 2make: *** 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 ?TIAArnaud--The complete output, since ./updateworkspace.sh :ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces arnaud$ ./update-workspaces.sh==== Building Premake ====sharpdev.cvs2005.cio.csharpdev_cs.cscript.cplatform_posix.carg.cvs6_cpp.cutil.cvs6.cgnu_helpers.cos.cvs2005_cs.cgnu.cgnu_cpp.cgnu_cs.cplatform_windows.cproject.cvs2002_cs.cclean.cpremake.cvs.cpath.cvs2002.clauxlib.cldebug.cltablib.cliolib.clstrlib.cldo.cltests.cldump.clundump.cldblib.clmem.clmathlib.clstate.cltm.clvm.cltable.cllex.clgc.cloadlib.clfunc.clparser.clopcodes.clbaselib.clzio.clobject.clstring.clapi.clcode.cLinking PremakeGenerating GNU makefiles:...pyrogenesis...network...engine...graphics...i18n...atlas...gui...lowlevel...AtlasObject...AtlasScript...wxJS...AtlasUI...ActorEditor...ColourTester...Collada...test_gen...testordinateur-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.cppprecompiled.cppprecompiled.cppfsm.cppCamera.cppNetClient.cppCConsole.cppCinemaTrack.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 expressionsColladaManager.cppColor.cppDefaultEmitter.cppFrustum.cppNetLog.cppCLogger.cpp../../../source/ps/CLogger.cpp:171: warning: unused parameter 'category'../../../source/ps/CLogger.cpp:188: warning: unused parameter 'category'GameView.cppConfigDB.cppNetMessage.cppCStr.cppHFTracer.cppDllLoader.cppLightEnv.cppMapReader.cppErrors.cppNetServer.cppFileIo.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 expressionsFilesystem.cppFont.cppGame.cppNetSession.cppMapWriter.cppGameAttributes.cppNetwork.cppServerSocket.cppMaterial.cppSocketBase.cppGameRecord.cppMaterialManager.cppGlobals.cppHotkey.cppMeshManager.cppStreamSocket.cppMiniPatch.cppi18n.cppLinking networkModel.cppInteract.cppKeyName.cppLoader.cppModelDef.cppOverlay.cppObjectBase.cppParser.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.cppPlayer.cppObjectEntry.cppObjectManager.cppProfile.cppParticleEmitter.cppProfileViewer.cppParticleEngine.cppBufferVariable.cppPyrogenesis.cppPatch.cppCLocale.cppSkeletonAnimDef.cppStringConvert.cppSkeletonAnimManager.cppUtil.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.cppWorld.cppInterface.cppTerrain.cppScriptInterface.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 expressionsJSCollection.cppTerrainProperties.cppJSInterface_Console.cppStringBuffer.cppJSInterface_Selection.cppTranslatedString.cppTSComponent.cppTextureEntry.cppJSInterface_VFS.cppLinking i18nTextureManager.cppAtlas.cpp==== Building atlas ====precompiled.cppCmdLineArgs.cppUnit.cppConfig.cppGameSetup.cppUnitAnimation.cppUnitManager.cppJSInterface_Camera.cppXeromyces.cppActorViewer.cppJSInterface_LightEnv.cppAlphaMapCalculator.cppXeroXMB.cppFixedFunctionModelRenderer.cppBrushes.cppXMLWriter.cppCommandProc.cppHWLightingModelRenderer.cppAStarEngine.cppGameLoop.cppInstancingModelRenderer.cppInputProcessor.cppModelRenderer.cppMessagePasserImpl.cppAura.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.cppMisc.cppRegister.cppSimState.cppBoundingObjects.cppPlayerRenderer.cppCollision.cppRenderer.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.cppEntity.cppBrushHandlers.cppRenderModifiers.cppCameraCtrlHandlers.cppRenderPathVertexShader.cppCinemaHandler.cppScene.cppShadowMap.cppCommandHandlers.cppEntityFormation.cppSkyManager.cppElevationHandlers.cppTerrainOverlay.cppEnvironmentHandlers.cppEntityHandles.cppTerrainRenderer.cppGraphicsSetupHandlers.cppEntityManager.cppTransparencyRenderer.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 expressionsMapHandlers.cppVertexArray.cppEntityRendering.cppMessageHandler.cppVertexBuffer.cppMiscHandlers.cppVertexBufferManager.cppObjectHandlers.cppWaterManager.cppEntityScriptInterface.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 graphicsTerrainHandlers.cppEntityStateProcessing.cppTriggerHandler.cpp==== Building gui ====precompiled.cppEntitySupport.cppEntityTemplate.cppLinking atlasCButton.cpp==== Building lowlevel ====precompiled.cppEntityTemplateCollection.cppCCheckBox.cppEventHandlers.cppCDropDown.cppFormation.cppCGUI.cppFormationCollection.cppapp_hooks.cppFormationManager.cppbase32.cppbits.cppbyte_order.cppdebug.cppLOSManager.cppdebug_stl.cppfat_time.cppPathfindEngine.cppCGUIList.cppfnv_hash.cppfrequency_filter.cppCGUIScrollBarVertical.cppinput.cpplib.cppPathfindSparse.cppCGUISprite.cpplib_errors.cpplockfree.cppCImage.cppmodule_init.cppogl.cppProductionQueue.cppCInput.cpppath_util.cpprand.cppregex.cppProjectile.cppsecure_crt.cppself_test.cppCList.cppsvn_revision.cpptimer.cppwsecure_crt.cppScheduler.cppCProgressBar.cppaligned_allocator.cppallocators.cppbucket.cppCRadioButton.cppdynarray.cppheaderless.cppScriptObject.cppCText.cppmem_util.cpppool.cppSimulation.cppshared_ptr.cppCTooltip.cppstring_pool.cppdbghelp.cppfile.cppGUIbase.cppfile_system.cppfile_system_posix.cppStance.cppGUIRenderer.cppfile_system_util.cppTechnology.cppGUItext.cpppath.cpparchive.cpparchive_builder.cpparchive_zip.cppGUITooltip.cppcodec.cppGUIutil.cppcodec_zlib.cppTechnologyCollection.cppstream.cppfile_loader.cppfile_stats.cppTerritoryManager.cppreal_directory.cppIGUIButtonBehavior.cpptrace.cppIGUIObject.cppblock_cache.cppio.cppTRAStarEngine.cppTriggerManager.cppio_align.cppwrite_buffer.cppIGUIScrollBar.cppfile_cache.cppIGUIScrollBarOwner.cppvfs.cppIGUITextOwner.cppvfs_lookup.cppTurnManager.cppvfs_path.cppMiniMap.cppvfs_populate.cppSimulationScriptInit.cppvfs_tree.cppposix.cpph_mgr.cppJSInterface_GUITypes.cppCMusicPlayer.cppJSInterface_IGUIObject.cppCPlayList.cppcursor.cppogl_shader.cppJSI_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.cppLinking guiunifont.cppSoundGroupMgr.cppogghack.cpp==== Building AtlasObject ====AtlasObjectImpl.cppDOMEvent.cppsnd_mgr.cppIn 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.cppmake[1]: *** [obj/lowlevel_Debug/snd_mgr.o] Error 1make: *** [lowlevel] Error 2make: *** Waiting for unfinished jobs....JSConversions.cppAtlasObjectXML.cppJSUtil.cppLinking AtlasObjectScriptableComplex.cppScriptableObject.cppScriptCustomTypes.cppScriptGlue.cppScriptingHost.cppSynchedJSObject.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.cppBrush.cppMatrix3D.cppNoise.cppNUSpline.cppPlane.cppQuaternion.cppVector3D.cppJSInterface_Vector3D.cppLinking engine Quote Link to comment Share on other sites More sharing options...
olsner Posted July 24, 2009 Report Share Posted July 24, 2009 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. Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 24, 2009 Author Report Share Posted July 24, 2009 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 ? Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 24, 2009 Author Report Share Posted July 24, 2009 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 1make: *** [Collada] Error 2make: *** 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 ? Quote Link to comment Share on other sites More sharing options...
espes Posted July 25, 2009 Report Share Posted July 25, 2009 It's a bug in Apple's OpenAL.You could try upgrading OpenAL. I worked around it by including a modified header. Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 25, 2009 Author Report Share Posted July 25, 2009 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/... folderQuestion is : which one is taken in account for compilation ? Should I delete one ? Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 25, 2009 Author Report Share Posted July 25, 2009 (edited) Well, I tryed compiling with gcc4.2 and same error occurs :snd_mgr.cppSoundGroup.cppIn 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 AtlasObjectacpi.cppmake[1]: *** [obj/lowlevel_Debug/snd_mgr.o] Error 1make[1]: *** Waiting for unfinished jobs....==== Building AtlasScript ====ScriptInterface.cppmake: *** [lowlevel] Error 2make: *** Waiting for unfinished jobs....What should be modified in openal.h to get it work ? Edited July 25, 2009 by arn34 Quote Link to comment Share on other sites More sharing options...
janwas Posted July 25, 2009 Report Share Posted July 25, 2009 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). Quote Link to comment Share on other sites More sharing options...
olsner Posted July 25, 2009 Report Share Posted July 25, 2009 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/... folderGiven 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. Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 25, 2009 Author Report Share Posted July 25, 2009 (edited) 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 July 25, 2009 by arn34 Quote Link to comment Share on other sites More sharing options...
MattSherman Posted July 25, 2009 Report Share Posted July 25, 2009 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, Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 26, 2009 Author Report Share Posted July 26, 2009 (edited) 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...75entry200375Terato 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.php2) install Apple's XCode for your system : see your Mac OsX install DVD3) 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- libxml25) 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 FCollada8) then compile the game (I still get a last error, but it seems harmless)You should be done !PM if something fails. Edited July 26, 2009 by arn34 Quote Link to comment Share on other sites More sharing options...
janwas Posted July 26, 2009 Report Share Posted July 26, 2009 That's why depending on struct layout is a bad ideaWell yeah, but I think pointer arithmetic/casts are even worse Basically, you now need :Thanks for the writeup! Quote Link to comment Share on other sites More sharing options...
Matei Posted July 26, 2009 Report Share Posted July 26, 2009 I can confirm that I've managed to build the game on OS X with Collada based on the instructions on Trac. I just used Apple's GCC (4.0.1) and I didn't have to modify the OpenAL header. Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 26, 2009 Author Report Share Posted July 26, 2009 (edited) 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 tiffOn 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 versionError: The following dependencies failed to build: tiffError: Status 1 encountered during processing. Edited July 27, 2009 by arn34 Quote Link to comment Share on other sites More sharing options...
Matei Posted July 27, 2009 Report Share Posted July 27, 2009 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? Quote Link to comment Share on other sites More sharing options...
janwas Posted July 27, 2009 Report Share Posted July 27, 2009 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? Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 27, 2009 Author Report Share Posted July 27, 2009 (edited) 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 1make[1]: *** Waiting for unfinished jobs....make: *** [AtlasUI] Error 2Indeed, 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 ). 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.3edit : wiki updated (and I learned by the same time a new function gcc_select, nice !) Edited July 27, 2009 by arn34 Quote Link to comment Share on other sites More sharing options...
Matei Posted July 27, 2009 Report Share Posted July 27, 2009 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. Quote Link to comment Share on other sites More sharing options...
espes Posted July 28, 2009 Report Share Posted July 28, 2009 (edited) 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?It's pretty broken for me. It completely freezes up upon launchhttp://imgur.com/uSXUm.png Edited July 28, 2009 by espes Quote Link to comment Share on other sites More sharing options...
arn34 Posted July 28, 2009 Author Report Share Posted July 28, 2009 Atlas does not work on my MBP (compiled with gcc 4.3).Do you mean it should work with gcc 4.0.1 ? Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 28, 2009 Report Share Posted July 28, 2009 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)) Quote Link to comment Share on other sites More sharing options...
espes Posted July 28, 2009 Report Share Posted July 28, 2009 It's not so much freezing as just not accepting any input or updating the window. I think it's still running underneath. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 28, 2009 Report Share Posted July 28, 2009 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 ) Quote Link to comment Share on other sites More sharing options...
Matei Posted July 29, 2009 Report Share Posted July 29, 2009 I had the same problem with Atlas on OS X before - it would load but then freeze. I assumed it was a problem in the wxWidgets configuration. Using gdb or dtrace on it might also help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.