Issue information

Issue ID
#791
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jan 11, 2008 15:49
Last Post
Hercules Elf Bot
Jan 11, 2008 15:49
Confirmation
N/A

Hercules Elf Bot - Jan 11, 2008 15:49

Originally posted by [b]Skotlex[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=791

Been there for a while.. on my Linux system compiling yields this linking error:
CODE
gcc  -L/usr/lib -o ../../login-server obj_txt/login.o obj_txt/admin.o ../common/obj_all/core.o ../common/obj_all/socket.o ../common/obj_all/timer.o ../common/obj_all/db.o ../common/obj_all/plugins.o ../common/obj_all/lock.o ../common/obj_all/malloc.o ../common/obj_all/showmsg.o ../common/obj_all/utils.o ../common/obj_all/strlib.o ../common/obj_all/grfio.o ../common/obj_all/mapindex.o ../common/obj_all/ers.o ../common/obj_all/md5calc.o -lm -lz  -rdynamic -ldl
../common/obj_all/timer.o: In function `tick':
<...>/src/common/timer.c:100: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[1]: *** [login-server] Error 1
make[1]: Leaving directory `<...>/src/login'
make: *** [login] Error 2

Hmm, I think the missing library is librt, according to the manpage for clock_gettime:
QUOTE
NOTES
Most systems require the program be linked with the librt library to use these functions.

I really don't know about configure scripts and Make files, but the problem is obviously a missing -lrt somewhere, I believe.