Serwer on Linux

If your problem is with a specific version of the distro or core, look below. If you are unsure, this is your place.
Post Reply
b0ris
New User
Posts: 14
Joined: Wed Apr 19, 2017 12:20 am

Serwer on Linux

Post by b0ris »

Hello,
after a few years I decided to return to the old love which is pol.
I am sorry to say that after a few days of fighting with linux I fell.
I even had a problem with setting it to windows, it was surprisingly successful.

a few years ago, the first contact with linux and freebsd and pol core96 / 97 and no configuration problems.
Now Ubuntu 18, CentOS 7, Debian 9, I can't compile the source on any of them. And when I try to run the finished core (downloaded from the site), some files are still missing. e.g. libmysqlclient21 or others. Even though I installed the missing packages, still nothing. I rummaged through various forums and solved topics during these few days, none of them helped me.

I don't want to put it on windows because it's more resource-hungry.

Maybe there will be someone who has a moment to enter their server configuration. I mean gcc, cmake, openssl, system, what packages.
Alternatively, he will try to put on a fresh installation and describe step by step what he was doing.
From such a tutorial.

Greetings :)
Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: Serwer on Linux

Post by Nando »

Hi b0ris, sorry to hear the experience has been so bad. Which version of POL are you compiling?

On GitHub, our action builds for (I think) Ubuntu 20.04 here: https://github.com/polserver/polserver/ ... /build.yml

Your compilers need to have a recent version. For gcc, that's at least 9 and for clang 8. Either works. On Ubuntu 18, you might need to search how to update to a recent version of the compiler.

If you already have CMake installed (at least 3.16.2) and Ninja (1.9.0), the important commands for the first time compilation are:

Code: Select all

sudo apt-get install libmysqlclient-dev

cd bin-build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release -- -j 2
After that you should be able to compile with:

Code: Select all

cd bin-build
cmake --build . --config Release -- -j 2
If you want to create a nice package like those we have for download, you need to run target "package":

Code: Select all

cd bin-build
cmake --build . --config Release --target package
If those don't work, post the errors here and we can go through them together.

Alternatively you can also come online on Discord: the invitation for Discord is on the "Chat" section of the homepage or the top section of the boards.
b0ris
New User
Posts: 14
Joined: Wed Apr 19, 2017 12:20 am

Re: Serwer on Linux

Post by b0ris »

I launched 2 cheap VPS (1core 2gb ram) in parallel to save some time.
Below I will present what I did, I will try to present step by step ..

Start ~ 15:00

############################
#ubuntu 18.4 update to 20.1#
############################

-gcc-10.3.0 - fail 2 Errors 16:49
-gcc-9.1.0 - start 16:50 21:30 fail
-gcc-9.2.0 - still compile when write this post.


###########################
# ubuntu 18.4 #
###########################

-gcc-10.3.0 - fail 2 Errors

===========
-gcc-9.2.0 // work
===========

https://ftp.gwdg.de/pub/misc/gcc/releases/gcc-9.2.0/

Installing Requirements

Code: Select all

sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev gcc-multilib
./contrib/download_prerequisites
find /usr/ -name crti*
Then Output should be as:
/usr/lib/x86_64-linux-gnu/crti.o

Code: Select all

export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu

cd gcc-9.2.0
./configure
make -j $(nproc)
sudo make install

sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/bin/gcc 50 
==============
cmake 3.22.1
==============

Code: Select all

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget[code]

After that is finished

[code]wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
Next add the updated repository by typing in the following

Code: Select all

sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get update
Finally

Code: Select all

sudo apt-get install cmake
And it should be updated to the latest version. - work

==============
Ninja 1.8.2
==============

Code: Select all

sudo wget https://github.com/ninja-build/ninja/archive/refs/heads/master.zip

cmake -Bbuild-cmake
cmake --build build-cmake
============================================
clang version 9.0.0 (tags/RELEASE_900/final)
============================================


---------------------------------------------

Code: Select all

cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release		//work
---------------------------------------------
-- Build files have been written to: /home/polserver-master/bin-build


----------------------------------------
cmake --build . --config Release -- -j 2	//dont work

----------------------------------------

CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at CMakeLists.txt:31 (CMAKE_POLICY):
The OLD behavior for policy CMP0054 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:32 (CMAKE_POLICY):
The OLD behavior for policy CMP0045 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:33 (CMAKE_POLICY):
The OLD behavior for policy CMP0042 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:38 (CMAKE_POLICY):
The OLD behavior for policy CMP0059 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:39 (CMAKE_POLICY):
The OLD behavior for policy CMP0054 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
CMakeLists.txt:43 (find_package)


=================
when use

Code: Select all

./build_linux.sh
=================

####################################
## polserver - 100.1.0
## Never Gonna Give You Up
####################################
## CMake Version 3.22.1
## Generator Ninja
## Output Dir: /home/polserver-master/bin

Build type: Release
Compiler: GNU 9.2.0
Detected architecture is 64 bit
Platform is Little Endian
Compiling on processor x86_64
CMake Warning at cmake/init.cmake:260 (message):
Git not found unable to store revision
Call Stack (most recent call first):
CMakeLists.txt:129 (git_revision_target)


* antlr
* boost
- will build in /home/polserver-master/lib/boost_1_74_0 toolset=gcc
- will not extract
* escriptgrammarlib
* format
* kaitai
* curl
* tinyxml
* clib
* bscript
* plib
* pol
* ecompile
* runecl
* uoconvert
* uotool
* poltool
* (doc)
* (support)
activating test target
Git or clang-format not found for target 'clang_format'
adding test targets
test_escript
test_pol
test_pol_fixture
test_pol_only
unittest_pol
./build_linux.sh: 6: ./build_linux.sh: --: not found
#### Using 2 parallel compile jobs ###
make: *** No targets specified and no makefile found. Stop.

==============

when i download
polserver100.0.0-LINUX-Ubuntu18-2021-02-28.zip
from page and try to start ./pol

./pol: error while loading shared libraries: libmysqlclient.so.21: cannot open shared object file: No such file or directory

binary is from ubuntu 20, i have 18 on one vps. second vps still compile with ubuntu 20.x
Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: Serwer on Linux

Post by Nando »

You can try to install pkg-config and run the build again:

Code: Select all

apt-get install pkg-config

Cmake is complaining that it can't find that tool
b0ris
New User
Posts: 14
Joined: Wed Apr 19, 2017 12:20 am

Re: Serwer on Linux

Post by b0ris »

This morning I installed debian 11 on vps. Everything went much faster because I already had everything that was required in the repository.
I didn't have to compile anything from the source and it took me maybe 20 minutes. Not as before, over 3 hours

now it looks like this. after

Code: Select all

cmake --build. --config Release - -j 2
polserver-master/bin-build# cmake --build . --config Release -- -j 2
[2/492] Performing build step for 'boost'
FAILED: boost-prefix/src/boost-stamp/boost-build ../lib/boost_1_74_0/stage/lib/libboost_regex.a ../lib/boost_1_74_0/stage/lib/libboost_system.a ../lib/boost_1_74_0/stage/lib/libboost_thread.a /home/polserver-master/bin-build/boost-prefix/src/boost-stamp/boost-build /home/polserver-master/lib/boost_1_74_0/stage/lib/libboost_regex.a /home/polserver-master/lib/boost_1_74_0/stage/lib/libboost_system.a /home/polserver-master/lib/boost_1_74_0/stage/lib/libboost_thread.a
cd /home/polserver-master/lib/boost_1_74_0 && /usr/bin/cmake -P /home/polserver-master/bin-build/boost-prefix/src/boost-stamp/boost-build-Release.cmake && /usr/bin/cmake -E touch /home/polserver-master/bin-build/boost-prefix/src/boost-stamp/boost-build
CMake Error at /home/polserver-master/bin-build/boost-prefix/src/boost-stamp/boost-build-Release.cmake:37 (message):
Command failed: No such file or directory

'./b2' 'address-model=64' 'toolset=gcc' 'variant=release' 'link=static' 'runtime-link=static' '--layout=system' '--with-regex' '--with-system' '--with-thread' 'stage'

See also

/home/polserver-master/bin-build/boost-prefix/src/boost-stamp/boost-build-*.log


-- stdout output is:

-- stderr output is:

CMake Error at /home/polserver-master/bin-build/boost-prefix/src/boost-stamp/boost-build-Release.cmake:47 (message):
Stopping after outputting logs.


[3/492] Performing configure step for 'libantlr_ex'
FAILED: antlr/src/libantlr_ex-stamp/libantlr_ex-configure /home/polserver-master/bin-build/antlr/src/libantlr_ex-stamp/libantlr_ex-configure
cd /home/polserver-master/lib/antlr/build && /usr/bin/cmake -P /home/polserver-master/bin-build/antlr/src/libantlr_ex-stamp/libantlr_ex-configure-Release.cmake && /usr/bin/cmake -E touch /home/polserver-master/bin-build/antlr/src/libantlr_ex-stamp/libantlr_ex-configure
CMake Error at /home/polserver-master/bin-build/antlr/src/libantlr_ex-stamp/libantlr_ex-configure-Release.cmake:37 (message):
Command failed: 1

'/usr/bin/cmake' '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_INSTALL_PREFIX=/home/polserver-master/lib/antlr/install' '-DCMAKE_CXX_COMPILER=/usr/bin/c++' '-DCMAKE_C_COMPILER=/usr/bin/cc' '-DWITH_LIBCXX=Off' '-GNinja' '/home/polserver-master/lib/antlr'

See also

/home/polserver-master/bin-build/antlr/src/libantlr_ex-stamp/libantlr_ex-configure-*.log


-- stdout output is:
-- Building without demo. To enable demo build use: -DWITH_DEMO=True
-- Checking for module 'uuid'
-- No package 'uuid' found
-- Configuring incomplete, errors occurred!
See also "/home/polserver-master/lib/antlr/build/CMakeFiles/CMakeOutput.log".

-- stderr output is:
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at CMakeLists.txt:31 (CMAKE_POLICY):
The OLD behavior for policy CMP0054 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:32 (CMAKE_POLICY):
The OLD behavior for policy CMP0045 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:33 (CMAKE_POLICY):
The OLD behavior for policy CMP0042 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:38 (CMAKE_POLICY):
The OLD behavior for policy CMP0059 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:39 (CMAKE_POLICY):
The OLD behavior for policy CMP0054 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Error at /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:603 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
CMakeLists.txt:44 (pkg_check_modules)



CMake Error at /home/polserver-master/bin-build/antlr/src/libantlr_ex-stamp/libantlr_ex-configure-Release.cmake:47 (message):
Stopping after outputting logs.


ninja: build stopped: subcommand failed.
b0ris
New User
Posts: 14
Joined: Wed Apr 19, 2017 12:20 am

Re: Serwer on Linux

Post by b0ris »

I did not cope with the problem, I went the easier way and launched through the wine.
Post Reply