Closed heul closed 9 years ago
Hello, This appears to be a feature from Lua5.2. I'll write the compatibility shim for that this weekend.
Hello,
Could you try again, when using the branch lua_compat?
$ git checkout lua_compat
$ autoreconf --force --install
$ ./configure [your additional directives]
$ make -j4
[$ sudo make install] (if you don't install, the executable is located under src/tracebox/tracebox)
Normally this should work (tested on my machine and Lua 5.1.5)
Hi Olivier,
I can confirm, that the fix worked. Within branch lua_comat the build finished successfully with Lua 5.1.4.
Cheers and thanks -- Thomas
First of all, thank you so much! I also had an error with lua 5.2, that disappeared as well with the lua_compat branch :
libtool: link: g++ -g -O2 -std=gnu++11 -o tracebox tracebox-tracebox.o tracebox-lua.o tracebox-PartialHeader.o tracebox-PacketModification.o lua/tracebox-lua_base.o lua/tracebox-lua_crafter.o lua/tracebox-lua_arg.o lua/tracebox-lua_fwfilter.o lua/tracebox-lua_icmp.o lua/tracebox-lua_init.o lua/tracebox-lua_ip.o lua/tracebox-lua_ipoption.o lua/tracebox-lua_ipv6.o lua/tracebox-lua_ipv6segmentroutingheader.o lua/tracebox-lua_packetmodifications.o lua/tracebox-lua_packet.o lua/tracebox-lua_raw.o lua/tracebox-lua_tcp.o lua/tracebox-lua_tcpoption.o lua/tracebox-lua_udp.o lua/tracebox-lua_tracebox.o lua/tracebox-lua_utils.o lua/tracebox-lua_dns.o lua/tracebox-lua_tcptimestamp.o /path/to/tracebox/noinst/libcrafter/libcrafter/.libs/libcrafter.a -lresolv -lrt -lpthread -llua5.2 -lm -ldl -lpcap -ljson-c
tracebox-lua.o: In function `script_packet(std::string&)':
/path/to/tracebox/src/tracebox/lua.cc:21: undefined reference to `lua_pcall'
tracebox-lua.o: In function `script_exec(char const*, int, char**)':
/path/to/tracebox/src/tracebox/lua.cc:53: undefined reference to `lua_pcall'
tracebox-lua.o: In function `script_execfile(char const*, int, char**)':
/path/to/tracebox/src/tracebox/lua.cc:69: undefined reference to `luaL_loadfile'
/path/to/tracebox/src/tracebox/lua.cc:72: undefined reference to `lua_pcall'
/path/to/tracebox/src/tracebox/lua.cc:75: undefined reference to `lua_tointeger'
lua/tracebox-lua_base.o: In function `l_do(lua_State*, char const*)':
/path/to/tracebox/src/tracebox/lua/lua_base.cpp:39: undefined reference to `lua_pcall'
lua/tracebox-lua_base.o: In function `lua_traceback(lua_State*)':
/path/to/tracebox/src/tracebox/lua/lua_base.cpp:106: undefined reference to `lua_call'
lua/tracebox-lua_arg.o: In function `v_arg_integer_get_':
/path/to/tracebox/src/tracebox/lua/lua_arg.cpp:74: undefined reference to `lua_tointeger'
lua/tracebox-lua_arg.o: In function `v_arg_double_get_':
/path/to/tracebox/src/tracebox/lua/lua_arg.cpp:132: undefined reference to `lua_tonumber'
lua/tracebox-lua_ipv6segmentroutingheader.o: In function `l_IPv6SegmentRoutingHeader_SetHMAC_(Crafter::IPv6SegmentRoutingHeader*, lua_State*)':
/path/to/tracebox/src/tracebox/lua/lua_ipv6segmentroutingheader.cpp:180: undefined reference to `lua_tointeger'
lua/tracebox-lua_ipv6segmentroutingheader.o: In function `l_IPv6SegmentRoutingHeader_SetPolicyList_(Crafter::IPv6SegmentRoutingHeader*, lua_State*)':
/path/to/tracebox/src/tracebox/lua/lua_ipv6segmentroutingheader.cpp:110: undefined reference to `lua_tointeger'
lua/tracebox-lua_raw.o: In function `l_raw_ref::l_bytes(lua_State*)':
/path/to/tracebox/src/tracebox/lua/lua_raw.cpp:80: undefined reference to `lua_tointeger'
lua/tracebox-lua_tracebox.o: In function `tCallback':
/path/to/tracebox/src/tracebox/lua/lua_tracebox.cpp:99: undefined reference to `lua_pcall'
/path/to/tracebox/src/tracebox/lua/lua_tracebox.cpp:110: undefined reference to `lua_tonumber'
collect2: error: ld returned 1 exit status
make[3]: *** [tracebox] Error 1
make[3]: Leaving directory `/path/to/tracebox/src/tracebox'
Anyways, now it works like a charm.
Maybe I'm to stupid, but I cannot get it to compile. During Make:
On Debian Wheezy with lua5.1