From 80e6893b6dd4668958f1b87f6a007471cd9781fc Mon Sep 17 00:00:00 2001 From: sco Date: Mon, 10 Jan 2022 22:26:06 +0100 Subject: [PATCH] Add 'Building-PokerTH-for-Linux.md' --- Building-PokerTH-for-Linux.md.md | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Building-PokerTH-for-Linux.md.md diff --git a/Building-PokerTH-for-Linux.md.md b/Building-PokerTH-for-Linux.md.md new file mode 100644 index 0000000..593fa16 --- /dev/null +++ b/Building-PokerTH-for-Linux.md.md @@ -0,0 +1,68 @@ +It should compile with: +* Compiler: GCC 4.8+, 5.x, 6.x (see [* KNOWN BUGS](https://github.com/pokerth/pokerth/wiki/Building-PokerTH-for-Linux/_edit#known-bugs)), 7.X (see [* KNOWN BUGS](https://github.com/pokerth/pokerth/wiki/Building-PokerTH-for-Linux/_edit#known-bugs)) +* Mode: c++98, c++11 +* QT: 4.x (>= 4.8), 5.x + +Remark: It's not been fully tested with GCC 7.x, although it should work. It's also not tested with GCC 8.x, but it seems to work. + +## Requirements +The following DEVELOPMENT packages are required to compile the server. +Runtime libraries are not enough to compile. Development packages are mandatory (ie: libXXXX_dev) + +* qmake (Qt development tools): 4.8+. (current and recommended is 5.8: https://www.qt.io/download-open-source/) +* boost 1.44, latest recommended (requires libbz2) (current and recommended is 1.63 http://www.boost.org/users/history/version_1_63_0.html). + - boost-thread + - boost-filesystem + - boost-datetime + - boost-program_options + - boost-iostreams + - boost-asio + - boost-regex + - boost-random + - boost-chrono (if compiled with c++98 mode) + + Remarks for boost library: + - if compiled with boost 1.70+, see [*** KNOWN BUGS](https://github.com/pokerth/pokerth/wiki/Building-PokerTH-for-Linux/_edit#known-bugs) + +* libcurl4-gnutls +* libtinyxml +* libircclient +* libgsasl (at least 1.4) +* libsqlite3 +* libgcrypt (should already be there as dependency to the previous libs), or OpenSSL (see [** KNOWN BUGS](https://github.com/pokerth/pokerth/wiki/Building-PokerTH-for-Linux/_edit#known-bugs) ) +* zlib version >= 1.2.3 --> http://www.zlib.net/ +* libSDL_mixer, libSDL --> http://www.libsdl.org/ +* libSQLite3 --> http://sqlite.org/ +* protoc >= 2.3.0 (during build), libprotobuf >= 2.3.0 -> https://github.com/google/protobuf +* libmysql++, for official server + +## Get code + + $ git clone https://github.com/pokerth/pokerth.git + $ cd pokerth + $ git checkout stable ## don't miss to switch to stable version + +## Compilation +### Server (official): +``` +$ qmake CONFIG+="official_server" -spec linux-g++ pokerth.pro +$ make +``` +Binaries are left in (./bin/pokerth_server and ./chatcleaner) + +### Client: +``` +$ qmake CONFIG+="client" -spec linux-g++ pokerth.pro +$ make +``` +Binary is left in (./pokerth) + +## Options (for qmake) +* if development libraries are not in /usr (default) add: `PREFIX="/path_to_libraries" (ie: PREFIX="/usr/local")` +* if an specific compiler has to be set: `QMAKE_CC="C compiler" QMAKE_CXX="C++ compiler" (ie: QMAKE_CC="/usr/bin/gcc-5" QMAKE_CXX="/usr/bin/g++-5")` +* if an specific mode has to be set: `CONFIG+="mode" (ie: CONFIG+="client c++11")` + +## KNOWN BUGS +* (*) if compiled with GCC 6.x (or above) and QT 5, need to add `QMAKE_CFLAGS_ISYSTEM=""` to qmake command (It seems it's a QT bug: https://bugreports.qt.io/browse/QTBUG-53375) +* (**) if compiled with OpenSSL v1.1.X, see [this issue](https://github.com/pokerth/pokerth/issues/359) +* (***) if compiled with boost 1.70+, see [this issue](https://github.com/pokerth/pokerth/issues/368) \ No newline at end of file