Litespeed standard >=5.2.8 does not work on FreeBSD 10 or 11

raphidae

Well-Known Member
#1
Tried upgrading an existing install of 5.2.6 i386 to 5.2.8 (lsws-5.2.8-std-i386-freebsd.tar.gz) and 5.3 (lsws-5.3-std-i386-freebsd.tar.gz).
The admin interface immediately stops working. In stderr.log is the following:
Code:
2018-09-16 00:05:44.570 [STDERR] /usr/local/lib/libexpat.so.1: unsupported file layout
<repeated for every request>
After some looking around I found where this comes from:
Code:
# ldd /usr/local/lsws/admin/fcgi-bin/admin_php5 
/usr/local/lsws/admin/fcgi-bin/admin_php5:
        libcrypt.so.5 => /usr/lib32/libcrypt.so.5 (0x2850f000)
        libexpat.so.1 => not found (0)
        librt.so.1 => /usr/lib32/librt.so.1 (0x28533000)
        libm.so.5 => /usr/lib32/libm.so.5 (0x28539000)
        libc.so.7 => /usr/lib32/libc.so.7 (0x28562000)
        libthr.so.3 => /usr/lib32/libthr.so.3 (0x286dd000)
libexpat.so.1 (or any other version) is not a file that is present on FreeBSD 10 or 11, and it is also not installed by compat8x (or other compat ports). So needing this file seems a bug to me.

When downgrading to 5.2.6 the admin interface works again, and this is the ldd output of that version:
Code:
# ldd /usr/local/lsws/admin/fcgi-bin/admin_php5
/usr/local/lsws/admin/fcgi-bin/admin_php5:
        libcrypt.so.5 => /usr/lib32/libcrypt.so.5 (0x2844e000)
        librt.so.1 => /usr/lib32/librt.so.1 (0x2846e000)
        libm.so.5 => /usr/lib32/libm.so.5 (0x28475000)
        libc.so.7 => /usr/lib32/libc.so.7 (0x284a4000)
        libthr.so.3 => /usr/lib32/libthr.so.3 (0x285fe000)
No libexpat.so.1 needed. Either Litespeed should include the file or not link against it. I haven't found a way to build a 32-bit libexpat on amd64 (the port only builds & installs the 64-bit version).

Thanks!
 

raphidae

Well-Known Member
#2
I tried getting the i386 package for expat2 and extract the libexpat.so.1 from there into /usr/local/lib32/compat, but this does not work. That directory is in the 32-bit compatibility path list for ldconfig, and I re-ran ldconfig as well.
For some reason admin_php5 only wants the 64-bit library, which obviously doesn't work, even if a 32-bit version is available.
Code:
# file ./libexpat.so.1
libexpat.so.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), dynamically linked, stripped
# LD_LIBRARY_PATH=.:/$LD_LIBRARY_PATH ./admin_php5    
/usr/local/lib/libexpat.so.1: unsupported file layout
 

raphidae

Well-Known Member
#3
This is probably not related, but in 5.2.6 and the later version I also noticed some noise in stderr.log:
Code:
2018-09-16 18:29:41.371 [STDERR] kevent(), mismatch handler, fd: 5, error: 9, filter: -1 flags: 4000
and
2018-09-16 18:51:26.068 [STDERR] usage: fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [--bind-address=host]
       [--ca-cert=file] [--ca-path=dir] [--cert=file] [--crl=file]
       [-i file] [--key=file] [-N file] [--no-passive] [--no-proxy=list]
       [--no-sslv3] [--no-tlsv1] [--no-verify-hostname] [--no-verify-peer]
       [-o file] [--referer=URL] [-S bytes] [-T seconds]
       [--user-agent=agent-string] [-w seconds] URL ...
       fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [--bind-address=host]
       [--ca-cert=file] [--ca-path=dir] [--cert=file] [--crl=file]
       [-i file] [--key=file] [-N file] [--no-passive] [--no-proxy=list]
       [--no-sslv3] [--no-tlsv1] [--no-verify-hostname] [--no-verify-peer]
       [-o file] [--referer=URL] [-S bytes] [-T seconds]
       [--user-agent=agent-string] [-w seconds] -h host -f file [-c dir]
Not sure where this comes from, probably the process that is binding the socket and some parameter error for fetch?
 
Last edited:

Pong

Administrator
Staff member
#4
We don't provide support for standard version anymore. You 'd better switch to OLS or LSWS Enterprise version,
 
Top