Page 2 of 3

Re: Compile pokerTH on Debian 8 doesnt work

Posted: Thu Feb 23, 2023 9:48 pm
by sp0ck
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?

Re: Compile pokerTH on Debian 8 doesnt work

Posted: Fri Feb 24, 2023 5:53 pm
by sam289
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.

Re: Compile pokerTH on Debian 11 doesnt work

Posted: Sat Feb 25, 2023 2:49 am
by sp0ck
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.

Re: Compile pokerTH on Debian 11 doesnt work

Posted: Sat Feb 25, 2023 10:14 pm
by sam289
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.

Re: Compile pokerTH on Debian 11 doesnt work

Posted: Sun Feb 26, 2023 4:10 am
by sp0ck
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.

Re: Compile pokerTH on Debian 11 doesnt work

Posted: Sun Feb 26, 2023 8:03 am
by sp0ck
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!

Re: Compile pokerTH on Debian 11 doesnt work

Posted: Sun Feb 26, 2023 10:39 am
by sam289
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.

Re: Compile pokerTH on Debian 11 doesnt work

Posted: Sun Feb 26, 2023 12:04 pm
by sp0ck
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.

Re: Compile pokerTH on Debian 11 doesnt work

Posted: Mon Feb 27, 2023 5:25 pm
by sam289
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

Re: Compile pokerTH on Debian 11 doesnt work

Posted: Tue Feb 28, 2023 5:48 am
by sp0ck
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.