2008-03-14 03:34:38 Cross-compilation lua/lighttpd problem
Philippe Le Gal (FRANCE)
Message: 52502 Hi,
I successfully cross-compile and make lua work for uclinux/blackfin target.
I can also generate the liblua.so.
I also cross-compile lighttpd for that target and I want to build the lua support for it.
When I cross-compile lighttpd with lua with the following ./configure
options :
./configure --host=bfin-linux-uclibc --disable-ipv6 --without-zlib
--without-bzip2 --with-lua --prefix=/tmp/bfin LUA_LIBS=/tmp/lua-5.1.3/src/
LUA_CFLAGS=-I/tmp/lua-5.1.3/src/
It's also compile, but when I download everything on the target and run
lighttpd, I've this message :
root:~> lighttpd -f /etc/lighttpd.conf -D
lighttpd: can't resolve symbol '_lua_pushlstring'
When I've a look at mod_magnet.so, there is no reference to liblua.so :
/tmp/bfin/lib> bfin-linux-uclibc-objdump mod_magnet.so -T | grep lua
00000000 D *UND* 00000000 _lua_pcall
00000000 D *UND* 00000000 _lua_setfenv
00000000 D *UND* 00000000 _lua_atpanic
00000000 D *UND* 00000000 _lua_pushlstring
00000000 D *UND* 00000000 _lua_pushcclosure
00000000 D *UND* 00000000 _lua_isstring
00000000 D *UND* 00000000 _lua_settop
00000000 D *UND* 00000000 _luaL_error
00000000 D *UND* 00000000 _lua_touserdata
00000000 D *UND* 00000000 _lua_gettop
00000000 D *UND* 00000000 _lua_type
00000000 D *UND* 00000000 _lua_pushstring
00000000 D *UND* 00000000 _luaL_checklstring
00000000 D *UND* 00000000 _lua_pushnumber
00000000 D *UND* 00000000 _luaL_newstate
00000000 D *UND* 00000000 _lua_getfield
00000000 D *UND* 00000000 _lua_createtable
00000000 D *UND* 00000000 _lua_isnumber
00000000 D *UND* 00000000 _luaL_checkinteger
00000000 D *UND* 00000000 _lua_pushnil
00000000 D *UND* 00000000 _lua_setfield
00000000 D *UND* 00000000 _lua_rawgeti
00000000 D *UND* 00000000 _lua_pushinteger
00000000 D *UND* 00000000 _lua_setmetatable
00000000 D *UND* 00000000 _lua_close
00000000 D *UND* 00000000 _luaL_loadfile
00000000 D *UND* 00000000 _lua_settable
00000000 D *UND* 00000000 _lua_pushboolean
00000000 D *UND* 00000000 _luaL_openlibs
00000000 D *UND* 00000000 _lua_getfenv
00000000 D *UND* 00000000 _lua_pushlightuserdata
00000000 D *UND* 00000000 _lua_pushvalue
00000000 D *UND* 00000000 _lua_tolstring
00000000 D *UND* 00000000 _lua_next
00000000 D *UND* 00000000 _lua_tonumber
00000000 D *UND* 00000000 _lua_gettable
Any idea ?
Philippe
QuoteReplyEditDelete
2008-03-14 03:53:38 Re: Cross-compilation lua/lighttpd problem
Andrea Federico Grisotto (ITALY)
Message: 52505 Hi Philippe,
if you don't find liblua.so you can modify the lua Makefile using this patch:
http://lua-users.org/lists/lua-l/2006-03/msg00119.html
QuoteReplyEditDelete
2008-03-14 04:40:57 Re: Cross-compilation lua/lighttpd problem
Philippe Le Gal (FRANCE)
Message: 52522 Hi Andrea
I applied the patch to the Makefile and try to compile again lua without success :
lua-5.1.3/src> make blackfin
make all CC="bfin-linux-uclibc-gcc" CFLAGS="-O2 -FPIC -DLUA_USE_POSIX" USE_LIBTOOL=1
make[1]: entrant dans le répertoire « /home/plegal/greta/formation-lcpc/cb/lua-5.1.3/src »
libtool --quiet --mode=compile bfin-linux-uclibc-gcc -c -O2 -FPIC -DLUA_USE_POSIX lapi.c
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[1]: *** [lapi.lo] Erreur 1
I'm not use with libtool.
Have you an idea ?
Thks
Philippe
QuoteReplyEditDelete
2008-03-14 05:11:05 Re: Cross-compilation lua/lighttpd problem
Andrea Federico Grisotto (ITALY)
Message: 52526 Hi Philippe,
that patch was only a suggestion, now I am heavy busy, when I finish my work
if you doesn't resolved I will help you.
QuoteReplyEditDelete
2008-03-14 05:27:23 Re: Cross-compilation lua/lighttpd problem
Philippe Le Gal (FRANCE)
Message: 52527 OK, I'll dig to find the solution...
Thanks
Philippe
QuoteReplyEditDelete
2008-03-14 06:17:02 Re: Cross-compilation lua/lighttpd problem
Yi Li (CHINA)
Message: 52531 you mentioned:
"root:~> lighttpd -f /etc/lighttpd.conf -D
lighttpd: can't resolve symbol '_lua_pushlstring'
When I've a look at mod_magnet.so, there is no reference to liblua.so :
"
I am wondering why you check mod_magnet.so instead of lighttpd (is it a script?) for those symbol?.
Also what is your kernel and toolchain version?
QuoteReplyEditDelete
2008-03-14 06:56:14 Re: Cross-compilation lua/lighttpd problem
Philippe Le Gal (FRANCE)
Message: 52536 Hi
Lighttpd is a binary but it use libs and one of the lib (mod_magnet) use another lib (liblua).
And I can't have the 3 compiled together...
My toochain : bfin-linux-uclibc-gcc version gcc 4.1.1 (ADI 07R1)
Kernel version : 2.6.22.15-ADI-2007R2-pre-svn
Philippe
QuoteReplyEditDelete
2008-03-17 00:19:30 Re: Cross-compilation lua/lighttpd problem
Mike Frysinger (UNITED STATES)
Message: 52576 if you built things as shared, then the lighttpd should all be undefined references, but either the main webserver or the sub modules should be linked against lua
look at the readelf -d output to make sure lua is listed as NEEDED
QuoteReplyEditDelete
2008-03-17 03:53:18 Re: Cross-compilation lua/lighttpd problem
Philippe Le Gal (FRANCE)
Message: 52577 Hi Mike,
I'll try your suggestion to finally make Lua working with Lighttpd.
For the moment, I concentrate my energie to make Lighttpd works with ClearSilver and it works very well.
I'll give a link to little tutorial for it a bit later.
It's cool to have a fast MVC framework on Blackfin !
Philippe