I?m trying to get Omega to work via CGI on OpenBSD with httpd and slowcgi. slowcgi: env[30], SERVER_PROTOCOL=HTTP/1.1 slowcgi: env[31], SERVER_SOFTWARE=OpenBSD httpd slowcgi: fork: /cgi-bin/omega execve: cannot load /usr/libexec/ld.so ? # pwd /var/www/cgi-bin # file omega omega: ELF 64-bit LSB shared object, x86-64, version 1 # pkg_info |grep xapian xapian-bindings-python-1.4.24p0 python bindings for Xapian xapian-core-1.4.24 search engine library xapian-omega-1.4.24 web search application The issue I?m having is that because slowcgi runs in a chroot environment the omega executable cannot load its shared libraries. Should the omega executable be built statically in this case? I feel like I must be missing something obvious, because I don?t see how the OpenBSD Omega package can ever work without completely defeating chroot. Big thanks in advance, Andrew
On Mon, Sep 23, 2024 at 01:20:31PM +0200, Andrew McConachie wrote:> The issue I?m having is that because slowcgi runs in a chroot environment > the omega executable cannot load its shared libraries. Should the omega > executable be built statically in this case? I feel like I must be missing > something obvious, because I don?t see how the OpenBSD Omega package can > ever work without completely defeating chroot.If you're going to run something using shared libraries in a chroot-ed environment, you're going to need to ensure those shared libraries are available inside the chroot (e.g. by hard linking or copying them into the chroot - simplest approach is to ensure they have the same paths inside as outside). Linking statically would work too but has the usual downsides. This isn't specific to Omega or Xapian at all though - if the slowcgi docs don't discuss solutions to this I'd suggest reaching out to the slowcgi developers. Cheers, Olly