• 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 [Debian 7.1] [0.3.6] undefined reference to symbol 'pthread_getspecific@@GLIBC_2.0'

mpa

Member
Joined
Oct 8, 2008
Messages
319
Reaction score
13
Location
Sweden
I get the following error when I try to compile 0.3.6 Crying Damson on Debian 7.1

Code:
g++ -I/usr/include/libxml2  -I/usr/include/lua5.1    -D__USE_MYSQL__      -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1   -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 exception.o fileloader.o game.o  globalevent.o group.o gui.o house.o housetile.o inputbox.o ioban.o ioguild.o iologindata.o iomap.o iomapserialize.o item.o itemattributes.o items.o luascript.o mailbox.o map.o md5.o monster.o monsters.o movement.o networkmessage.o npc.o otserv.o outfit.o outputmessage.o party.o playerbox.o player.o position.o protocol.o protocolgame.o protocollogin.o protocolold.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o sha1.o spawn.o spells.o status.o talkaction.o tasks.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o waitlist.o weapons.o vocation.o -llua5.1   -lmysqlclient -lboost_filesystem-mt -lboost_date_time-mt -lboost_system-mt -lboost_regex-mt -lboost_thread-mt -lgmp  -lxml2
/usr/bin/ld: connection.o: undefined reference to symbol 'pthread_getspecific@@GLIBC_2.0'
/lib/i386-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory `/home/cryingdamson'
make: *** [all] Error 2
root@sd:/home/cryingdamson#
 
Open Makefile.am

find

Code:
AM_CXXFLAGS = $(XML_CPPFLAGS) $(OTSERV_FLAGS) $(LUA_CFLAGS) $(DEBUG_FLAGS)\

and replace by

Code:
AM_CXXFLAGS = -pthread $(XML_CPPFLAGS) $(OTSERV_FLAGS) $(LUA_CFLAGS) $(DEBUG_FLAGS)\

hth,
Marc
 
Thank you! I did like you said and will try to compile now. Let's see if it works!

- - - Updated - - -

Now it won't even compile. Only this happens:

Code:
make  all-am
make[1]: Entering directory `/home/cryingdamson'
make[1]: Leaving directory `/home/cryingdamson'

- - - Updated - - -

Also, I don't know if this is an error or not but I get this when I type './autogen.sh':

Code:
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 `.'
 
Last edited:
Alright, that works! The linux box is pretty slow, so I will update in about 5 minutes with the result.

- - - Updated - - -

It worked now! Thank you, fluidsonic! rep+
 
Last edited:
Back
Top