suricata: enable lua support
Gary Huband
How can I enable lua support for suricata? According to | checking for magic.h... yes lua and lua-native appear to build. |
|
perhaps you needs to add lua to DEPENDS as well.
On Fri, Mar 4, 2022 at 11:18 AM Gary Huband via lists.yoctoproject.org <gary=missionsecure.com@...> wrote:
|
|
Gary Huband
Adding DEPENDS += "lua" fixed that error. I'm assuming that allows the configure to find lua. Now I'm getting a compile error | /tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/suricata/6.0.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: util-lua-dns.o: in function `DnsGetTxid': |
|
On 3/4/22 15:02, Gary Huband via lists.yoctoproject.org wrote:
I added this to the recipe and it appears the liblua it is looking for does not exist. PACKAGECONFIG[lua] = "--enable-lua --with-liblua-includes=${STAGING_INCDIR} --with-liblua-libraries==${STAGING_LIBDIR}, --disable-lua,lua, lua" Error: checking for luaL_openlibs in -llua5.1... no | | ERROR! liblua library not found, go get it | from http://lua.org/index.html or your distribution: | | Ubuntu: apt-get install liblua5.1-dev It may be the lua recipe. I only see the static lib 'liblua.a' -armin | /tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/suricata/6.0.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: util-lua-dns.o: in function `DnsGetTxid': |
|
Gary Huband
The Suricata install site also says to install
liblua5.1-devDoes this mean that Suricata needs lua 5.1 (which is very old)?? For Zeus the lua recipe is 5.3.5.
Do I need to create a recipe for lua 5.1?
Gary
From: akuster808 <akuster808@...>
Sent: Friday, March 4, 2022 7:52 PM To: Gary Huband <Gary@...>; yocto@... <yocto@...> Subject: Re: [yocto] suricata: enable lua support On 3/4/22 15:02, Gary Huband via lists.yoctoproject.org wrote: > > Adding DEPENDS += "lua" fixed that error. I'm assuming that allows > the configure to find lua. > > Now I'm getting a compile error > I added this to the recipe and it appears the liblua it is looking for does not exist. PACKAGECONFIG[lua] = "--enable-lua --with-liblua-includes=${STAGING_INCDIR} --with-liblua-libraries==${STAGING_LIBDIR}, --disable-lua,lua, lua" Error: checking for luaL_openlibs in -llua5.1... no | | ERROR! liblua library not found, go get it | from https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Flua.org%2Findex.html&data=04%7C01%7Cgary%40missionsecure.com%7C7f9815dcc0c142b6d92d08d9fe4262cb%7Cf0ca9611f13f4dc98e1b119172b8ec5d%7C0%7C1%7C637820383359878260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FdB7jyQwXX%2BVjjhLSDhKNSt41GUOgdg%2FG3ajSKIElo0%3D&reserved=0 or your distribution: | | Ubuntu: apt-get install liblua5.1-dev It may be the lua recipe. I only see the static lib 'liblua.a' -armin > | > /tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/suricata/6.0.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: > util-lua-dns.o: in function `DnsGetTxid': > | > /usr/src/debug/suricata/6.0.3-r0/suricata-6.0.3/src/util-lua-dns.c:80: > undefined reference to `rs_dns_lua_get_tx_id' > | > /tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/suricata/6.0.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: > util-lua-dns.o: in function `DnsGetAnswerTable': > | > /usr/src/debug/suricata/6.0.3-r0/suricata-6.0.3/src/util-lua-dns.c:125: > undefined reference to `rs_dns_lua_get_answer_table' > | > /tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/suricata/6.0.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: > util-lua-dns.o: in function `DnsGetAuthorityTable': > | > /usr/src/debug/suricata/6.0.3-r0/suricata-6.0.3/src/util-lua-dns.c:133: > undefined reference to `rs_dns_lua_get_authority_table' > | > /tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/suricata/6.0.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: > util-lua-dns.o: in function `DnsGetQueryTable': > | > /usr/src/debug/suricata/6.0.3-r0/suricata-6.0.3/src/util-lua-dns.c:117: > undefined reference to `rs_dns_lua_get_query_table' > | > /tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/suricata/6.0.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: > util-lua-dns.o: in function `DnsGetDnsRrname': > | > /usr/src/debug/suricata/6.0.3-r0/suricata-6.0.3/src/util-lua-dns.c:69: > undefined reference to `rs_dns_lua_get_rrname' > | > /tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/suricata/6.0.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/ld: > util-lua-dns.o: in function `DnsGetRcode': > | > /usr/src/debug/suricata/6.0.3-r0/suricata-6.0.3/src/util-lua-dns.c:92: > undefined reference to `rs_dns_lua_get_rcode' > | collect2: error: ld returned 1 exit status > | Makefile:2118: recipe for target 'suricata' failed > | make[2]: *** [suricata] Error 1 > > > >
Gary Huband
Sr. Software and Systems Engineer
Office: 434.284.8071 x720 Direct: 434.260.4995 Gary@...
: : : : : : : : : : : : : : : : : : : : : : : : : : :
![]() This email and any files transmitted with it are confidential and proprietary and intended solely for the use of the individual or entity to whom they are addressed.
Any dissemination, distribution or copying of this communication is strictly prohibited without our prior permission. If you received this in error, please contact the sender and delete the material from any computer.
|
|
On Fri, Mar 4, 2022 at 6:23 PM Gary Huband via lists.yoctoproject.org <gary=missionsecure.com@...> wrote:
seems so, lua5.1 is not ABI compatible with newer Lua, so if an app needs this version then you will have to add it, perhaps see if you can just use internal version or something like that
|
|
Hello,
toggle quoted message
Show quoted text
The missing symbols are not in the latest lua (5.4.4) nor if I include the current luajit version into the mix. I grepped the /tmp dirs and could not find the missing symbols. You may need to ping suracata folks. -armin On 3/4/22 18:23, Gary Huband wrote:
The Suricata install site also says to install |
|
Gary Huband
The problems is that the configure.ac file is hard coded for lua5.1. See
https://forum.suricata.io/t/lua-5-4-3-and-suricata-undefined-reference-error/1906/5 I created a patch to change configure.ac to use lua5.3 (I'm using Zeus). But when I "bitbake suricata" I'm getting the same error because it's not updating the configure file. Do I also have to fix the configure file or is there some way I can force a autoreconf?
Thanks
Gary
From: Khem Raj <raj.khem@...>
Sent: Saturday, March 5, 2022 2:55 AM To: Gary Huband <Gary@...> Cc: akuster808 <akuster808@...>; yocto@... <yocto@...> Subject: Re: [yocto] suricata: enable lua support On Fri, Mar 4, 2022 at 6:23 PM Gary Huband via
lists.yoctoproject.org <gary=missionsecure.com@...> wrote:
seems so, lua5.1 is not ABI compatible with newer Lua, so if an app needs this version then
you will have to add it, perhaps see if you can just use internal version or something like that
Gary Huband
Sr. Software and Systems Engineer
Office: 434.284.8071 x720 Direct: 434.260.4995 Gary@...
: : : : : : : : : : : : : : : : : : : : : : : : : : :
![]() This email and any files transmitted with it are confidential and proprietary and intended solely for the use of the individual or entity to whom they are addressed.
Any dissemination, distribution or copying of this communication is strictly prohibited without our prior permission. If you received this in error, please contact the sender and delete the material from any computer.
|
|
On 3/8/22 11:15, Gary Huband wrote:
The problems is that the configure.ac file is hard coded for lua5.1. SeeDid you save that patch in the suricata/files dir and then append SRC_URI with "file://{patch name}" ? But when I "bitbake suricata" I'm getting the same error because it's not updating the configure file. Do I also have to fix the configure file or is there some way I can force a autoreconf?When I try building this on master, I have to use luajit as it provides shared libraries and lua does not. The symbol 'rs_dns_lua_get_rrname' and others are not found. i don't see them in the latest lua nor luajit repos so I don't know why they are being referenced. The version I am building is 6.0.4 which uses Rust so I don't know what would take to fix zeus. - armin
|
|