• 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 [YACT] Yet Another Compilation Thread..

Webtimize

Pro Grammer
Joined
Oct 3, 2011
Messages
491
Solutions
10
Reaction score
182
Location
Hell
Hey folks!

I'm currently struggling around on a Debian 8 box (tried Debian 9 and Ubuntu 14.04 too) to get a TFS 0.4-r3884 working.

Autogen and configure go as expected, however the build throws some weird error I cannot wrap my head around (3rd pastebin). I've tried everything on the forums, and I've even fiddled a little around with topics on Stackexchange. Nothing helped so far. I am running it with the suggested -lpthread / -pthread in the makefile (which is suggested in other threads on otland) but it does not affect anything in a positive manner.

~EDIT:
I've noticed it "Checking for LUA.. no" in ./configure

~EDIT EDIT:
I've switched back to a Debian 8 machine - it seems that the issue is not OS related.

$ lua -v
Code:
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

$ ./autogen.sh
jordi@alzeria:~/repository/TFS-0.4-rev.3884$ ./autogen.sh autoreconf: Entering - Pastebin.com

$ ./configure --enable-mysql --enable-root-permissions
jordi@alzeria:~/repository/TFS-0.4-rev.3884$ ./configure --enable-mysql --enable - Pastebin.com

$ ./build.sh
jordi@alzeria:~/repository/TFS-0.4-rev.3884$ ./build.sh TheForgottenServer buil - Pastebin.com

Any suggestions whirling around?? :)

Solution

Open up your `configure.ac` file and replace the first block of code with the second block of code. Thanks to @MyAAC


Code:
    PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, , [
        AC_CHECK_HEADERS([lua.hpp], , [AC_MSG_ERROR("Lua header not found.")])
        AC_CHECK_LIB(lua, main, , [AC_MSG_ERROR("Linking against Lua library failed.")])
    ])
Code:
    PKG_CHECK_MODULES([LUA], [lua5.1], [LIBS="$LUA_LIBS $LIBS"], [
        AC_CHECK_HEADERS([lua.hpp], , [AC_MSG_ERROR("Lua header not found.")])
        AC_CHECK_LIB([lua5.1], [main], , [AC_MSG_ERROR("Linking against Lua library failed.")])
    ])
 
Last edited:
Solution
What does

Code:
pkg-config --list-all|grep -i lua

output?

Also, tried adding this into your configure.ac file?

Code:
PKG_CHECK_MODULES([LUA], [lua5.1])
Found exact same issue here: Undefined reference to dlclose@@GLIBC_2.2.5 · Issue #1664 · awesomeWM/awesome · GitHub

Maybe it can help to resolve your problem.

I have already tried that, but their proposed fix had no effects whatsoever :/

~ EDIT:
I've noticed that it throws this in /configure
Code:
checking for LUA... no
checking lua.hpp usability... yes
checking lua.hpp presence... yes
checking for lua.hpp... yes
checking for main in -llua... yes

$ lua -v
Code:
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
 
Last edited:
Did you install Lua dev package?
Yes - I have it installed

Code:
root@alzeria:/home/jordi/repository/TFS-0.4-r2884# apt show liblua5.1-0-dev
Package: liblua5.1-0-dev
Source: lua5.1
Version: 5.1.5-7.1
Installed-Size: 806 kB
Maintainer: John V. Belmonte <[email protected]>
Provides: liblua5.1-dev
Depends: liblua5.1-0 (= 5.1.5-7.1), libc6-dev | libc-dev, libreadline-dev
Recommends: pkg-config, libtool, libtool-bin
Conflicts: liblua5.1-dev
Homepage: http://www.lua.org
Tag: devel::lang:lua, devel::library, implemented-in::c, role::devel-lib
Section: libdevel
Priority: optional
Download-Size: 128 kB
APT-Manual-Installed: yes
APT-Sources: http://mirror.transip.net/debian/debian/ jessie/main amd64 Packages
Description: Development files for the Lua language version 5.1
 Lua is a powerful, light-weight programming language designed for extending
 applications.  The language engine is accessible as a library, having a C
 API which allows the application to exchange data with Lua programs and also
 to extend Lua with C functions.  Lua is also used as a general-purpose,
 stand-alone language through the simple command line interpreter provided.
 .
 This package contains developer resources for using the Lua library.
 Install it if you are developing programs which use the Lua C API, both
 in C or C++.
 
What does

Code:
pkg-config --list-all|grep -i lua

output?

Also, tried adding this into your configure.ac file?

Code:
PKG_CHECK_MODULES([LUA], [lua5.1])
 
Solution
Thanks for your reply :)

$ pkg-config --list-all|grep -i lua

Code:
lua51-c++             Lua - Lua language engine
lua-5.1-c++           Lua - Lua language engine
lua5.1                Lua - Lua language engine
lua5.2                Lua - Lua language engine
lua-5.1               Lua - Lua language engine
lua50                 lua50 - The Lua 5.0 programming language
lua51                 Lua - Lua language engine
lua5.1-c++            Lua - Lua language engine
lualib50              lua50 - The Lua 5.0 programming language addon libraries

The PKG_CHECK gives an error. I might be pasting it in the wrong place, can you tell me the exact place to put it?

PKG_CHECK did it, updated the main post with answer! Thanks alot @MyAAC !
 
Last edited:
MyAAC its me.

Its here:
Code:
    PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, , [
        AC_CHECK_HEADERS([lua.hpp], , [AC_MSG_ERROR("Lua header not found.")])
        AC_CHECK_LIB(lua, main, , [AC_MSG_ERROR("Linking against Lua library failed.")])
    ])

Change that: lua5.1 >= 5.1 to [lua5.1]
 
Back
Top