Compile pokerTH on Debian 11 doesnt work

Have Problems with PokerTH Installation? Here you will find Help.
User avatar
sp0ck
Posts: 238
Joined: Mon Mar 15, 2021 12:54 pm
Location: Flensburg
Been thanked: 14 times

I am not sure - what is the last command you entered which causes your last screenshot error output?

To me it looks like you do have to use an older version of protoc - or maybe the boost lib version is wrong.

EDIT: I would like to reproduce in a docker container - can you post a

Code: Select all

dpkg -l
output?
sam289
Posts: 15
Joined: Mon Nov 23, 2020 12:00 am

Not good idea to flood 1800 lines text here :D
So a link is better, I think.
https://davalo.de/storage/packetliste.txt

I tried many possibilities:

Code: Select all

qmake CONFIG+="c++11" pokerth.pro
qmake CONFIG+="client c++11" pokerth.pro
qmake "CONFIG+=client c++11" pokerth.pro
qmake CONFIG+="client c++11" pokerth.pro
qmake CONFIG+="client c++11" -spec linux-g++ pokerth.pro
make
But in the "Makefile" qmake produces I cant find "c++11" parameter.
Neither in the output after make.
I cant find "g++ -std=c++11 ..... " there.
User avatar
sp0ck
Posts: 238
Joined: Mon Mar 15, 2021 12:54 pm
Location: Flensburg
Been thanked: 14 times

Ok - I'm able to reproduce. It really is an asio boost issue:

https://stackoverflow.com/questions/658 ... ion-issues

https://stackoverflow.com/questions/651 ... as-default

I was not yet able to solve it ... maybe you try using an older asio boost lib while I'm figuring it out.

EDIT:

I played around - trying to compile with Debian Buster - asio boost seems fine - mysql++ bindings do not work. Best stable solution so far: use the attached Dockerfile (remove .rar extension - it's plain text) and create a container (exec pokerth_server binary manually inside the container to start server) - or just use Ubuntu 18.04 as env.

EDIT2:

I also added a docker-compose example showing the default ports to be exposed.
Attachments
docker-compose.yml.rar
(338 Bytes) Downloaded 145 times
Dockerfile.rar
(665 Bytes) Downloaded 145 times
sam289
Posts: 15
Joined: Mon Nov 23, 2020 12:00 am

I additionally install libboost-all-dev but no success.

I tried to install older libboost-all-dev for debian 10 with

Code: Select all

apt install libboost-all-dev=1.67.0.1 
but it failed. It can't find it.
For Debian 11 it is libboost-all-dev (1.74.0.3) .

Then I deleted all libboost* packages with

Code: Select all

apt-get --purge remove libboost*
Nevertheless I get same error in
/usr/include/c++/10/ext/new_allocator.h:150:4: ....<boost::asio....
and at the end of the make output as expected he misses the boost headers.

new_allocator.h file comes from "libstdc++-10-dev" package
Is from "build-essentials package" I think.
g++ compiler is in version 10 and he complains
about 2 errors in its own std new ? library.

I contacted the person at Debian who maintains pokerth
He said he hadn't touched pokerth at Debian in a long time.
He wanted to see the error messages.
User avatar
sp0ck
Posts: 238
Joined: Mon Mar 15, 2021 12:54 pm
Location: Flensburg
Been thanked: 14 times

If you really try to downgrade with apt - the following should work, as libboost1.6x is not present in bullseye repos anymore.

apt purge libboost-all-dev

replace /etc/apt/sources.list entries bullseye => buster (you can revert after downgrade) - do an apt update and install libboost-all-dev again ... buster repos do use libboost 1.6.x

... can you try that out? Not sure if that works in a clean way.
User avatar
sp0ck
Posts: 238
Joined: Mon Mar 15, 2021 12:54 pm
Location: Flensburg
Been thanked: 14 times

Here is a working solution for Debian 11 - downgrading libboost after "apt build-dep" command.

If you are not familiar with Dockerfile Syntax: just check the RUN commands in order - should be pretty straight forward - I left some comments, too.


There is no real option to adapt pokerth server code to 1.74 boost lib in the near future as we are currently focussing on a separate html5 game-client ... server code will propably not be touched at all next months.

... please take this solution as a kind of dirty "quick"-fix ... although this solution itself really was quite time consuming until figuring out a clean compilation from scratch ... I mean - who really likes downgrading c/c++ libs on a system? 😝

I strongly recommend the use of docker (or a similar container arch) for PokerTH game server setup.

... for us now an excellent opportunity to use this updated Dockerfile for current productive server - newer kernel seems always good ^^ ... tyvm for the topic!
Attachments
Dockerfile.txt
(2.67 KiB) Downloaded 142 times
sam289
Posts: 15
Joined: Mon Nov 23, 2020 12:00 am

Can't unrar the rar files after installing unrar-free package.
"unknown archive type"

I installed docker and it seems to work.
Now I am reading "Containerize an application" .... :roll:
And then "der Groschen ist gefallen" I got it.
Build an image ... before rename Dockerfile.txt to Dockerfile ;)
YEAH, my first docker experience :-)
A lot of stuff he is doing ...
It ends without errors.
And next I have find out how to start that virtual image ...

Debian pokerth maintainer can't find patches for our problem.
It seem they transfer the pokerth executable from one Debian version to another
without compiling it new an each version.
User avatar
sp0ck
Posts: 238
Joined: Mon Mar 15, 2021 12:54 pm
Location: Flensburg
Been thanked: 14 times

sam289 wrote: Sun Feb 26, 2023 10:39 am Debian pokerth maintainer can't find patches for our problem.
It seem they transfer the pokerth executable from one Debian version to another
without compiling it new an each version.
Really sounds a bit like. I experienced issues with buster and mysql++ bindings - and for bullseye the jump from libboost1.67 to 1.74 as current used version changed a few related function definitions which makes adaption of server code really mandatory.
sam289 wrote: Sun Feb 26, 2023 10:39 am YEAH, my first docker experience :-)
A lot of stuff he is doing ...
It ends without errors.
And next I have find out how to start that virtual image ...
Ok - sounds like you did it! 😎

The Dockerfile has a defined entry point followed by a command to be executed. chatcleaner and pokerth_server do start with each container (re-)start - so no worries about that. Please also be aware of the fact that with the official_server build variant there is a mysql database meant to be connected to the server (for login and ranking games stuff). I can hand over the table structure to play around with, when you have reached that point - check ~/.pokerth/config.xml for server configuration - mysql credentials are stored there for example.
sam289
Posts: 15
Joined: Mon Nov 23, 2020 12:00 am

Thanks for your effort. :-)
Do you know how to do the same with the application pokerth client ?
I wanted to change some code and step by step debugging.
Change stacks in BB, add buttons for 3x, 4x etc etc
User avatar
sp0ck
Posts: 238
Joined: Mon Mar 15, 2021 12:54 pm
Location: Flensburg
Been thanked: 14 times

Us this qmake command:

Code: Select all

qmake CONFIG+="client c++11" -spec linux-g++ pokerth.pro
Change it in the Dockerfile and re-build the image/container.
Post Reply