GutZuFusss / EXPRemake

0.6 and 0.7 remake of the popular 0.5 EXPlorer modification
Other
2 stars 3 forks source link

0.7 doesn't build anymore on Debian 11 #4

Open schrmh opened 2 years ago

schrmh commented 2 years ago

0.6 compiles, I get at least a working server binary for that version despite a bunch of errors. That's the output when I run bam server with bam 0.4.0 to get the 0.7 server:

[1/4] #1 c++ src/game/server/entities/character.cpp
src/game/server/entities/character.cpp: In member function ‘void CCharacter::Die(int, int)’:
src/game/server/entities/character.cpp:770:224: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  770 | meServer()->m_apPlayers[Killer]->GetCharacter() && !GameServer()->m_apPlayers[Killer]->IsBot() && !(GameServer()->m_apPlayers[Killer]->m_GameExp.m_Weapons & (int)pow(2, WEAPON_GUN)))
      |                                                                                                                                                                                    ^

In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/entities/character.cpp:5:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/entities/character.cpp:5:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
bam: 'build/x86_64/debug/objs/game/server/entities/character.o' error 256
[2/4] #1 c++ src/game/server/gamemodes/exp/exp.cpp
src/game/server/gamemodes/exp/exp.cpp: In member function ‘void CGameControllerEXP::StopClient(int)’:
src/game/server/gamemodes/exp/exp.cpp:400:84: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  400 |  if(GameServer()->m_apPlayers[ID]->m_GameExp.m_Weapons & (int)pow(2, WEAPON_FREEZER))
      |                                                                                    ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/string.h:26,
                 from src/game/server/gamemodes/exp/exp.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/gamemodes/exp/exp.cpp:5:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
bam: 'build/x86_64/debug/objs/game/server/gamemodes/exp/exp.o' error 256
[3/4] #1 c++ src/game/server/player.cpp
src/game/server/player.cpp: In member function ‘void CPlayer::LoadGame(vec2, int, int, int, int, int, CItems, bool, bool)’:
src/game/server/player.cpp:502:31: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  502 |  if(w & (int)pow(2, WEAPON_GUN))
      |                               ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
src/game/server/player.cpp:507:35: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  507 |  if(w & (int)pow(2, WEAPON_SHOTGUN))
      |                                   ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
src/game/server/player.cpp:512:35: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  512 |  if(w & (int)pow(2, WEAPON_GRENADE))
      |                                   ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
src/game/server/player.cpp:517:33: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  517 |  if(w & (int)pow(2, WEAPON_LASER))
      |                                 ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
src/game/server/player.cpp:522:36: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  522 |  if(w & (int)pow(2, WEAPON_KAMIKAZE))
      |                                    ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
src/game/server/player.cpp:527:35: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  527 |  if(w & (int)pow(2, WEAPON_FREEZER))
      |                                   ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
src/game/server/player.cpp: In member function ‘void CPlayer::GetWeapon(int)’:
src/game/server/player.cpp:543:76: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  543 |  if(WID == WEAPON_LASER && m_GameExp.m_Weapons & (int)pow(2, WEAPON_FREEZER))
      |                                                                            ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
src/game/server/player.cpp:547:51: error: call of overloaded ‘pow(int, <unnamed enum>)’ is ambiguous
  547 |   m_GameExp.m_Weapons &= ~(int)pow(2, WEAPON_LASER);
      |                                                   ^
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:522,
                 from /usr/include/c++/10/cmath:41,
                 from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/math.h:36,
                 from src/base/vmath.h:6,
                 from src/engine/graphics.h:6,
                 from build/src/generated/server_data.h:3,
                 from src/game/server/player.cpp:3:
/usr/include/c++/10/cmath:392:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  392 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/10/cmath:388:3: note: candidate: ‘constexpr float std::pow(float, float)’
  388 |   pow(float __x, float __y)
      |   ^~~
bam: 'build/x86_64/debug/objs/game/server/player.o' error 256
bam: error: a build step failed
GutZuFusss commented 2 years ago

To be honest, it has been too long. Looks like a compiler issue though, I was probably using MSVC at this time. In case you are using Linux you will have to fix the problem itself, im not sure about C++ compiler options there.

Edit: Also this Mod was coded before 0.7 was even released, so just be aware that there might be serious security flaws that got fixed later.