Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
470 stars 75 forks source link

Trouble building s25client on Mac #1625

Closed rdoubleui closed 9 months ago

rdoubleui commented 10 months ago

I'm on a M1 MacBook Pro - running Venture 13.6 and following the build instructions.

I'm seeing this error - any hint what I could check/what I might be missing?

[ 21%] Linking CXX executable ../../Contents/MacOS/s25edit
ld: warning: ignoring duplicate libraries: '../../libs/common/libs25Common.a', '../../libs/rttrConfig/librttrConfig.a', '../libendian/libendian_static.a'
ld: warning: ignoring file '/Users/rajko/s25client/external/dev-tools/lua/mac/lib/liblua52.a': fat file missing arch 'arm64', file has 'i386,x86_64,ppc'
ld: Undefined symbols:
  _luaL_error, referenced from:
      kaguya::Metatable::property_newindex_function(lua_State*) in libgamedata.a[7](GameDataLoader.cpp.o)
  _luaL_getmetafield, referenced from:
      kaguya::nativefunction::pushArgmentTypeNames(lua_State*, int) in libgamedata.a[7](GameDataLoader.cpp.o)
      kaguya::nativefunction::pushArgmentTypeNames(lua_State*, int) in libgamedata.a[7](GameDataLoader.cpp.o)
  _luaL_loadstring, referenced from:
      kaguya::State::dostring(char const*, kaguya::LuaTable const&) in libgamedata.a[9](LuaInterfaceBase.cpp.o)
  _luaL_newstate, referenced from:
      LuaInterfaceBase::LuaInterfaceBase() in libgamedata.a[9](LuaInterfaceBase.cpp.o)
  _luaL_ref, referenced from:
      kaguya::lua_type_traits<kaguya::LuaRef, void>::get_type kaguya::detail::LuaVariantImpl<kaguya::TableKeyReferenceProxy<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::get<kaguya::LuaRef>() const in libgamedata.a[2](EdgeDesc.cpp.o)
      kaguya::lua_type_traits<kaguya::LuaTable, void>::get(lua_State*, int) in libgamedata.a[3](LandscapeDesc.cpp.o)
      GameDataLoader::AddLandscape(kaguya::LuaTable const&) in libgamedata.a[7](GameDataLoader.cpp.o)
      GameDataLoader::AddTerrainEdge(kaguya::LuaTable const&) in libgamedata.a[7](GameDataLoader.cpp.o)
      GameDataLoader::AddTerrain(kaguya::LuaTable const&) in libgamedata.a[7](GameDataLoader.cpp.o)
      int kaguya::nativefunction::_call_apply<void (LuaInterfaceBase::*&)(kaguya::LuaRef const&), LuaInterfaceBase&, kaguya::LuaRef const&, 1ul, 2ul>(lua_State*, void (LuaInterfaceBase::*&)(kaguya::LuaRef const&), kaguya::nativefunction::index_tuple<1ul, 2ul>, kaguya::util::FunctionSignatureType<void, LuaInterfaceBase&, kaguya::LuaRef const&>) in libgamedata.a[9](LuaInterfaceBase.cpp.o)
      kaguya::lua_type_traits<kaguya::LuaRef, void>::get_type kaguya::detail::LuaVariantImpl<kaguya::LuaStackRef>::get<kaguya::LuaRef>() const in libgamedata.a[9](LuaInterfaceBase.cpp.o)
      ...
Flamefire commented 10 months ago

You need to either provide your own lua library build for your architecture(s) or set CMAKE_OSX_ARCHITECTURES to your architecture if it is either of i386,x86_64,ppc. Or you can exclude the missing one with RTTR_NOarm64=1

I.e. invoke cmake with the additional parameter -DCMAKE_OSX_ARCHITECTURES=x86_64 or -DRTTR_NOarm64=1

rdoubleui commented 9 months ago

Thanks, in the meantime I had given up as it seemed hard on ARM. Ended up using the binary instead and got this working. What an awesome project, I'm loving it! Closing the issue.