• 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!

Compiling [Linux] Ultimate compile guide for Debian (Ubuntu included)

trunk.r3884 Debian 6.0

any ideas ;/ ?

Code:
g++ -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__USE_SQLITE__   -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe   -o theforgottenserver actions.o  allocator.o baseevents.o beds.o chat.o combat.o condition.o configmanager.o connection.o container.o creature.o creatureevent.o cylinder.o database.o databasemanager.o databasemysql.o databasesqlite.o  depot.o dispatcher.o exception.o fileloader.o game.o  globalevent.o group.o house.o housetile.o ioban.o ioguild.o iologindata.o iomap.o iomapserialize.o item.o itemattributes.o items.o luascript.o mailbox.o manager.o map.o monster.o monsters.o movement.o networkmessage.o npc.o otserv.o outfit.o outputmessage.o party.o player.o position.o protocol.o protocolgame.o protocolhttp.o protocollogin.o protocolold.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o spawn.o spells.o status.o talkaction.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o waitlist.o weapons.o vocation.o -llua5.1   -lsqlite3 -lmysqlclient -lcryptopp -lboost_filesystem-mt -lboost_date_time-mt -lboost_system-mt -lboost_regex-mt -lboost_thread-mt -lz -lgmp  -lxml2
actions.o: In function `global constructors keyed to _ZN7ActionsC2Ev':
actions.cpp:(.text+0x3008): undefined reference to `boost::system::get_posix_category()'
actions.cpp:(.text+0x3014): undefined reference to `boost::system::get_posix_category()'
baseevents.o: In function `global constructors keyed to _ZN10BaseEvents11loadFromXmlEv':
baseevents.cpp:(.text+0x1cc8): undefined reference to `boost::system::get_posix_category()'
baseevents.cpp:(.text+0x1cd4): undefined reference to `boost::system::get_posix_category()'
beds.o: In function `global constructors keyed to _ZN7BedItem8readAttrE11AttrTypes_tR10PropStream':
beds.cpp:(.text+0x1388): undefined reference to `boost::system::get_posix_category()'
beds.o:beds.cpp:(.text+0x1394): more undefined references to `boost::system::get_posix_category()' follow
collect2: ld returned 1 exit status
make[1]: *** [theforgottenserver] Błąd 1
make[1]: Opuszczenie katalogu `/root/server1/trunk.r3777'
make: *** [all] Błąd 2
 
To fix errors with "All warnings treated as errors" u need to remove -Werror from all makefiles in source directory
 
I have 2 questions.
I have a Linux Debian vServer with Confixx.
1.: Where is the folder where i put the things of my website???
2.: When I start TFS with SSH(Putty) the Server runs and I can login. But when i close SSH(Putty) the Server close too. So how i make it that Server is always running???
I start the Server with the Command of the TFS Readme(cd /root/server/0.2pl19/ && ./TheForgottenServer)

because you need before start server , write screen , then write your command to start server , and if you want to close putty cick ctrl + a +d then close your putty and server will be online during your putty down
 
yes but that is for crying damson, mystic spirit dont have the build.sh, i was following the tutorial made by elf, and it says, after getting the forgottenserver folder, just tipe make to finish, but there is no makefile so i dont know what to do :(
 
build.sh is just a really simple script. serioulsy, don't worry about if you have it or not.

install CCache yourself and make some exports and aliases.

Code:
sudo su #become root
cd /usr/local/src
wget http://samba.org/ftp/ccache/ccache-3.1.8.tar.xz
tar xf ccache-3.1.8.tar.xz
rm -fv ccache-3.1.8.tar.xz
cd ccache-3.1.8
CFLAGS="-march=native -mtune=native" ./configure 
make
make install
cd ../../bin/
ln -s ccache gcc-4.6
ln -s ccache g++-4.6
ln -s gcc-4.6 gcc
ln -s g++-4.6 g++
touch /home/${SUDO_USER}/.bash_aliases 
echo 'export CC="/usr/local/bin/gcc" ; export CXX="/usr/local/bin/g++" ; ' >> /home/${SUDO_USER}/.bash_aliases 
echo 'export CONCURRENCY_LEVEL=`grep processor /proc/cpuinfo | wc -l` ; ' >> /home/${SUDO_USER}/.bash_aliases 
echo 'alias make="make -j $CONCURRENCY_LEVEL " ; ' >> /home/${SUDO_USER}/.bash_aliases
exit # done
source ~/.bash_aliases

now you'll never need build.sh again.
 
hello im following your post but what is this line "cd ../../bin/", what i have to put there in those ../..?

- - - Updated - - -

i did all you put there and i get this at the end "exaport: command not found"
 
i did make one over sight:
Code:
sudo -- /bin/sh -c 'chown $SUDO_USER:$SUDO_USER "/home/${SUDO_USER}/.bash_aliases"'

but your problem wasn't mine
do:
nano ~/.bash_aliases
and fix your typos? >export< not >exaport<
 
Last edited:
nothing.

that's the beauty of it.

by default, .bash_aliases is sourced on login, and you've added lines that export the CC and CXX variables to use ccache. you've also set an alias for make to default using multiple jobs equiv to #CPUs.

so just run ./configure again and then make
 
but there is no ./configure in the folder i mean, im trying to compile mystic spirit and there are no the same files that are in crying damson
 
Hi elf! Good work!, but many people have a big problems with that.
Shortly: Always standing in boost error in 8.54 tfs compiling, because I resigned with compiling until Somebody have shown 8.54 tfs tutorial, not 8.42 (with preventing errors).
 
Did anyone have this issue on debian so far?

error said:
protocolgame.cpp:1656: error: unused parameter 'msg'
protocolgame.cpp:1662: error: unused parameter 'msg'
protocolgame.cpp:3073: error: prototype for 'void ProtocolGame::sendRemoveContainerItem(uint8_t, uint8_t)' does not match any in class 'ProtocolGame'
protocolgame.h:273: error: candidate is: void ProtocolGame::sendRemoveContainerItem(uint8_t, uint8_t, const Item*)
protocolgame.cpp:3800: error: prototype for 'void ProtocolGame::RemoveContainerItem(NetworkMessage_ptr, uint8_t, uint8_t, const Item*)' does not match any in class 'ProtocolGame'
protocolgame.h:326: error: candidate is: void ProtocolGame::RemoveContainerItem(NetworkMessage_ptr, uint8_t, uint8_t)
CXX server.o
make[1]: *** [protocolgame.o] Error 1
make[1]: *** Waiting for unfinished jobs....

Nearly done compiling while this crap took me half a night... and still nothing.
 
i have this error on compiling TFS 0.4 REV 3884 on Ubuntu 10+:

Code:
actions.o: In function `global constructors keyed to _ZN7ActionsC2Ev':
actions.cpp:(.text+0x4318): undefined reference to `boost::system::get_posix_category()'
actions.cpp:(.text+0x4324): undefined reference to `boost::system::get_posix_category()'
baseevents.o: In function `global constructors keyed to _ZN10BaseEvents11loadFromXmlEv':
baseevents.cpp:(.text+0x328): undefined reference to `boost::system::get_posix_category()'
baseevents.cpp:(.text+0x334): undefined reference to `boost::system::get_posix_category()'
beds.o: In function `global constructors keyed to _ZN7BedItem8readAttrE11AttrTypes_tR10PropStream':
beds.cpp:(.text+0x1018): undefined reference to `boost::system::get_posix_category()'
beds.o:beds.cpp:(.text+0x1024): more undefined references to `boost::system::get_posix_category()' follow
collect2: ld returned 1 exit status
 
im trying compile tfs 0.2.3(8.0)
i have problem on white, someone can help me :/?
 

Attachments

Last edited:
Code:
In file included from /usr/include/boost/filesystem/v3/config.hpp:29:0,
                from /usr/include/boost/filesystem.hpp:34,
                from luascript.cpp:21:
/usr/include/boost/system/api_config.hpp:28:5: error: #error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported
make[1]: *** [luascript.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/monster.Tpo .deps/monster.Po
mv -f .deps/monsters.Tpo .deps/monsters.Po
make[1]: Leaving directory `/home/administrator/OTS/trunk.r3884'
make: *** [all] Error 2
root@GAMER:/home/administrator/OTS/trunk.r3884#

Now i have This!
I install boost and lib
 
Back
Top