Debian src build

Here you can post threads on the development of the current release of the core (100)

Moderator: POL Developer

Post Reply
Bretheren
New User
Posts: 5
Joined: Mon Aug 20, 2018 3:45 pm

Debian src build

Post by Bretheren »

Hi All,
I'm trying to compile pol from source on Debian 11 ("Bullseye"). I am following this post by Boris (https://forums.polserver.com/viewtopic. ... ssl#p25911) which is essentially the following:

Code: Select all

cd bin-build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release -- -j 2
I have made incremental progress by ensuring the following build dependencies are present: build-essential, clang, libssl-dev, libmysqlclient-dev, pkg-config, clang-format.

Code: Select all

apt-get install build-essential, clang, libssl-dev, libmysqlclient-dev, pkg-config, clang-format
However while running "cmake --build . --config Release -- -j 2" I have come unstuck with error:

Code: Select all

CMake Error at /home/<username>/pol/polserver-100.0.0/bin-build/boost_extract-prefix/src/boost_extract-stamp/boost_extract-download-Release-impl.cmake:9 (message):
  Command failed (1):

   '/usr/bin/cmake' '-P' '/home/<username>/pol/polserver-100.0.0/bin-build/boost_extract-prefix/src/boost_extract-stamp/download-boost_extract.cmake'
By running the above cmake command manually I get:

Code: Select all

/usr/bin/cmake -P /home/<username>/pol/polserver-100.0.0/bin-build/boost_extract-prefix/src/boost_extract-stamp/downl
oad-boost_extract.cmake
-- File already exists but no hash specified (use URL_HASH):
  file='/home/<username>/pol/polserver-100.0.0/bin-build/boost_extract-prefix/src/boost_1_74_0.tar.bz2'
Old file will be removed and new file downloaded from URL.
-- Downloading...
   dst='/home/<username>/pol/polserver-100.0.0/bin-build/boost_extract-prefix/src/boost_1_74_0.tar.bz2'
   timeout='none'
-- Using src='https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2'
-- Retrying...
-- Using src='https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2'
-- Retry after 5 seconds (attempt #2) ...
-- Using src='https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2'
-- Retry after 5 seconds (attempt #3) ...
-- Using src='https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2'
-- Retry after 15 seconds (attempt #4) ...
-- Using src='https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2'
-- Retry after 60 seconds (attempt #5) ...
-- Using src='https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2'
CMake Error at boost_extract-prefix/src/boost_extract-stamp/download-boost_extract.cmake:159 (message):
  Each download failed!
Looks like it's having issues downloading a package. A browser/manual check of "https://dl.bintray.com/boostorg/release ... _0.tar.bz2" results in a HTTP 502 Bad Gateway error. Seems like the src locations are broken in what I believe is a generated file (polserver-100.0.0/bin-build/boost_extract-prefix/src/boost_extract-stamp/download-boost_extract.cmake). I believe it's generated as I'm not able to find the above URL in git. I'm not really familiar with cmake so would appreciate any help, meanwhile I'll keep plugging away.

Cheers,
Bretheren

I should note that I'm not sure why boost src needs to be downloaded, as I have the following boost packages installed (as part of libboost-all-dev):

Code: Select all

libboost-all-dev
libboost-atomic-dev:amd64
libboost-atomic1.74-dev:amd64
libboost-atomic1.74.0:amd64
libboost-chrono-dev:amd64
libboost-chrono1.74-dev:amd64
libboost-chrono1.74.0:amd64
libboost-container-dev:amd64
libboost-container1.74-dev:amd64
libboost-container1.74.0:amd64
libboost-context-dev:amd64
libboost-context1.74-dev:amd64
libboost-context1.74.0:amd64
libboost-coroutine-dev:amd64
libboost-coroutine1.74-dev:amd64
libboost-coroutine1.74.0:amd64
libboost-date-time-dev:amd64
libboost-date-time1.74-dev:amd64
libboost-date-time1.74.0:amd64
libboost-dev:amd64
libboost-exception-dev:amd64
libboost-exception1.74-dev:amd64
libboost-fiber-dev:amd64
libboost-fiber1.74-dev:amd64
libboost-fiber1.74.0:amd64
libboost-filesystem-dev:amd64
libboost-filesystem1.74-dev:amd64
libboost-filesystem1.74.0:amd64
libboost-graph-dev:amd64
libboost-graph-parallel-dev
libboost-graph-parallel1.74-dev
libboost-graph-parallel1.74.0
libboost-graph1.74-dev:amd64
libboost-graph1.74.0:amd64
libboost-iostreams-dev:amd64
libboost-iostreams1.74-dev:amd64
libboost-iostreams1.74.0:amd64
libboost-locale-dev:amd64
libboost-locale1.74-dev:amd64
libboost-locale1.74.0:amd64
libboost-log-dev
libboost-log1.74-dev
libboost-log1.74.0
libboost-math-dev:amd64
libboost-math1.74-dev:amd64
libboost-math1.74.0:amd64
libboost-mpi-dev
libboost-mpi-python-dev
libboost-mpi-python1.74-dev
libboost-mpi-python1.74.0
libboost-mpi1.74-dev
libboost-mpi1.74.0
libboost-nowide-dev
libboost-nowide1.74-dev
libboost-nowide1.74.0
libboost-numpy-dev
libboost-numpy1.74-dev
libboost-numpy1.74.0
libboost-program-options-dev:amd64
libboost-program-options1.74-dev:amd64
libboost-program-options1.74.0:amd64
libboost-python-dev
libboost-python1.74-dev
libboost-python1.74.0
libboost-random-dev:amd64
libboost-random1.74-dev:amd64
libboost-random1.74.0:amd64
libboost-regex-dev:amd64
libboost-regex1.74-dev:amd64
libboost-regex1.74.0:amd64
libboost-serialization-dev:amd64
libboost-serialization1.74-dev:amd64
libboost-serialization1.74.0:amd64
libboost-stacktrace-dev:amd64
libboost-stacktrace1.74-dev:amd64
libboost-stacktrace1.74.0:amd64
libboost-system-dev:amd64
libboost-system1.74-dev:amd64
libboost-system1.74.0:amd64
libboost-test-dev:amd64
libboost-test1.74-dev:amd64
libboost-test1.74.0:amd64
libboost-thread-dev:amd64
libboost-thread1.74-dev:amd64
libboost-thread1.74.0:amd64
libboost-timer-dev:amd64
libboost-timer1.74-dev:amd64
libboost-timer1.74.0:amd64
libboost-tools-dev
libboost-type-erasure-dev:amd64
libboost-type-erasure1.74-dev:amd64
libboost-type-erasure1.74.0:amd64
libboost-wave-dev:amd64
libboost-wave1.74-dev:amd64
libboost-wave1.74.0:amd64
libboost1.74-dev:amd64
libboost1.74-tools-dev
Bretheren
New User
Posts: 5
Joined: Mon Aug 20, 2018 3:45 pm

Re: Debian src build

Post by Bretheren »

Looks like the URL for boost_1_74_0.tar.bz2 was updated in code with the following patch: https://github.com/polserver/polserver/ ... cd26cc2455
Bretheren
New User
Posts: 5
Joined: Mon Aug 20, 2018 3:45 pm

Re: Debian src build

Post by Bretheren »

Ok, source has been built successfully on Debian 11. Using the following:
Using the nightly source (https://github.com/polserver/polserver/ ... ase.tar.gz)

Code: Select all

apt-get install build-essential clang clang-format libssl-dev libmysqlclient-dev libantlr-dev libtinyxml-dev uuid-dev
cd bin-build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release -- -j 2
I did get a compile warning of an out of bounds short unsigned int

Code: Select all

../pol-core/pol/module/unimod.cpp: In function ‘void Pol::Core::handle_unicode_prompt(Pol::Network::Client*, Pol::Core::PKTBI_C2*)’:
../pol-core/pol/module/unimod.cpp:63:23: warning: array subscript 200 is above array bounds of ‘u16 [2]’ {aka ‘short unsigned int [2]’} [-Warray-bounds]
   63 |     msg->wtext[textlen] = 0x0000;
      |     ~~~~~~~~~~~~~~~~~~^
In file included from /home/brett/pol/polserver-NightlyRelease/pol-core/pol/StdAfx.h:28,
                 from /home/brett/pol/polserver-NightlyRelease/bin-build/pol-core/pol/CMakeFiles/pol.dir/cmake_pch.hxx:5,
                 from <command-line>:
/home/brett/pol/polserver-NightlyRelease/pol-core/pol/network/pktboth.h:927:7: note: while referencing ‘Pol::Core::PKTBI_C2::wtext’
  927 |   u16 wtext[2];  // wide-character, double-null terminated
      |       ^~~~~
Let me know if you want a package of the compile (but you should probably do it yourself for security reasons).
Bretheren
New User
Posts: 5
Joined: Mon Aug 20, 2018 3:45 pm

Re: Debian src build

Post by Bretheren »

Looks like I've hit a blocker I'm not able to get past. I don't think the below segmentation fault is related to duplicate object types (as I was getting different errors for such errors (not warnings), but happy to hear otherwise:

Code: Select all

...
Warning! pkg/systems/housing/transferDeed.ecl does not exist!
Warning! objtype 0x30296 : ObjtypeName 'smallboat' is the same as objtype 0X11000
Warning! objtype 0x3029A : ObjtypeName 'smalldragonboat' is the same as objtype 0X11004
Warning! objtype 0x3029E : ObjtypeName 'mediumboat' is the same as objtype 0X11008
Warning! objtype 0x302A2 : ObjtypeName 'mediumdragonboat' is the same as objtype 0X1100C
Warning! objtype 0x302A6 : ObjtypeName 'largeboat' is the same as objtype 0X11010
Warning! objtype 0x302AA : ObjtypeName 'largedragonboat' is the same as objtype 0X11014
Warning! objtype 0x20BCF : ObjtypeName 'woodensign1' is the same as objtype 0XBCF
Warning! objtype 0x20BD0 : ObjtypeName 'woodensign' is the same as objtype 0XBD0
Warning! objtype 0x260FA : ObjtypeName 'staticsign' is the same as objtype 0X160FF
Warning! objtype 0x28888 : ObjtypeName 'transferdeed' is the same as objtype 0X160FE
INSTALLING: Combat Advancement hook...
INSTALLING: Parry hook...
INSTALLING: Combat hook...
Using NewCombatAdvancement...
Signal "SIGSEGV"(11: invalid memory reference) detected.
Segmentation fault detected - null pointer reference
Signal code is 1
########################################################################################
POL will exit now. Please, post the following to the forum: http://forums.polserver.com/.
#00 0x0000000021162fb0 in :[0x484fb0] from ./pol
#01 0x0000000021164e90 in :[0x486e90] from ./pol
#02 0x0000000018820140 in :[0x14140] from /lib/x86_64-linux-gnu/libpthread.so.0
#03 0x0000000021026aa0 in :[0x348aa0] from ./pol
#04 0x0000000021026f33 in :[0x348f33] from ./pol
#05 0x0000000021029949 in :[0x34b949] from ./pol
#06 0x0000000020f9e805 in :[0x2c0805] from ./pol
#07 0x0000000020fa035f in :[0x2c235f] from ./pol
#08 0x0000000020dac6a8 in :[0xce6a8] from ./pol
#09 0x0000000021167f51 in :[0x489f51] from ./pol
#10 0x0000000020dac70e in :[0xce70e] from ./pol
#11 0x00000000182f0d0a in __libc_start_main:[0xea] from /lib/x86_64-linux-gnu/libc.so.6
#12 0x0000000020dbc1ba in :[0xde1ba] from ./pol
Admin contact:
Executable: ./pol
Start time: [08/13 15:00:47]
Current time: [08/13 15:00:49]

Stack trace:
#00 0x0000000021162fb0 in :[0x484fb0] from ./pol
#01 0x0000000021164e90 in :[0x486e90] from ./pol
#02 0x0000000018820140 in :[0x14140] from /lib/x86_64-linux-gnu/libpthread.so.0
#03 0x0000000021026aa0 in :[0x348aa0] from ./pol
#04 0x0000000021026f33 in :[0x348f33] from ./pol
#05 0x0000000021029949 in :[0x34b949] from ./pol
#06 0x0000000020f9e805 in :[0x2c0805] from ./pol
#07 0x0000000020fa035f in :[0x2c235f] from ./pol
#08 0x0000000020dac6a8 in :[0xce6a8] from ./pol
#09 0x0000000021167f51 in :[0x489f51] from ./pol
#10 0x0000000020dac70e in :[0xce70e] from ./pol
#11 0x00000000182f0d0a in __libc_start_main:[0xea] from /lib/x86_64-linux-gnu/libc.so.6
#12 0x0000000020dbc1ba in :[0xde1ba] from ./pol

Compiler: gcc 10.2.1
Compile time: Aug 12 2022 14:28:17
Build target: Linux 64bit (Rev. Non-Git)
Build revision: 100.1.0 - Never Gonna Give You Up
GNU C library (compile time): 2.31

########################################################################################
Post Reply