• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.5 compilation

Tubeshop

Member
Joined
Nov 23, 2023
Messages
173
Reaction score
19

I am compiling tfs 1.5 from the link above on ubuntu and already in the first step I have an error:

sudo apt install git cmake build-essential liblua5.4-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libpugixml-dev libcrypto++-dev libfmt-dev sol2 g++-10

error:

E: Unable to locate package sol2

I was looking for information on the Internet, but I couldn't find how to add the sol2 package
 

I am compiling tfs 1.5 from the link above on ubuntu and already in the first step I have an error:

sudo apt install git cmake build-essential liblua5.4-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libpugixml-dev libcrypto++-dev libfmt-dev sol2 g++-10

error:

E: Unable to locate package sol2

I was looking for information on the Internet, but I couldn't find how to add the sol2 package
Try from this repo:

 
try this link and do:

and i see:
ubuntu@vps-1a50b3a5:~/sol2/build$ cmake ..
CMake Error at /usr/share/cmake-3.22/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
Could not find compiler set in environment variable CXX:

/usr/bin/g++-10.

Call Stack (most recent call first):
CMakeLists.txt:30 (project)
 

I am compiling tfs 1.5 from the link above on ubuntu and already in the first step I have an error:

sudo apt install git cmake build-essential liblua5.4-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libpugixml-dev libcrypto++-dev libfmt-dev sol2 g++-10

error:

E: Unable to locate package sol2

I was looking for information on the Internet, but I couldn't find how to add the sol2 package
try this
Lua:
sudo apt update
apt search sol2

next methods

git clone https://github.com/ThePhD/sol2.git
cd sol2

installing


mkdir build
cd build
cmake ..
sudo make install

checking have this
sudo apt install liblua5.4-dev

because sol2 like this
 
I'm still working and I can't compile. I still have the error
E: Unable to locate package sol2
and after trying to run the compilation on Ubuntu 20.04 I still have other errors
 
I'm still working and I can't compile. I still have the error
E: Unable to locate package sol2
and after trying to run the compilation on Ubuntu 20.04 I still have other errors

download "include" folder from this repository and rename it to sol, then put it in /usr/include on your ubuntu
Post automatically merged:

I am compiling tfs 1.5 from the link above
btw this repo has some issues with src/CMakeLists.txt
First of all you must comment with # the first line, because luamodules is nowhere in this repository. You need as well delete " /> from line 36 to 69
 
Last edited:
thanks for help :)
compilation throws a lot of errors. I removed the /> signs but it didn't help. there are still errors.
TFS 1.5 from Nekiro compiles without any problems
TFS 1.5 Edited from Sarah Wesker I can't cope. has a lot of problems

-- Found Lua54: /usr/lib/x86_64-linux-gnu/liblua5.4.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR")
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.66.0") found components: system iostreams
CMake Warning (dev) at src/CMakeLists.txt:36:
Syntax Warning in cmake code at column 45

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:38:
Syntax Warning in cmake code at column 47

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:40:
Syntax Warning in cmake code at column 46

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:42:
Syntax Warning in cmake code at column 42

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:44:
Syntax Warning in cmake code at column 43

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:46:
Syntax Warning in cmake code at column 43

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:48:
Syntax Warning in cmake code at column 46

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:50:
Syntax Warning in cmake code at column 45

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:52:
Syntax Warning in cmake code at column 49

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:54:
Syntax Warning in cmake code at column 52

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:56:
Syntax Warning in cmake code at column 44

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:58:
Syntax Warning in cmake code at column 44

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:61:
Syntax Warning in cmake code at column 44

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:63:
Syntax Warning in cmake code at column 46

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:65:
Syntax Warning in cmake code at column 42

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:67:
Syntax Warning in cmake code at column 46

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at src/CMakeLists.txt:214:
Parse error. Function missing ending ")". Instead found unterminated
string with text " />

${CMAKE_CURRENT_LIST_DIR}/mailbox.cpp

${CMAKE_CURRENT_LIST_DIR}/map.cpp

${CMAKE_CURRENT_LIST_DIR}/matrixarea.cpp

${CMAKE_CURRENT_LIST_DIR}/monster.cpp

${CMAKE_CURRENT_LIST_DIR}/monsters.cpp

${CMAKE_CURRENT_LIST_DIR}/movement.cpp

${CMAKE_CURRENT_LIST_DIR}/networkmessage.cpp

${CMAKE_CURRENT_LIST_DIR}/npc.cpp

${CMAKE_CURRENT_LIST_DIR}/otserv.cpp

${CMAKE_CURRENT_LIST_DIR}/outfit.cpp

${CMAKE_CURRENT_LIST_DIR}/outputmessage.cpp

${CMAKE_CURRENT_LIST_DIR}/party.cpp

${CMAKE_CURRENT_LIST_DIR}/player.cpp

${CMAKE_CURRENT_LIST_DIR}/position.cpp

${CMAKE_CURRENT_LIST_DIR}/protocol.cpp

${CMAKE_CURRENT_LIST_DIR}/protocolgame.cpp

${CMAKE_CURRENT_LIST_DIR}/protocollogin.cpp

${CMAKE_CURRENT_LIST_DIR}/protocolold.cpp

${CMAKE_CURRENT_LIST_DIR}/protocolstatus.cpp

${CMAKE_CURRENT_LIST_DIR}/raids.cpp

${CMAKE_CURRENT_LIST_DIR}/rsa.cpp

${CMAKE_CURRENT_LIST_DIR}/scheduler.cpp

${CMAKE_CURRENT_LIST_DIR}/script.cpp

${CMAKE_CURRENT_LIST_DIR}/scriptmanager.cpp

${CMAKE_CURRENT_LIST_DIR}/server.cpp

${CMAKE_CURRENT_LIST_DIR}/signals.cpp

${CMAKE_CURRENT_LIST_DIR}/spawn.cpp

${CMAKE_CURRENT_LIST_DIR}/spells.cpp

${CMAKE_CURRENT_LIST_DIR}/talkaction.cpp

${CMAKE_CURRENT_LIST_DIR}/tasks.cpp

${CMAKE_CURRENT_LIST_DIR}/teleport.cpp

${CMAKE_CURRENT_LIST_DIR}/thing.cpp

${CMAKE_CURRENT_LIST_DIR}/tile.cpp

${CMAKE_CURRENT_LIST_DIR}/tools.cpp

${CMAKE_CURRENT_LIST_DIR}/trashholder.cpp

${CMAKE_CURRENT_LIST_DIR}/vocation.cpp

${CMAKE_CURRENT_LIST_DIR}/weapons.cpp

${CMAKE_CURRENT_LIST_DIR}/wildcardtree.cpp

${CMAKE_CURRENT_LIST_DIR}/xtea.cpp

${tfs_luamodules_SRC})



set(tfs_HDR

${CMAKE_CURRENT_LIST_DIR}/otpch.h

${CMAKE_CURRENT_LIST_DIR}/account.h

${CMAKE_CURRENT_LIST_DIR}/actions.h

${CMAKE_CURRENT_LIST_DIR}/ban.h

${CMAKE_CURRENT_LIST_DIR}/baseevents.h

${CMAKE_CURRENT_LIST_DIR}/bed.h

${CMAKE_CURRENT_LIST_DIR}/chat.h

${CMAKE_CURRENT_LIST_DIR}/combat.h

${CMAKE_CURRENT_LIST_DIR}/condition.h

${CMAKE_CURRENT_LIST_DIR}/configmanager.h

${CMAKE_CURRENT_LIST_DIR}/connection.h

${CMAKE_CURRENT_LIST_DIR}/const.h

${CMAKE_CURRENT_LIST_DIR}/container.h

${CMAKE_CURRENT_LIST_DIR}/creatureevent.h

${CMAKE_CURRENT_LIST_DIR}/creature.h

${CMAKE_CURRENT_LIST_DIR}/cylinder.h

${CMAKE_CURRENT_LIST_DIR}/database.h

${CMAKE_CURRENT_LIST_DIR}/databasemanager.h

${CMAKE_CURRENT_LIST_DIR}/databasetasks.h

${CMAKE_CURRENT_LIST_DIR}/definitions.h

${CMAKE_CURRENT_LIST_DIR}/depotchest.h

${CMAKE_CURRENT_LIST_DIR}/depotlocker.h

${CMAKE_CURRENT_LIST_DIR}/enums.h

${CMAKE_CURRENT_LIST_DIR}/events.h

${CMAKE_CURRENT_LIST_DIR}/fileloader.h

${CMAKE_CURRENT_LIST_DIR}/game.h

${CMAKE_CURRENT_LIST_DIR}/globalevent.h

${CMAKE_CURRENT_LIST_DIR}/groups.h

${CMAKE_CURRENT_LIST_DIR}/guild.h

${CMAKE_CURRENT_LIST_DIR}/house.h

${CMAKE_CURRENT_LIST_DIR}/housetile.h

${CMAKE_CURRENT_LIST_DIR}/iologindata.h

${CMAKE_CURRENT_LIST_DIR}/iomap.h

${CMAKE_CURRENT_LIST_DIR}/iomapserialize.h

${CMAKE_CURRENT_LIST_DIR}/item.h

${CMAKE_CURRENT_LIST_DIR}/itemloader.h

${CMAKE_CURRENT_LIST_DIR}/items.h

${CMAKE_CURRENT_LIST_DIR}/lockfree.h

${CMAKE_CURRENT_LIST_DIR}/luascript.h

${CMAKE_CURRENT_LIST_DIR}/luavariant.h

${CMAKE_CURRENT_LIST_DIR}/mailbox.h

${CMAKE_CURRENT_LIST_DIR}/map.h

${CMAKE_CURRENT_LIST_DIR}/matrixarea.h

${CMAKE_CURRENT_LIST_DIR}/monster.h

${CMAKE_CURRENT_LIST_DIR}/monsters.h

${CMAKE_CURRENT_LIST_DIR}/movement.h

${CMAKE_CURRENT_LIST_DIR}/networkmessage.h

${CMAKE_CURRENT_LIST_DIR}/npc.h

${CMAKE_CURRENT_LIST_DIR}/otserv.h

${CMAKE_CURRENT_LIST_DIR}/outfit.h

${CMAKE_CURRENT_LIST_DIR}/outputmessage.h

${CMAKE_CURRENT_LIST_DIR}/party.h

${CMAKE_CURRENT_LIST_DIR}/player.h

${CMAKE_CURRENT_LIST_DIR}/position.h

${CMAKE_CURRENT_LIST_DIR}/protocolgame.h

${CMAKE_CURRENT_LIST_DIR}/protocol.h

${CMAKE_CURRENT_LIST_DIR}/protocollogin.h

${CMAKE_CURRENT_LIST_DIR}/protocolold.h

${CMAKE_CURRENT_LIST_DIR}/protocolstatus.h

${CMAKE_CURRENT_LIST_DIR}/pugicast.h

${CMAKE_CURRENT_LIST_DIR}/raids.h

${CMAKE_CURRENT_LIST_DIR}/rsa.h

${CMAKE_CURRENT_LIST_DIR}/scheduler.h

${CMAKE_CURRENT_LIST_DIR}/script.h

${CMAKE_CURRENT_LIST_DIR}/scriptmanager.h

${CMAKE_CURRENT_LIST_DIR}/server.h

${CMAKE_CURRENT_LIST_DIR}/signals.h

${CMAKE_CURRENT_LIST_DIR}/spawn.h

${CMAKE_CURRENT_LIST_DIR}/spectators.h

${CMAKE_CURRENT_LIST_DIR}/spells.h

${CMAKE_CURRENT_LIST_DIR}/talkaction.h

${CMAKE_CURRENT_LIST_DIR}/tasks.h

${CMAKE_CURRENT_LIST_DIR}/teleport.h

${CMAKE_CURRENT_LIST_DIR}/thing.h

${CMAKE_CURRENT_LIST_DIR}/thread_holder_base.h

${CMAKE_CURRENT_LIST_DIR}/tile.h

${CMAKE_CURRENT_LIST_DIR}/tools.h

${CMAKE_CURRENT_LIST_DIR}/town.h

${CMAKE_CURRENT_LIST_DIR}/trashholder.h

${CMAKE_CURRENT_LIST_DIR}/vocation.h

${CMAKE_CURRENT_LIST_DIR}/weapons.h

${CMAKE_CURRENT_LIST_DIR}/wildcardtree.h

${CMAKE_CURRENT_LIST_DIR}/xtea.h

${tfs_luamodules_HDR})



set(tfs_MAIN ${CMAKE_CURRENT_LIST_DIR}/main.cpp PARENT_SCOPE)



add_library(tfslib ${tfs_SRC})

include_directories(/usr/include/lua5.4)

target_link_libraries(tfslib PRIVATE

Boost::iostreams

Boost::system

fmt::fmt

pugixml::pugixml

${CMAKE_THREAD_LIBS_INIT}

${Crypto++_LIBRARIES}

${LUA_LIBRARIES}

${MYSQL_CLIENT_LIBS}

)

set_target_properties(tfslib PROPERTIES UNITY_BUILD ON)



add_custom_target(format COMMAND /usr/bin/clang-format -style=file -i
${tfs_HDR} ${tfs_SRC} ${tfs_MAIN})

".


-- Configuring incomplete, errors occurred!
 
thanks a lot for your help :) now I have an error caused by sol2 and I can't install sol2.

you wrote that I should download the include folder. is this the one in the attachment?

[ 12%] Checking the git repository for changes...
[ 12%] Built target check_git
[ 25%] Building CXX object src/CMakeFiles/tfslib.dir/Unity/unity_2_cxx.cxx.o
[ 37%] Building CXX object src/CMakeFiles/tfslib.dir/Unity/unity_1_cxx.cxx.o
In file included from /home/ubuntu/forgottenserver-downgrade/src/item.h:8,
from /home/ubuntu/forgottenserver-downgrade/src/container.h:8,
from /home/ubuntu/forgottenserver-downgrade/src/house.h:7,
from /home/ubuntu/forgottenserver-downgrade/src/map.h:9,
from /home/ubuntu/forgottenserver-downgrade/src/creature.h:11,
from /home/ubuntu/forgottenserver-downgrade/src/monsters.h:7,
from /home/ubuntu/forgottenserver-downgrade/src/monsters.cpp:6,
from /home/ubuntu/forgottenserver-downgrade/build/src/CMakeFiles/tfslib.dir/Unity/unity_1_cxx.cxx:3:
/home/ubuntu/forgottenserver-downgrade/src/items.h:12:10: fatal error: sol/sol.hpp: No such file or directory
12 | #include <sol/sol.hpp>
| ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/tfslib.dir/build.make:90: src/CMakeFiles/tfslib.dir/Unity/unity_1_cxx.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:156: src/CMakeFiles/tfslib.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
ubuntu@vps-1a50b3a5:~/forgottenserver-downgrade/build$
 

Attachments

Last edited:
Thank you very much for your help. I managed to take it a step further, but now I have the following problem:
I looked for a solution on Google but there is nothing. the whole thing is here. the errors were too long to paste into the post [ 75%] Linking CXX executable tfs/usr/bin/ld: src/libtfslib.a(unity_0_cxx.cxx. - Pastebin.com (https://pastebin.com/WyEjBKsg)
s nothing. the whole thing is here. the errors were too long to paste into the post

[ 75%] Linking CXX executable tfs
/usr/bin/ld: src/libtfslib.a(unity_0_cxx.cxx.o): warning: relocation against _ZN4Item5itemsE' in read-only section .text._ZNK4Item13getThrowRangeEv[_ZNK4Item13getThrowRangeEv]'
/usr/bin/ld: /tmp/tfs.ssHTPJ.ltrans0.ltrans.o: in function `main':
<artificial:mad:.text.startup+0x12f): undefined reference to `explodeString(std::basic_string_view<char, std::char_traits<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/usr/bin/ld: <artificial:mad:.text.startup+0x2ba): undefined reference to `ConfigManager::setString(ConfigKeysString, std::basic_string_view<char, std::char_traits<char> >)'
 
Thank you very much for your help. I managed to take it a step further, but now I have the following problem:
I looked for a solution on Google but there is nothing. the whole thing is here. the errors were too long to paste into the post [ 75%] Linking CXX executable tfs/usr/bin/ld: src/libtfslib.a(unity_0_cxx.cxx. - Pastebin.com (https://pastebin.com/WyEjBKsg)
s nothing. the whole thing is here. the errors were too long to paste into the post
I have no idea why it is failing to compile at this point. Most of the errors are related to linker /usr/bin/ld so maybe try updating this file for example with
Code:
sudo apt install --reinstall binutils
You can also try updateing libs and your software with
Code:
sudo apt install --reinstall liblua5.4-0
Code:
sudo apt install --reinstall liblua5.4-dev
Code:
sudo apt install --reinstall g++-10
Code:
sudo apt update
Code:
sudo apt upgrade
If it still throws errors then redownload whole engine repository. Maybe you have accidentally messed a file or two.
 
Back
Top