Bug #1956
closedmod_magnet lua issue
Description
Running lighttpd 1.4.20 and lua 5.1.4 causes an issue on CentOS 4 with kernel 2.6.18-8.1.14.el5.028stab045.1PAE i686 i686 i386 GNU/Linux
Having both built lua 5.1.4 from source and installed from rpm does not resolve this issue. With the install from source complied a shared library.
mkdir -p /usr/local/lua
cd /usr/local/lua
wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
tar -zxvf lua-5.1.4.tar.gz
cd /usr/local/lua/lua-5.1.4
make linux
make test
make install
cp /usr/local/lua/lua-5.1.4/etc/lua.pc /usr/local/lib/pkgconfig/
ranlib /usr/local/lib/liblua.a
cd /usr/local/lib
gcc -shared -o liblua.5.1.4.so /usr/local/lib/liblua.a
ln -s liblua.5.1.4.so liblua.so
- lighttpd lua recompile
cd /var/tmp
wget http://www.lighttpd.net/download/lighttpd-1.4.20.tar.gz
tar -xzvf lighttpd-1.4.20.tar.gz
cd /var/tmp/lighttpd-1.4.20
make distclean
./configure --with-zlib --with-bzip2 --with-openssl=/usr/local/ssl --with-lua LUA_LIBS=/usr/local/lib LUA_CFLAGS=-I/usr/local/bin
Having tried lua in both /usr/bin and usr/local/bin seems to make no difference, once mod-magnet is added to the lighttpd.conf the following error results.
Starting lighttpd: 2009-04-08 09:05:43: (plugin.c.165) dlopen() failed for: /usr/local/lib/mod_magnet.so /usr/local/lib/mod_magnet.so: undefined symbol: lua_touserdata
2009-04-08 09:05:43: (server.c.610) loading plugins finally failed
Any help would be appreciated. Thanks
Updated by earthgecko about 16 years ago
This has previously been put through the forum with no luck as well. http://redmine.lighttpd.net/boards/2/topics/593
Updated by stbuehler about 16 years ago
- Status changed from New to Invalid
- Target version deleted (
1.4.20)
The LUA_LIBS var must include "-llua". You really should have lighty find the lua libs via pkg-config.
Target version != affected version, and 1.4.22 is the current release.
Updated by earthgecko over 15 years ago
Update:
I just thought I would update this with some additional information.
I upgraded a server from 1.4.18 to 1.4.25 and ran into the same problem again.
#Starting lighttpd: 2010-01-06 15:18:35: (plugin.c.165) dlopen() failed for: /usr/lib/lighttpd/mod_magnet.so /usr/lib/lighttpd/mod_magnet.so: cannot open shared object file: No such file or directory #2010-01-06 15:18:35: (server.c.614) loading plugins finally failed
I noted that the actual lighttpd libs were in /usr/local/lib and ran make uninstall on the 1.4.18 again and on the 1.4.25 then reconfigured lighttpd 1.4.25 with:
./configure --libdir=/usr/local/lib --with-zlib --with-bzip2 --with-openssl=/usr/local/ssl --with-lua
The same thing, a bit further investigation showed that the /etc/rc.d/init.d/lighttpd file had the incorrect path in it. It was referencing /usr/sbin/lighttpd instead of /usr/local/sbin/lighttpd modifying this resolved the issue. Just flagging it up if anyone else runs into any similar module loading problems.
Also available in: Atom