hellboy
Intermediate OT User
Hello.
TL;DR
I tried compile TFS 1.3 on CentOS 8 based on this wiki page:
SELinux is enabled.
cmake throw:
-- Performing Test COMPILER_KNOWS_STDLIB - Failed
Longer answer
So far I created bash script:
There is problem with step cmake ..
If I ignore this, then in last step, make throw
I guess I have to install additional package. I don't know which one.
Anyone can help with this issue?
TL;DR
I tried compile TFS 1.3 on CentOS 8 based on this wiki page:
Compiling on CentOS
A free and open-source MMORPG server emulator written in C++ - otland/forgottenserver
github.com
cmake throw:
-- Performing Test COMPILER_KNOWS_STDLIB - Failed
Longer answer
So far I created bash script:
Code:
#!/bin/bash
set -e
# Enable PowerTools to install lua-devel
sudo sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-PowerTools.repo
sudo sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-Devel.repo
# Remove yum cache
sudo yum clean all
# Install this package to get pugixml-devel
sudo yum install epel-release
sudo yum install git cmake gcc-c++ boost-devel gmp-devel mariadb-devel
sudo yum install lua-devel pugixml-devel
# Install to fix cmake error
sudo yum install cryptopp-devel
# IT DOESN'T HELP
# sudo yum groups install "Development tools"
# Prepare tfs user and group
sudo groupadd tfs
sudo useradd -g tfs -s /bin/bash -m tfs
sudo chmod 750 /home/tfs
# Run code as tfs user
sudo su - tfs -c 'git clone --recursive https://github.com/otland/forgottenserver.git'
sudo su - tfs -c 'cd forgottenserver && mkdir build'
sudo su - tfs -c 'cd forgottenserver/build && cmake ..'
sudo su - tfs -c 'cd forgottenserver/build && make'
There is problem with step cmake ..
Code:
[tfs@localhost build]$ cmake ..
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- cotire 1.7.6 loaded.
-- Performing Test COMPILER_KNOWS_CXX11
-- Performing Test COMPILER_KNOWS_CXX11 - Success
-- Performing Test COMPILER_KNOWS_STDLIB
-- Performing Test COMPILER_KNOWS_STDLIB - Failed
-- Performing Test COMPILER_KNOWS_LTO
-- Performing Test COMPILER_KNOWS_LTO - Success
-- Found Crypto++: /usr/include
-- Found PugiXML: /usr/include
-- MySQL Include dir: /usr/include/mysql library dir: /usr/lib64
-- MySQL client libraries: /usr/lib64/libmysqlclient.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find LuaJIT (missing: LUA_LIBRARIES LUA_INCLUDE_DIR)
-- Found Lua: /usr/lib64/liblua.so;/usr/lib64/libm.so (found version "")
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- iostreams
-- regex
-- CXX target tfs cotired without unity build.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tfs/forgottenserver/build
If I ignore this, then in last step, make throw
Code:
[tfs@localhost build]$ make
[ 1%] Generating CXX prefix source cotire/tfs_CXX_prefix.cxx
[ 2%] Generating CXX prefix header cotire/tfs_CXX_prefix.hxx
[ 3%] Building CXX precompiled header cotire/tfs_CXX_prefix.hxx.gch
Scanning dependencies of target tfs
[ 4%] Building CXX object CMakeFiles/tfs.dir/src/otpch.cpp.o
cc1plus: error: /home/tfs/forgottenserver/build/cotire/tfs_CXX_prefix.hxx.gch: had text segment at different address [-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/tfs.dir/build.make:77: CMakeFiles/tfs.dir/src/otpch.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I guess I have to install additional package. I don't know which one.
Anyone can help with this issue?
Last edited: