Howdy. Lua issues

Spre
Posts: 13
Joined: Sat Jan 24, 2015 6:01 pm

Howdy. Lua issues

Post by Spre » Sat Jan 24, 2015 6:58 pm

I saw this project a while back, but forgot about it! (i was dealing with RO and EQ emus heavily had no time for another)

I grabbed the source from git, and unfortunately it seems to be having some issues detecting lua. Which is wierd as the eq emu requires lua and had no issues finding it.



below is the console output, now i run CentOS, i saw a post in my search that said something about luajit5.1 however there is no such release for CentOS and upon googling it all i could find was this version http://luajit.org/download.html and was not sure if it was the same one.

Code: Select all

checking for LUA... no
checking for LUA... configure: error: Package requirements (lua5.1 >= 0.25) were not met:

No package 'lua5.1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LUA_CFLAGS
and LUA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

[*******]# lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

once i get this compiled and running and have time to take a peak at everything, ill probably bring what i can to it, after 10 years working with and developing for RO emulators its time for a change.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Howdy. Lua issues

Post by kjLotus » Sat Jan 24, 2015 11:10 pm

you could just comment out that check and see if it'll go - i don't use centOS so i'm not sure how they have their lua set up

not sure how much of the script will work with just lua instead of luajit - i would guess any bitops wouldn't work, but there isn't too much that uses that

Spre
Posts: 13
Joined: Sat Jan 24, 2015 6:01 pm

Re: Howdy. Lua issues

Post by Spre » Sun Jan 25, 2015 10:38 am

thanks for the reply!

I looked for the check and couldnt find it, i also found a post here about changing the check for luajit to just lua but that nolonger exists in the source, mustve been changed, i looked in the configure script for the check and couldnt find it, is it in another file?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Howdy. Lua issues

Post by kjLotus » Sun Jan 25, 2015 2:36 pm

it's around line 5200 in configure (just search for lua5.1)

Spre
Posts: 13
Joined: Sat Jan 24, 2015 6:01 pm

Re: Howdy. Lua issues

Post by Spre » Sun Jan 25, 2015 7:01 pm

ok here is what i found

it ALL looks to control looking and including lua so ive commented it all out, going to compile in a few

Code: Select all

{ $as_echo "$as_me:$LINENO: checking for LUA" >&5
$as_echo_n "checking for LUA... " >&6; }

if test -n "$LUA_CFLAGS"; then
    pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 0.25\"") >&5
  ($PKG_CONFIG --exists --print-errors "lua5.1 >= 0.25") 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1 >= 0.25" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LUA_LIBS"; then
    pkg_cv_LUA_LIBS="$LUA_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 0.25\"") >&5
  ($PKG_CONFIG --exists --print-errors "lua5.1 >= 0.25") 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1 >= 0.25" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi



if test $pkg_failed = yes; then

if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
	        LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 0.25" 2>&1`
        else
	        LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 0.25" 2>&1`
       fi
	 Put the nasty error message in config.log where it belongs
	echo "$LUA_PKG_ERRORS" >&5

	{ { $as_echo "$as_me:$LINENO: error: Package requirements (lua5.1 >= 0.25) were not met:

$LUA_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LUA_CFLAGS
and LUA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
$as_echo "$as_me: error: Package requirements (lua5.1 >= 0.25) were not met:

$LUA_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LUA_CFLAGS
and LUA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&2;}
   { (exit 1); exit 1; }; }

Spre
Posts: 13
Joined: Sat Jan 24, 2015 6:01 pm

Re: Howdy. Lua issues

Post by Spre » Sun Jan 25, 2015 7:45 pm

update.

so lua installed, the configure cant find it, libmzq installed again, configure cant find it. its the script using standard paths? or paths based on, the distro you use? I dont see the function to set path anywhere in the script, where is that

Spre
Posts: 13
Joined: Sat Jan 24, 2015 6:01 pm

Re: Howdy. Lua issues

Post by Spre » Sun Jan 25, 2015 11:45 pm

hope you dont mind me continuing to update this. easier for anyone else that may have this issue

centos lua is intalled differently. its called just lua not lua 5.1 and in a different directory.

just had to run the following

export LUA_LIBS="-L/usr/local/lib -llua"
and
export LUA_CFLAGS="-I/usr/local/include"

it now detects lua

have the same issue with libmzq so ill update if the export works with that also.

probably would be good to include it in the install wiki

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Howdy. Lua issues

Post by kjLotus » Sun Jan 25, 2015 11:54 pm

oh, right... i had experienced this before, but i forgot about it ><

looks like zmq on yum is called "zeromq" so you'll have to modify the script to look for that i suppose

(main distro I test on uses apt)

Spre
Posts: 13
Joined: Sat Jan 24, 2015 6:01 pm

Re: Howdy. Lua issues

Post by Spre » Mon Jan 26, 2015 12:26 am

EDIT ON BOTTOM

yup actually had to add a new repo to get it. configure is all set


repo i had to add was the zeromq repo:
[zeromq]
name=Zeromq
type=rpm-md
baseurl=http://download.opensuse.org/repositori ... oenabled=1
metadata_expire=1d
skip_if_unavailable=1

now to figure out make.

getting the following error

Code: Select all

pp' || echo './'`src/map/ai/ai_automaton_dummy.cpp
In file included from src/map/ai/ai_automaton_dummy.cpp:25:
src/map/ai/../entities/petentity.h:62: error: expected ‘;’ before ‘override’
make: *** [dsgame-ai_automaton_dummy.o] Error 1
line 62 is

Code: Select all

 void UpdateEntity() override;

so gcc that you can install with centos 6.6 is the older version that doesnt accept override; however installing devtools(which i already have) and running them with

Code: Select all

scl enable devtoolset-1.1 bash
gets pass that, however now i get this:

Code: Select all

src/map/ai/../utils/charutils.h:168:87: error: ‘INT32_MAX’ was not declared in this scope
back to google i go.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Howdy. Lua issues

Post by kjLotus » Mon Jan 26, 2015 1:06 am

it's defined in stdint.h - maybe your standard libraries need updating as well (not really sure myself how you'd go about doing that)

Post Reply