Re: Debian compile and Lua

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

It seems that Debian has pkg-config definitions for Lua 5.0, 5.1, 5.2 and 5.3 through the dev packages but then again like you pointed out
there is no default Lua so "pkg-config --libs lua" doesn't work either and would require hardcoding the version number which is not cool.
Debian has its "update-alternatives" which seems to apply to the Lua interpreter and compiler but not to anything else.
This, like the one before, is not a suggestion. :) It's just me making observations. But yes, symlinking seems like the most lightweight approach.
I don't think anyone wants this to turn into something like the _javascript_ ecosystem where you need to learn a million tools
and frameworks before being able to become productive and get something done. :D

Regards,
Esa

On Thu, Jan 30, 2020 at 4:52 PM Jan Willamowius via gnugk-users <gnugk-users@xxxxxxxxxxxxxxx> wrote:
Hi,

I don't think thats a good solution. It hardcodes the lua version
inside the ./configure script to 5.2 and you will have the same issue
again as soon as you upgrade to 5.3 etc.

I prefer to do a symlink on systems that don't provide a default
liblua.a.

ln -s /usr/lib/x86_64-linux-gnu/liblua5.3.a /usr/lib/x86_64-linux-gnu/liblua.a

Regards,
Jan

--
Jan Willamowius, Founder of the GNU Gatekeeper Project
EMail  : jan@xxxxxxxxxxxxxx
Website: https://www.gnugk.org
Support: https://www.willamowius.com/gnugk-support.html

Relaxed Communications GmbH
Frahmredder 91, 22393 Hamburg, Germany
Geschäftsführer: Jan Willamowius
HRB 125261 (Amtsgericht Hamburg)
USt-IdNr: DE286003584

Esa Nyrhinen via gnugk-users wrote:
> Hi,
>
> I can't seem to get Lua compiled into GnuGk on a Debian unless I do
> something like this:
>
> --- configure.in        2020-01-30 15:41:44.045768411 +0200
> +++ ../configure.in     2020-01-30 15:41:40.045902713 +0200
> @@ -1235,9 +1235,10 @@
>                 old_LIBS="$LIBS"
>
>                 for try in /usr/lib /usr/local/lib $lua_lib_dir; do
> +            for libname in lua lua5.2; do
>                         if test -d $try; then
>                                 CFLAGS="$old_CFLAGS $LUA_INCLUDE"
> -                               LIBS="$old_LIBS -llua -lm"
> +                               LIBS="$old_LIBS -l$libname -lm"
>                                 LDFLAGS="$old_LDFLAGS -L$try"
>                                 AC_TRY_LINK([
>                                         #include "lua.h"
> @@ -1248,7 +1249,7 @@
>                                         lua_State * m_lua = luaL_newstate();
>                                         luaL_newlib(m_lua, mylib);
>                                         ],
> -                                       [ LUA_LIBS="-llua -lm"
> +                                       [ LUA_LIBS="-l$libname -lm"
>                                           LUA_LDFLAGS="-L$try"
>                                         ],
>                                         LUA_LDFLAGS=
> @@ -1257,6 +1258,7 @@
>                                         break;
>                                 fi
>                         fi
> +            done
>                 done
>                 CFLAGS="$old_CFLAGS"
>                 LIBS="$old_LIBS"
>
> This seems to apply to Debian 9 and 10 at least.
>
> Regards,
> Esa

_______________________________________________________

Posting: mailto:gnugk-users@xxxxxxxxxxxxxxx
Archive: https://lists.gnugk.org/pipermail/gnugk-users/
Unsubscribe: https://lists.gnugk.org/lists/listinfo/gnugk-users
Homepage: https://www.gnugk.org/
_______________________________________________________

Posting: mailto:gnugk-users@xxxxxxxxxxxxxxx
Archive: https://lists.gnugk.org/pipermail/gnugk-users/
Unsubscribe: https://lists.gnugk.org/lists/listinfo/gnugk-users
Homepage: https://www.gnugk.org/

[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux