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

i got this error
checking mysql/mysql.h usability... no
checking mysql/mysql.h presence... no
checking for mysql/mysql.h... no
configure: error: "MySQL headers missing."

eny hints?
 
Help me out :X

Terminal said:
root@ZnoteLinux-desktop:/home/znote/forgottenserver# ./autogen.sh
bash: ./autogen.sh: No such file or directory
root@ZnoteLinux-desktop:/home/znote/forgottenserver# bash autogen.sh
bash: autogen.sh: No such file or directory
root@ZnoteLinux-desktop:/home/znote/forgottenserver# source/autogen.sh
source/autogen.sh: line 1: autoreconf: command not found

root@ZnoteLinux-desktop:/home/znote/forgottenserver/source# bash autogen.sh
autogen.sh: line 1: autoreconf: command not found
root@ZnoteLinux-desktop:/home/znote/forgottenserver/source# ./autogen.sh
./autogen.sh: line 1: autoreconf: command not found
root@ZnoteLinux-desktop:/home/znote/forgottenserver/source# sh autogen.sh
autogen.sh: 1: autoreconf: not found
root@ZnoteLinux-desktop:/home/znote/forgottenserver/source#

None of them seem to work, or is it autogen.sh that is not compatible with Kubuntu 10.04?

At first it couldn't find the location, once I found the location it starts wining about something else. :p

Edit, thanks to Stian i think I got it working.

Code:
root@ZnoteLinux-desktop:/home/znote/forgottenserver/source# ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:3: installing `./install-sh'
configure.ac:3: installing `./missing'
Makefile.am: installing `./depcomp'
autoreconf: Leaving directory `.'
root@ZnoteLinux-desktop:/home/znote/forgottenserver/source#

Edit: Next problem with enabling mysql?
Code:
checking gmp.h usability... yes
checking gmp.h presence... yes
checking for gmp.h... yes
checking for __gmpz_init2 in -lgmp... yes
checking for main in -lboost_thread-gcc-mt... no
checking for main in -lboost_thread-mt... no
checking for main in -lboost_thread... no
configure: error: "Linking against boost::thread library failed."
root@ZnoteLinux-desktop:/home/znote/forgottenserver/source#
 
Last edited:
Code:
checking for main in -lz... yes
checking for main in -lboost_thread-gcc-mt... no
checking for main in -lboost_thread-mt... yes
checking for main in -lboost_regex-gcc-mt... no
checking for main in -lboost_regex-mt... yes
checking for main in -lboost_system-gcc-mt... no
checking for main in -lboost_system-mt... no
checking for main in -lboost_system... yes
checking for main in -lboost_date_time-gcc-mt... no
checking for main in -lboost_date_time-mt... yes
checking for main in -lboost_filesystem-gcc-mt... no
checking for main in -lboost_filesystem-mt... no
checking for main in -lboost_filesystem... no
configure: error: "Linking against boost::filesystem library failed."

Ubuntu 10.04

Under Ubuntu 9.10 works perfect.
 
figure: error: "Linking against boost::thread library failed." Ubuntu 10.04 i try installing the latest boost from the readme file on dev 0.4 but still have same error
 
For people who follow my guide, here is updated steps for Ubuntu 10.04
sudo apt-get install subversion autoconf build-essential pkg-config libboost-dev libgmp3-dev libxml2-dev liblua5.1-0-dev libmysqlclient-dev libcrypto++-dev ccache libboost-filesystem-dev libboost-regex-dev libboost-system-dev libboost-thread-dev
(libboost-dev nolonger includes most of boost)
 
New error in ubuntu 10.04
Code:
g++ -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__     -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -g -O2 -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   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   -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 `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_posix_category()'
/usr/include/boost/system/error_code.hpp:209: undefined reference to `boost::system::get_posix_category()'
baseevents.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_posix_category()'
/usr/include/boost/system/error_code.hpp:209: undefined reference to `boost::system::get_posix_category()'
beds.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_posix_category()'
beds.o:/usr/include/boost/system/error_code.hpp:209: more undefined references to `boost::system::get_posix_category()' follow
collect2: ld returned 1 exit status
make[1]: ** [theforgottenserver] Erro 1
make[1]: Saindo do diretório `/home/bido/Desktop/Forgotten/trunk.r3706'
make: ** [all] Erro 2
bido@bido-desktop:~/Desktop/Forgotten/trunk.r3706$
 
stian i try your code now i have this error
configure: error: "SQLite3 headers missing."

any suggestion?

fix that already now a new error damn was so close i can taste it

o `boost::system::get_posix_category()' follow
collect2: ld returned 1 exit status
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory `/home/nu99a/.local/share/Trash/files/trunk.r3730'
make: *** [all] Error 2
 
Last edited:
When i did this almost all monsters from the map cant get loaded, any idea why?
 
I want help with compiling TFS!

I have a VPS Debian Quad Xeon 2gb ram...

When I try to compiling the server i get memory error!

Code:
server:/home/0.3.6pl1# make -j 2
make  all-am
make[1]: Entering directory `/home/0.3.6pl1'
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__      -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -MT game.o -MD -MP -MF .deps/game.Tpo -c -o game.o game.cpp
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__      -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -MT item.o -MD -MP -MF .deps/item.Tpo -c -o item.o item.cpp
mv -f .deps/item.Tpo .deps/item.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__      -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -MT itemattributes.o -MD -MP -MF .deps/itemattributes.Tpo -c -o itemattributes.o itemattributes.cpp

cc1plus: out of memory allocating 4064 bytes after a total of 7557120 bytes
make[1]: *** [game.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/itemattributes.Tpo .deps/itemattributes.Po
make[1]: Leaving directory `/home/0.3.6pl1'
make: *** [all] Error 2

top command:
Code:
top - 18:18:11 up 8 min,  1 user,  load average: 0.12, 0.07, 0.02
Tasks:  16 total,   1 running,  15 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.5%us,  0.2%sy,  0.0%ni, 98.2%id,  0.1%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1972864k total,   177500k used,  1795364k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  2032  700  604 S    0  0.0   0:00.10 init
13903 daemon    25   0  1808  472  384 S    0  0.0   0:00.00 portmap
13986 root      18   0  1740  632  508 S    0  0.0   0:00.00 syslogd
13993 root      18   0  5488 1056  672 S    0  0.1   0:00.00 sshd
14018 root      19   0  2568 1168  968 S    0  0.1   0:00.00 mysqld_safe
14139 mysql     17   0  134m  19m 5692 S    0  1.0   0:00.29 mysqld
14140 root      18   0  1672  544  472 S    0  0.0   0:00.00 logger
14195 root      18   0  105m  936  692 S    0  0.0   0:00.00 nscd
14219 root      16   0  2960  808  660 S    0  0.0   0:00.00 xinetd
14258 root      15   0  8984 1612  580 S    0  0.1   0:00.01 sendmail-mta
15475 root      22   0  8656 2720 2232 S    0  0.1   0:00.03 sshd
15543 root      25   0  2292  692  544 S    0  0.0   0:00.00 cron
15553 root      18   0 31836 7052 3876 S    0  0.4   0:00.06 apache2
15564 www-data  17   0 31836 3712  524 S    0  0.2   0:00.00 apache2
15684 root      18   0  2912 1496 1148 S    0  0.1   0:00.00 bash
32251 root      15   0  2328  860  708 R    0  0.0   0:00.00 top

Can someone help me here?

Thx
 
stian i try your code now i have this error
configure: error: "SQLite3 headers missing."

any suggestion?

fix that already now a new error damn was so close i can taste it

o `boost::system::get_posix_category()' follow
collect2: ld returned 1 exit status
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory `/home/nu99a/.local/share/Trash/files/trunk.r3730'
make: *** [all] Error 2

My command don't install sqlite. You can do it yourself tho.
 
Im new to linux (ubuntu 10.4)..
I was able to compile 0.3.6pl1 using stian short tuto, but I want to use sqlite so I installed it (sqlite3 and libsqlite3-dev).. but im getting some errors when I try to compile it. :(

First:
./autogen.sh
./configure --enable-sqlite
make [-j 2]

Second:
./autogen.sh
./configure --enable-mysql --enable-sqlite
make [-j 2]

both give me some errors.
gonna attach it.

Edit:
erm I managed to do it re-downloading sources.. I think I need to reset configs or clear cache or something like this to use that already used sources .. like a rebuild all on dev-c++
if anyone knows how to do it on linux I appreciate.



srry about my english.. it suxs.
 

Attachments

Last edited:
Help Copile Tfs 0.04 in linux

Just a bump of that code.

Note: If you use 0.4 add "libcrypto++-dev ccache" to the list. And instead of "make -j 2" run "./build.sh"

root@cesar-desktop:~# cd tfs
root@cesar-desktop:~/tfs# ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
root@cesar-desktop:~/tfs# ./configure --enable-mysql
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for ptrdiff_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for ceil... yes
checking for floor... yes
checking for ftime... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for memset... yes
checking for pow... yes
checking for sqrt... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for strstr... yes
checking for strtol... yes
checking for xml2-config... /usr/bin/xml2-config
checking for libxml - version >= 2.6.5... yes (version 2.7.6)
checking gmp.h usability... yes
checking gmp.h presence... yes
checking for gmp.h... yes
checking for __gmpz_init2 in -lgmp... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for main in -lz... yes
checking for main in -lboost_thread-gcc-mt... no
checking for main in -lboost_thread-mt... yes
checking for main in -lboost_regex-gcc-mt... no
checking for main in -lboost_regex-mt... no
checking for main in -lboost_regex... no
configure: error: "Linking against boost::regex library failed."
 
this may be from an older version of Debian,
/etc/sources.list.
but in my case on Debian 5.0 it's found here:
/etc/apt/sources.list.
also what are 'repository'? you mention it on
step 2 in case if packages are missing.
I'm new to Debian so please bare with me!

Error:
E: Couldn't find package libboost1.41-dev
 
this may be from an older version of Debian,

but in my case on Debian 5.0 it's found here:

also what are 'repository'? you mention it on
step 2 in case if packages are missing.
I'm new to Debian so please bare with me!

Error:
replace all "1.41" for "1.43"
 
i get this error, help plz

g++ -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -Werror -Wall -O1 -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__USE_MYSQL__ -D__USE_SQLITE__ -c otserv.cpp
cc1plus: warnings being treated as errors
otserv.cpp: In function ‘void badAllocationHandler()’:
otserv.cpp:223: error: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result
make: *** [otserv.o] Error 1
 
no compile here

i have I have several problems when compiling I have the lenny version 5.0 and nothing worked for me a


This tutorial for lenny version is really someone can help me please
 
this may be from an older version of Debian,

/etc/sources.list.
but in my case on Debian 5.0 it's found here:

/etc/apt/sources.list.
also what are 'repository'? you mention it on
step 2 in case if packages are missing.
I'm new to Debian so please bare with me!

Error:
E: Couldn't find package libboost1.41-dev

Same problem here..
 
Back
Top