litespeedtech / third-party

Third party libraries used by some of our software
4 stars 8 forks source link

Libmodsec cannot find the LMDB library in the `lib` folder when running `build_ols.sh`. #10

Closed dev-zhandos closed 3 weeks ago

dev-zhandos commented 3 weeks ago

Problem:

Libmodsec cannot find the LMDB library in the lib folder when running build_ols.sh.

configure: LMDB headers found at: /usr/local/src/third-party/include
configure: error: LMDB was explicitly referenced but it was not found
make: *** No targets specified and no makefile found.  Stop.
cp: cannot stat 'src/.libs/libmodsecurity.a': No such file or directory

on FreeBSD 14, Debian 12, Ubuntu 24

rperper commented 3 weeks ago

Can you verify that there is a libmaxminddb.a in third-party/lib?

dev-zhandos commented 3 weeks ago

Yes, there is a libmaxminddb.a in third-party/lib folder after running build_ols.sh.

[root@vultr lib]# ls
cmake               libbrotlicommon.so.1      libbrotlidec.so.1      libbrotlienc.so.1      libcurl.a      libIP2Location.a   libluajit-5.1.la  libpcre.a      libpcreposix.a   libxml2.a   libz.a
libaio.a            libbrotlicommon.so.1.0.7  libbrotlidec.so.1.0.7  libbrotlienc.so.1.0.7  libcurl.la     libIP2Location.la  libluajit.a       libpcrecpp.a   libpcreposix.la  libxml2.la  lua
libbcrypt.a         libbrotlicommon-static.a  libbrotlidec-static.a  libbrotlienc-static.a  libdecrepit.a  liblmdb.a          libmaxminddb.a    libpcrecpp.la  libssl.a         libyajl.a   pkgconfig
libbrotlicommon.so  libbrotlidec.so           libbrotlienc.so        libcrypto.a            libexpat.a     libluajit-5.1.a    libmaxminddb.la   libpcre.la     libudns.a        libyajl.la  xml2Conf.sh 
dev-zhandos commented 3 weeks ago

Uncommenting these lines in third-party/script/build.lmdb.sh solved the problem. Tested in Rocky Linux 9 and Ubuntu 24

https://github.com/litespeedtech/third-party/blob/99eb3c6625d4fabefb9720753f4e054b0bf7f07d/script/build_lmdb.sh#L39-L40

litespeedtech commented 3 weeks ago

Not sure why it was commented out. merged the pull request.