pr-
pr-

Reputation: 402

Lighttpd References Wrong Lib Location

I'm cross compiling lighttpd for use on an arm system. I'm setup with an NFS system, whose root directory is located at /home/user/targetfs. I'm able to set up the server to run perfectly fine. The problem that I have is that my modules are trying to be found in the incorrect directory.

./configure --host=${TARGET_SYS} --disable-short-tags --without-mysql --without-pear --disable-all --disable-short-tags --without-pcre --without-zlib --without-bzip2

The error message that I am running into is the following:

2012-04-29 23:14:07: (plugin.c.169) dlopen() failed for: /home/user/targetfs/lib/mod_indexfile.so /home/user/targetfs/lib/mod_indexfile.so: cannot open shared object file: No such file or directory                                           
2012-04-29 23:14:07: (server.c.676) loading plugins finally failed 

I know the cheap workaround is to just copy the mod files to where it says that it is looking for them at. Is there a way that I can change a configure option in order to point lighttpd to look in /lib for the mods?

Upvotes: 1

Views: 2740

Answers (2)

Tijl
Tijl

Reputation: 1

When you run configure, the -prefix and/or --libdir options will hard-wire the module path into the binary you are about to build. A common mistake is to set these to paths on your host system. In stead, you should set it to paths on your target system. In this case, you want --libdir=/lib Then, when you run make install (after running make), you can give it a "DESTDIR" option:

make install DESTDIR=/home/user/targetfs

The result is that everything ends up under /home/user/targetfs on your host system, but that the binary, once deployed on the target, will look for modules in /lib

(I had the same problem. Searching first brought me here, and then to the lighttpd forum where I found this solution.)

Upvotes: 0

pr-
pr-

Reputation: 402

I created a temporary workaround that just uses the following:

lighttpd -m /lib -f /var/www/lighttpd.conf 

Upvotes: 2

Related Questions