Gallaecio Posted May 20, 2011 Report Share Posted May 20, 2011 I'm getting this:==== Building test ====main.cppprecompiled.cppLinking pyrogenesistest_root.cpptest_setup.cpptest_MD5.cpptest_Bound.cpptest_Sqrt.cpptest_FixedVector3D.cpptest_Matrix3d.cpptest_FixedVector2D.cpptest_Fixed.cpptest_ComponentManager.cpptest_CmpTemplateManager.cpp../../../binaries/system/libengine_dbg.a(Profile.o): In function `malloc':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/ps/Profile.cpp:509: undefined reference to `cpu_AtomicAdd(int volatile*, int)'../../../binaries/system/libengine_dbg.a(Profile.o): In function `realloc':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/ps/Profile.cpp:526: undefined reference to `cpu_AtomicAdd(int volatile*, int)'../../../binaries/system/libengine_dbg.a(Profile.o): In function `calloc':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/ps/Profile.cpp:543: undefined reference to `cpu_AtomicAdd(int volatile*, int)'../../../binaries/system/libengine_dbg.a(GameSetup.o): In function `EarlyInit()':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/ps/GameSetup/GameSetup.cpp:743: undefined reference to `cpu_ConfigureFloatingPoint()'../../../binaries/system/liblowlevel_dbg.a(timer.o): In function `EnsureMonotonic':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/timer.cpp:109: undefined reference to `cpu_CAS64(long long volatile*, long long, long long)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `PerformErrorReaction':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:401: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `debug_WriteCrashlog(wchar_t const*)':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:175: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `ShouldSkipError':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:519: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `debug_StopSkippingErrors()':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:503: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `debug_SkipErrors(long long)':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:490: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(module_init.o):/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/module_init.cpp:44: more undefined references to `cpu_CAS(int volatile*, int, int)' follow../../../binaries/system/liblowlevel_dbg.a(x86_x64.o): In function `cpuid':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'../../../binaries/system/liblowlevel_dbg.a(unique_range.o): In function `AddUniqueRangeDeleter(void (*)(void*, unsigned int))':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/allocators/unique_range.cpp:27: undefined reference to `cpu_AtomicAdd(int volatile*, int)'../../../binaries/system/liblowlevel_dbg.a(vfs_tree.o): In function `VfsDirectory::SetAssociatedDirectory(boost::shared_ptr<RealDirectory> const&)':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/file/vfs/vfs_tree.cpp:129: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(vfs_tree.o): In function `VfsDirectory::ShouldPopulate()':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/file/vfs/vfs_tree.cpp:137: undefined reference to `cpu_CAS(int volatile*, int, int)'collect2: ld returned 1 exit statusmake[1]: *** [../../../binaries/system/pyrogenesis_dbg] Error 1make: *** [pyrogenesis] Error 2make: *** Waiting for unfinished jobs....test_Serializer.cpptest_ParamNode.cpptest_Simulation2.cpptest_Position.cpptest_scripts.cpptest_Pathfinder.cpptest_CommandQueue.cpptest_MeshManager.cpptest_Color.cpptest_Terrain.cpptest_TextureManager.cpptest_LOSTexture.cpptest_TextureConverter.cpptest_CmdLineArgs.cpptest_test.cpptest_CLogger.cpptest_Parser.cpptest_CStr.cppstub_impl_hack.cpptest_XMLWriter.cpptest_Xeromyces.cpptest_RelaxNG.cpptest_XeroXMB.cpptest_Net.cpptest_NetMessage.cpptest_ScriptVal.cpptest_ScriptConversions.cpptest_ScriptInterface.cppIn file included from ../../../source/scriptinterface/tests/test_ScriptConversions.cpp:14:0:../../../source/scriptinterface/tests/../../../source/scriptinterface/tests/test_ScriptConversions.h:132:3: warning: this decimal constant is unsigned only in ISO C90../../../source/scriptinterface/tests/../../../source/scriptinterface/tests/test_ScriptConversions.h:138:3: warning: this decimal constant is unsigned only in ISO C90test_allocators.cpptest_headerless.cpptest_posix.cpptest_sysdep.cpptest_printf.cpptest_rtl.cpptest_topology.cpptest_rand.cpptest_byte_order.cpptest_cache_adt.cpptest_secure_crt.cpptest_path_util.cpptest_wchar.cpptest_base32.cpptest_lib.cpptest_adts.cpptest_bits.cpptest_fnv_hash.cpptest_regex.cpptest_trace.cpptest_tex.cppLinking test../../../binaries/system/libengine_dbg.a(Profile.o): In function `malloc':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/ps/Profile.cpp:509: undefined reference to `cpu_AtomicAdd(int volatile*, int)'../../../binaries/system/libengine_dbg.a(Profile.o): In function `realloc':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/ps/Profile.cpp:526: undefined reference to `cpu_AtomicAdd(int volatile*, int)'../../../binaries/system/libengine_dbg.a(Profile.o): In function `calloc':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/ps/Profile.cpp:543: undefined reference to `cpu_AtomicAdd(int volatile*, int)'../../../binaries/system/libengine_dbg.a(GameSetup.o): In function `EarlyInit()':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/ps/GameSetup/GameSetup.cpp:743: undefined reference to `cpu_ConfigureFloatingPoint()'../../../binaries/system/liblowlevel_dbg.a(timer.o): In function `EnsureMonotonic':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/timer.cpp:109: undefined reference to `cpu_CAS64(long long volatile*, long long, long long)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `PerformErrorReaction':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:401: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `debug_WriteCrashlog(wchar_t const*)':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:175: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `ShouldSkipError':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:519: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `debug_StopSkippingErrors()':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:503: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(debug.o): In function `debug_SkipErrors(long long)':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/debug.cpp:490: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(module_init.o):/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/module_init.cpp:44: more undefined references to `cpu_CAS(int volatile*, int, int)' follow../../../binaries/system/liblowlevel_dbg.a(x86_x64.o): In function `cpuid':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/sysdep/arch/x86_x64/x86_x64.cpp:83: undefined reference to `ia32_asm_cpuid'../../../binaries/system/liblowlevel_dbg.a(unique_range.o): In function `AddUniqueRangeDeleter(void (*)(void*, unsigned int))':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/allocators/unique_range.cpp:27: undefined reference to `cpu_AtomicAdd(int volatile*, int)'../../../binaries/system/liblowlevel_dbg.a(vfs_tree.o): In function `VfsDirectory::SetAssociatedDirectory(boost::shared_ptr<RealDirectory> const&)':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/file/vfs/vfs_tree.cpp:129: undefined reference to `cpu_CAS(int volatile*, int, int)'../../../binaries/system/liblowlevel_dbg.a(vfs_tree.o): In function `VfsDirectory::ShouldPopulate()':/home/user/games/0ad/src/0ad-r09530-alpha/build/workspaces/gcc/../../../source/lib/file/vfs/vfs_tree.cpp:137: undefined reference to `cpu_CAS(int volatile*, int, int)'collect2: ld returned 1 exit statusmake[1]: *** [../../../binaries/system/test_dbg] Error 1make: *** [test] Error 2 Aborting...Any idea? Quote Link to comment Share on other sites More sharing options...
Gallaecio Posted May 21, 2011 Author Report Share Posted May 21, 2011 (edited) May this topic has anything to do with it? Maybe some kind of regression? EDIT: just in case it is related, I'm using latest Nasm, 2.09.08. Edited May 21, 2011 by Gallaecio Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted May 21, 2011 Report Share Posted May 21, 2011 Is that the first error message when you run "make"? (I'd expect it to have complained when compiling ia32.cpp/amd64.cpp or something, if it's ending up without those symbols defined.)Do you have a 32-bit or 64-bit kernel, and do you have a 32-bit or 64-bit userspace? ("uname -m" and "echo $HOSTTYPE" might say.) Quote Link to comment Share on other sites More sharing options...
Gallaecio Posted May 22, 2011 Author Report Share Posted May 22, 2011 (edited) I'm compiling this in my i686 system, as confirmed by "uname -m", and those two are AFAIK the only errors, but I will try to compile again and paste the full output somewhere.EDIT: http://paste.kde.org/73351/I see no reference to ia32.cpp at all. Might that be the problem? Edited May 22, 2011 by Gallaecio Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted May 22, 2011 Report Share Posted May 22, 2011 Hmm, that says it's compiling amd64.cpp and amd64_asm.asm so it seems to think it's a 64-bit system when running update-workspaces.sh. build/premake/premake.lua makes that decision based on $HOSTTYPE and "gcc -dumpmachine" - what values do those have? (Our architecture detection system is definitely a bit fragile ) Quote Link to comment Share on other sites More sharing options...
Gallaecio Posted May 23, 2011 Author Report Share Posted May 23, 2011 (edited) Then it's my system’s fault, completely:[user@denix ~]$ echo $HOSTTYPEx86_64[user@denix ~]$ gcc -dumpmachinei686-pc-linux-gnuI'll try to find out why has $HOSTTYPE that value in my system and fix it. Thanks a lot for the help. Edited May 23, 2011 by Gallaecio Quote Link to comment Share on other sites More sharing options...
Gallaecio Posted May 23, 2011 Author Report Share Posted May 23, 2011 (edited) Someone at Chakra (Manuel Tortosa) told my that $HOSTTYPE is not about software architecture, but about hardware. So, although my (software) system is i686, my processor seems to be x86_64, so $HOSTTYPE value would be right. In that case, I guess it might not make much sense to use $HOSTTYPE to determine architecture, since what it matters is the software architecture the system is using. It would be good if, at least, gcc -dumpmachine has priority over $HOSTTYPE. Manu also told me to use $CARCH instead when patching the code, maybe that's a good option too. (that's Chakra only)EDIT: another Chakra developer ([jmc]) suggested asking the kernel, since software has to have the same arch as it: uname -m. Edited May 27, 2011 by Gallaecio Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted June 4, 2011 Report Share Posted June 4, 2011 another Chakra developer ([jmc]) suggested asking the kernel, since software has to have the same arch as it: uname -m.Hmm, I don't think that's true - some people run 32-bit userspace on 64-bit kernels. It seems the most reliable option is to actually run the compiler and see if sizeof(void*) is 4 or 8, since running the compiler is what matters in the end. Premake doesn't seem to make that particularly easy though, since it expects the compiler to be specified when running make rather than when running premake, and you have to implement the checks with low-level Lua. (CMake seems to handle it automatically with the CMAKE_SIZEOF_VOID_P variable which is nicer.) 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.