pBlueG / SA-MP-MySQL

MySQL plugin for San Andreas Multiplayer
BSD 3-Clause "New" or "Revised" License
194 stars 81 forks source link

Where is log-core? #256

Closed Cheaterman closed 3 years ago

Cheaterman commented 3 years ago

Build instructions unclear. It should be mentioned the repository clone must be recursive (because submodules). Log-core isn't part of these submodules. Instructions on how to install it are unclear.

EDIT: https://github.com/pBlueG/SA-MP-MySQL/commit/d4a2cc6ed719ec65e463569e68e69ce860c372b5

This commit broke it, I guess. I'll try to manually clone log-core in the vendored libs dir...

EDIT2: ... which didn't work. Trying to build log-core by hand now. Needs yaml-cpp. Again, build instructions would have been welcome.......

Cheaterman commented 3 years ago

When building log-core:

/home/cheaterman/samp/samp-log-core/src/AmxDebugManager.cpp: In member function ‘bool AmxDebugManager::GetFunctionCallTrace(AMX*, std::vector<samplog::AmxFuncCallInfo>&)’:
/home/cheaterman/samp/samp-log-core/src/AmxDebugManager.cpp:182:13: error: cast from ‘unsigned char*’ to ‘cell’ {aka ‘int’} loses precision [-fpermissive]
  182 |  cell dat = reinterpret_cast<cell>(amx->base + base->dat);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cheaterman/samp/samp-log-core/src/Logger.cpp: In member function ‘virtual bool Logger::LogNativeCall(AMX*, cell*, std::string, std::string)’:
/home/cheaterman/samp/samp-log-core/src/Logger.cpp:126:39: error: cast from ‘cell*’ {aka ‘int*’} to ‘unsigned int’ loses precision [-fpermissive]
  126 |    fmt::format_to(fmt_msg, "{:#08x}", reinterpret_cast<unsigned int>(addr_dest));
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Gonna fix those I guess.

EDIT: Oh wow, that's because -m32 isn't used by default? Great.

Cheaterman commented 3 years ago

(solved by looking at CI scripts, basically ^^)