aeno Posted August 20, 2010 Report Share Posted August 20, 2010 hi everyone,i'm trying to compile 0ad under mac osx 10.6.4 snow leopard. i installed all the macports prerequisites successfully but when i try to "make" i get two errors in "network":==== Building mocks_real ====make[1]: `../../../binaries/system/libmocks_real_dbg.a' is up to date.==== Building network ====mkdir -p obj/network_Debug/usr/bin/g++-4.2 -MMD -D "LIB_STATIC_LINK" -D "DEBUG" -D "USING_PCH" -I "/usr/X11R6/include/X11" -I "/usr/X11R6/include" -I "/usr/include/X11" -I "../../../source/pch/network" -I "../../../source/" -I "../../../libraries/spidermonkey-tip/include-unix/debug" -I "/opt/local/include" -g -Wall -Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fpch-preprocess -msse -fno-omit-frame-pointer -fvisibility=hidden -MF obj/network_Debug/NetClient.d -MT obj/network_Debug/NetClient.o -o obj/network_Debug/NetClient.o -c -include obj/network_Debug/precompiled.h ../../../source/network/NetClient.cppIn file included from ../../../source/ps/CConsole.h:30, from ../../../source/network/NetClient.cpp:27:../../../source/lib/file/vfs/vfs_path.h:68: error: ‘is_basic_path’ is not a template../../../source/lib/file/vfs/vfs_path.h:69: error: explicit specialization of non-template ‘boost::filesystem::is_basic_path’/opt/local/include/boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used/opt/local/include/boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used/opt/local/include/boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not usedmake[1]: *** [obj/network_Debug/NetClient.o] Error 1make: *** [network] Error 2has anyone a clue why that error occurs?thanks for all your help,aeno Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted August 20, 2010 Report Share Posted August 20, 2010 What version of Boost do you have installed? Quote Link to comment Share on other sites More sharing options...
aeno Posted August 20, 2010 Author Report Share Posted August 20, 2010 hi Ykkrosh ,i'ts version 1.44.0_0 Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted August 20, 2010 Report Share Posted August 20, 2010 Looks like it's probably related to the version 3 changes to Boost.Filesystem in 1.44. But it says version 2 is still the default in that release, so it ought to still work fine.Does it work any better if you add #define BOOST_FILESYSTEM_VERSION 2into source/lib/external_libraries/boost_filesystem.h just before the "#include" line? Quote Link to comment Share on other sites More sharing options...
aeno Posted August 20, 2010 Author Report Share Posted August 20, 2010 (edited) unfortunately not, i get exactly the same output... :-/ Edited August 20, 2010 by aeno Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted August 20, 2010 Report Share Posted August 20, 2010 Hmm, I'm afraid I'm not sure what to try then (other than installing an older version of Boost if that's possible). It looks like we'll have to deal with this API change some time soon, but I can't easily install the latest Boost to try it and fix it myself right now. Quote Link to comment Share on other sites More sharing options...
Rorto Posted August 22, 2010 Report Share Posted August 22, 2010 Hello !I've exactly the same problem.Any idea to solve this issue ? Quote Link to comment Share on other sites More sharing options...
Karlik Posted August 23, 2010 Report Share Posted August 23, 2010 Please check the patch: http://trac.wildfiregames.com/attachment/t...552/boost_patch Quote Link to comment Share on other sites More sharing options...
Rorto Posted August 23, 2010 Report Share Posted August 23, 2010 (edited) I've upgrade to the new revision but i've the same kinf of error during compilation.I don't understand the patch, i think. I've add the 3 lines in the source file, that's it ?EDIT : it seems to be working. Thanks Karlik ! I've missed the # in the patch. But i've some warning : "dereferencing type-punned pointer will break strict-aliasing rules".Is the command "sudo" necessary before "make" or not ?(Excuse my language, i'm french.) =/ Edited August 23, 2010 by Rorto Quote Link to comment Share on other sites More sharing options...
Rorto Posted August 24, 2010 Report Share Posted August 24, 2010 So, it does not work... Still the same error. ==(After updating to the new revision, applying patch, etc...) Quote Link to comment Share on other sites More sharing options...
Rorto Posted August 24, 2010 Report Share Posted August 24, 2010 I've tried with archive of the latest release instead of SVN files. (http://trac.wildfiregames.com/wiki/LatestRelease)So during building lowlevel :../../../source/lib/sysdep/cpu.cpp:38: error: invalid conversion from ‘volatile int64_t*’ to ‘volatile intptr_t*’../../../source/lib/sysdep/cpu.cpp:38: error: initializing argument 1 of ‘bool cpu_CAS(volatile intptr_t*, intptr_t, intptr_t)’../../../source/lib/sysdep/cpu.cpp: At global scope:../../../source/lib/sysdep/cpu.cpp:30: warning: ‘LINE_30_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:31: warning: ‘LINE_31_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:32: warning: ‘LINE_32_2’ defined but not used/opt/local/include/boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used/opt/local/include/boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used/opt/local/include/boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not usedmake[1]: *** [obj/lowlevel_Debug/cpu.o] Error 1make: *** [lowlevel] Error 2Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Rorto Posted August 29, 2010 Report Share Posted August 29, 2010 Please someone ?I've still this error during compilation. What should I do ? Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted August 29, 2010 Report Share Posted August 29, 2010 I think that error with cpu_CAS is caused by the build system mixing 32-bit and 64-bit incorrectly, but I don't know how to fix it properly. We need some developer with OS X 10.6 to debug and fix these issues. Quote Link to comment Share on other sites More sharing options...
janwas Posted September 4, 2010 Report Share Posted September 4, 2010 It looks ARCH_AMD64 is defined to 1 and i64 and intptr_t aren't the same.Can you please verify this by (temporarily) adding something like#if ARCH_AMD64 == 1#error "arch is 64, remove me"#endif#if sizeof(i64) != sizeof(intptr_t)#error "size mismatch, remove me"#endif in cpu.cpp?The next question is of course: why and how is intptr_t defined? It should be the same size as a pointer, or else all kinds of stuff will break. Quote Link to comment Share on other sites More sharing options...
Rorto Posted September 4, 2010 Report Share Posted September 4, 2010 (edited) After adding your code to cpu.cpp, the error is : cpu.cpp../../../source/lib/sysdep/cpu.cpp:57:2: error: #error "arch is 64, remove me"../../../source/lib/sysdep/cpu.cpp:59:5: warning: "sizeof" is not defined../../../source/lib/sysdep/cpu.cpp:59:11: error: missing binary operator before token "("../../../source/lib/sysdep/cpu.cpp: In function ‘void TestCAS64()’:../../../source/lib/sysdep/cpu.cpp:38: error: invalid conversion from ‘volatile int64_t*’ to ‘volatile intptr_t*’../../../source/lib/sysdep/cpu.cpp:38: error: initializing argument 1 of ‘bool cpu_CAS(volatile intptr_t*, intptr_t, intptr_t)’../../../source/lib/sysdep/cpu.cpp: At global scope:../../../source/lib/sysdep/cpu.cpp:30: warning: ‘LINE_30_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:31: warning: ‘LINE_31_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:32: warning: ‘LINE_32_2’ defined but not used/opt/local/include/boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used/opt/local/include/boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used/opt/local/include/boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not usedmake[1]: *** [obj/lowlevel_Release/cpu.o] Error 1make: *** [lowlevel] Error 2So i've removed #if ARCH_AMD64 == 1#error "arch is 64, remove me"#endifAnd the error is :==== Building mocks_test ====../../../source/lib/sysdep/cpu.cpp:57:5: warning: "sizeof" is not defined../../../source/lib/sysdep/cpu.cpp:57:11: error: missing binary operator before token "("../../../source/lib/sysdep/cpu.cpp: In function ‘void TestCAS64()’:../../../source/lib/sysdep/cpu.cpp:38: error: invalid conversion from ‘volatile int64_t*’ to ‘volatile intptr_t*’../../../source/lib/sysdep/cpu.cpp:38: error: initializing argument 1 of ‘bool cpu_CAS(volatile intptr_t*, intptr_t, intptr_t)’../../../source/lib/sysdep/cpu.cpp: At global scope:../../../source/lib/sysdep/cpu.cpp:30: warning: ‘LINE_30_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:31: warning: ‘LINE_31_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:32: warning: ‘LINE_32_2’ defined but not used/opt/local/include/boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used/opt/local/include/boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used/opt/local/include/boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not usedmake[1]: `../../../binaries/system/libmocks_test.a' is up to date.==== Building AtlasObject ====make[1]: *** [obj/lowlevel_Release/cpu.o] Error 1make: *** [lowlevel] Error 2I don't understand anything. =/But thanks for the help. ^^ Edited September 4, 2010 by Rorto Quote Link to comment Share on other sites More sharing options...
janwas Posted September 4, 2010 Report Share Posted September 4, 2010 OK, thanks. We now know that our predefined macros believe your system to be 64 bit Unfortunately I screwed up the latter half of that snippet - `sizeof' isn't known to the preprocessor, oops.Instead, we need to add an actual line of code somewhere that is sure to run, e.g. as the first line within main() in main.cpp:debug_printf(L"here are the sizes: %d %d %d\n", sizeof(int), sizeof(void*), sizeof(intptr_t));Those 3 numbers should then be displayed somewhere in the console/terminal - can you please post them? Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted September 4, 2010 Report Share Posted September 4, 2010 Adding lines of code to run doesn't sound very helpful when the problem is the game won't build...#535 has some information from Bob who had a similar problem. Quote Link to comment Share on other sites More sharing options...
Rorto Posted September 5, 2010 Report Share Posted September 5, 2010 With the last rev (8078) i've :==== Building atlas ====make[1]: *** No rule to make target `../../../source/graphics/TextureEntry.h', needed by `obj/graphics_Release/GameView.o'. Stop.make: *** [graphics] Error 2make: *** Waiting for unfinished jobs....make[1]: *** No rule to make target `../../../source/graphics/TextureManager.h', needed by `obj/engine_Release/GameSetup.o'. Stop.make[1]: *** Waiting for unfinished jobs....World.cppmake[1]: *** No rule to make target `../../../source/graphics/TextureEntry.h', needed by `obj/atlas_Release/ActorViewer.o'. Stop.make: *** [atlas] Error 2In file included from ../../../source/ps/World.cpp:33:../../../source/lib/timer.h: In member function ‘void TimerUnit::AddDifferenceAtomic(TimerUnit, TimerUnit)’:../../../source/lib/timer.h:178: warning: dereferencing type-punned pointer will break strict-aliasing rulesmake: *** [engine] Error 2And with your line it's :make[1]: *** No rule to make target `../../../source/graphics/TextureManager.h', needed by `obj/engine_Release/GameSetup.o'. Stop.make: *** [engine] Error 2make: *** Waiting for unfinished jobs....make[1]: `../../../binaries/system/libi18n.a' is up to date.make[1]: *** No rule to make target `../../../source/graphics/TextureEntry.h', needed by `obj/graphics_Release/GameView.o'. Stop.make: *** [graphics] Error 2Exept if I was wrong with main.cpp. Should he looks like that ?int main(int argc, char* argv[]){ EarlyInit(); // must come at beginning of main debug_printf(L"here are the sizes: %d %d %d\n", sizeof(int), sizeof(void*), sizeof(intptr_t)); RunGameOrAtlas(argc, const_cast<const char**>(argv)); return EXIT_SUCCESS;}I'm really lost. =/ Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted September 5, 2010 Report Share Posted September 5, 2010 You need to run "make clean" and run update-workspaces.sh again, after updating from SVN, if any source files have been added or deleted recently (which they have). That will fix the "No rule to make target" errors. (I expect you'll still get the "invalid conversion from ‘volatile int64_t*’ to ‘volatile intptr_t*’" errors, though.) Quote Link to comment Share on other sites More sharing options...
Rorto Posted September 5, 2010 Report Share Posted September 5, 2010 I've run again "make clean" and "./update-workspaces.sh" like each time but i've still the same error. =/ Quote Link to comment Share on other sites More sharing options...
janwas Posted September 5, 2010 Report Share Posted September 5, 2010 #535 has some information from Bob who had a similar problem.Aha! 64-bit, even though the system is 32-bit? Is that the case here? (Wasn't commented upon above)Adding lines of code to run doesn't sound very helpful when the problem is the game won't build...heh, it'll also work, just need to comment out everything that causes a compile error.Your cassert idea is simpler still, though. I've added those sanity checks to cpu.cpp, can't hurt.Exept if I was wrong with main.cpp. Should he looks like that ?The debug_printf really should be the very first thing (that comment notwithstanding), but it is no longer needed.Instead, the new casserts in cpu.cpp will probably explode - what messages are you getting?(I'm still not sure whether the problem is an inadvertant definition of ARCH_AMD64 or incorrect definition of intptr_t) Quote Link to comment Share on other sites More sharing options...
Rorto Posted September 5, 2010 Report Share Posted September 5, 2010 I've delete my old copy and download a new one.During ==== Building wxJS ==== the error is : cpu.cpp../../../source/lib/sysdep/cpu.cpp: In function ‘void TestCAS64()’:../../../source/lib/sysdep/cpu.cpp:51: error: invalid conversion from ‘volatile int64_t*’ to ‘volatile intptr_t*’../../../source/lib/sysdep/cpu.cpp:51: error: initializing argument 1 of ‘bool cpu_CAS(volatile intptr_t*, intptr_t, intptr_t)’In file included from /opt/local/include/wx-2.8/wx/html/helpdata.h:21, from /opt/local/include/wx-2.8/wx/html/helpfrm.h:20, from /opt/local/include/wx-2.8/wx/html/helpctrl.h:20, from /opt/local/include/wx-2.8/wx/help.h:36, from /opt/local/include/wx-2.8/wx/cshelp.h:19, from ../../../source/tools/atlas/wxJS/gui/control/helpbtn.h:28, from ../../../source/tools/atlas/wxJS/gui/gui_init.cpp:82:/opt/local/include/wx-2.8/wx/filesys.h: In member function ‘wxFSHandlerHash_wxImplementation_HashTable::Node** wxFSHandlerHash_wxImplementation_HashTable::GetNodePtr(const void* const&) const’:/opt/local/include/wx-2.8/wx/filesys.h:176: warning: dereferencing type-punned pointer will break strict-aliasing rules../../../source/lib/sysdep/cpu.cpp: At global scope:../../../source/lib/sysdep/cpu.cpp:30: warning: ‘LINE_30_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:31: warning: ‘LINE_31_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:32: warning: ‘LINE_32_2’ defined but not used/opt/local/include/boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used/opt/local/include/boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used/opt/local/include/boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not usedmake[1]: *** [obj/lowlevel_Release/cpu.o] Error 1make: *** [lowlevel] Error 2make: *** Waiting for unfinished jobs.... (too long ?) Quote Link to comment Share on other sites More sharing options...
janwas Posted September 5, 2010 Report Share Posted September 5, 2010 hm, interesting. Line 51 is the new location of the cpu_CAS64 call, so it looks like those casserts are not failing. Apparently what is happening is that intptr_t and i64 aren't actually the same type, so GCC refuses to cast.I have now removed the cpu_CAS64 wrapper. Code that always wants to write 64 bits (regardless of pointer size) will now need to call ia32_asm_CAS64 #if ARCH_IA32, which isn't too bad since it's only 2 spots.That should fix it - can you confirm?(BTW, mention of wxJS is unrelated - it was probably compiling that in parallel.) Quote Link to comment Share on other sites More sharing options...
Rorto Posted September 5, 2010 Report Share Posted September 5, 2010 (edited) Now (rev8080) i've : (the same, no ?)cpu.cpp../../../source/lib/sysdep/cpu.cpp: In function ‘void TestCAS64()’:../../../source/lib/sysdep/cpu.cpp:51: error: invalid conversion from ‘volatile int64_t*’ to ‘volatile intptr_t*’../../../source/lib/sysdep/cpu.cpp:51: error: initializing argument 1 of ‘bool cpu_CAS(volatile intptr_t*, intptr_t, intptr_t)’In file included from /opt/local/include/wx-2.8/wx/html/helpdata.h:21, from /opt/local/include/wx-2.8/wx/html/helpfrm.h:20, from /opt/local/include/wx-2.8/wx/html/helpctrl.h:20, from /opt/local/include/wx-2.8/wx/help.h:36, from /opt/local/include/wx-2.8/wx/cshelp.h:19, from ../../../source/tools/atlas/wxJS/gui/control/helpbtn.h:28, from ../../../source/tools/atlas/wxJS/gui/gui_init.cpp:82:/opt/local/include/wx-2.8/wx/filesys.h: In member function ‘wxFSHandlerHash_wxImplementation_HashTable::Node** wxFSHandlerHash_wxImplementation_HashTable::GetNodePtr(const void* const&) const’:/opt/local/include/wx-2.8/wx/filesys.h:176: warning: dereferencing type-punned pointer will break strict-aliasing rules../../../source/lib/sysdep/cpu.cpp: At global scope:../../../source/lib/sysdep/cpu.cpp:30: warning: ‘LINE_30_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:31: warning: ‘LINE_31_2’ defined but not used../../../source/lib/sysdep/cpu.cpp:32: warning: ‘LINE_32_2’ defined but not used/opt/local/include/boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used/opt/local/include/boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used/opt/local/include/boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not usedmake[1]: *** [obj/lowlevel_Release/cpu.o] Error 1make: *** [lowlevel] Error 2make: *** Waiting for unfinished jobs....and many things like that :ld: warning: in /opt/local/lib/libxml2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)ld: warning: duplicate dylib /opt/local/lib/libz.1.dylibld: in /opt/local/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (i386) Edited September 5, 2010 by Rorto Quote Link to comment Share on other sites More sharing options...
janwas Posted September 5, 2010 Report Share Posted September 5, 2010 Impossible r8080 is the newer version of that file, yes. However, the offending function call moved down a few lines, it's no longer on line 51. You must be compiling an older version still - did you do make clean here as well?The ld warnings also indicate something is very wrong with your build system. Unfortunately I can't help there, never done any dev work on OS X :/ 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.