Compiling Error

Posted by Cyb Ercho Lin on Tue 05 Apr 2016 06:59 PM — 9 posts, 38,433 views.

Argentina #0
Hi

try to compile the smaug with lua but throws me the following errors , I hope you can guide me to solve :

Compiling o/mt19937ar.o....
Compiling o/account.o....
Compiling o/trivia.o....
Compiling o/enhance.o....
Compiling o/delivery.o....
liblua.a(lauxlib.o):lauxlib.c:(.text+0x82): undefined reference to `__errno'
liblua.a(lauxlib.o):lauxlib.c:(.text+0xe6): undefined reference to `__getreent'
liblua.a(lauxlib.o):lauxlib.c:(.text+0x1256): undefined reference to `__getreent '
liblua.a(lbaselib.o):lbaselib.c:(.text+0x9ba): undefined reference to `__getreen t'
liblua.a(lbaselib.o):lbaselib.c:(.text+0x9cd): undefined reference to `__getreen t'
liblua.a(lbaselib.o):lbaselib.c:(.text+0xa51): undefined reference to `__getreen t'
liblua.a(ldblib.o):ldblib.c:(.text+0x2a1): more undefined references to `__getre ent' follow
liblua.a(liolib.o):liolib.c:(.text+0x11): undefined reference to `__errno'
liblua.a(liolib.o):liolib.c:(.text+0xd91): undefined reference to `__errno'
liblua.a(liolib.o):liolib.c:(.text+0xe7d): undefined reference to `__errno'
liblua.a(liolib.o):liolib.c:(.text+0x1118): undefined reference to `__getreent'
liblua.a(liolib.o):liolib.c:(.text+0x1136): undefined reference to `__getreent'
liblua.a(liolib.o):liolib.c:(.text+0x1154): undefined reference to `__getreent'
liblua.a(loslib.o):loslib.c:(.text+0x81): undefined reference to `__errno'
liblua.a(ldo.o):ldo.c:(.xdata+0x14): undefined reference to `__gxx_personality_s eh0'
/usr/bin/ld: smaug(.pdata): relocation ".text+0x0 (type rva32)" goes out of rang e
/usr/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make: *** [all] Error 2

Using
Linux 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 14.04
Lua 5.1.5
SmaugFUSS
Australia Forum Administrator #1
Did you compile liblua.a yourself? These are linking errors.

How did you compile Lua?
Argentina #2
Nick Gammon said:

Did you compile liblua.a yourself? These are linking errors.

How did you compile Lua?




If I compile the same lua, lua-5.1.5.tar.gz download the package of www.lua.org , I followed the instructions in the INSTALL file that said "make linux install" and install without problems.


root@server:/home/test# lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
>

I also think they are linking problems but I searched on google, in this forum and in the lua but I have not found the answer.

which is what would have to review or correct ?
Amended on Tue 05 Apr 2016 08:59 PM by Cyb Ercho Lin
Australia Forum Administrator #3
Quote:

... try to compile the smaug with lua ...


I can try to reproduce this, but I need to know exactly what Smaug "with Lua" you are compiling.

Which version of Smaug, for example? Link to download?
Amended on Wed 06 Apr 2016 05:56 AM by Nick Gammon
Argentina #4
smaug FUSS 1.9 Download here:

http://www.smaugmuds.org/files/download/165/
Australia Forum Administrator #5
I got it to link OK, so it must be something with your Lua build. See the suggestions in this thread:

http://www.gammon.com.au/forum/?id=12597
Argentina #6
Nick Gammon said:

I got it to link OK, so it must be something with your Lua build. See the suggestions in this thread:

http://www.gammon.com.au/forum/?id=12597



Amazing! I read the link you gave me, review the data and finally I could compile the smaug.

but want to run the mud with ./startup or /smaug 4000 marks the following error:

Thu Apr 7 00:24:33 2016 :: Loading bans
Thu Apr 7 00:24:33 2016 :: Done.
Thu Apr 7 00:24:33 2016 :: Loading reserved names
Thu Apr 7 00:24:33 2016 :: Loading corpses
Thu Apr 7 00:24:33 2016 :: Loading Immortal Hosts
Thu Apr 7 00:24:33 2016 :: Done.
Thu Apr 7 00:24:33 2016 :: Loading Projects
*** Error in `../src/smaug': double free or corruption (!prev): 0x0000000001914b10 ***
Aborted

mud@mud:~/CMud/area$
Australia Forum Administrator #7
You should run from the area directory, and then type:


../src/smaug 4000


If that still crashes, run it under gdb, like this:


gdb ../src/smaug 4000


Then read my post about using gdb:

http://www.gammon.com.au/gdb
Australia Forum Administrator #8
Try first standard Smaug 1.9 and see if that crashes (without any Lua stuff). If that works OK, then whatever-you-did to add Lua is the problem.