windos编译安装clickhouse(2)-编译openldap

上一篇已经部署好linux下需要安装的编译工具了,下面直接cmake,然后理所当然地报错了。
看上去应该是需要openladp,编译安装试试

CMake Error at cmake/find/ldap.cmake:75 (message):
  Cannot enable LDAP support
Call Stack (most recent call first):
  CMakeLists.txt:503 (include)

先编译dbd

wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar -zxvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/
cd build_unix
 ../dist/configure --enable-mingw --enable-cxx --disable-shared --disable-replication
make
make install

编译regex

wget https://ftp.gnu.org/pub/old-gnu/regex/regex-0.12.tar.gz
tar -zxvf regex-0.12.tar.gz
./configure
make subdirs=
ar ru libregex.a regex.o
mkdir -p /usr/local/mingw/include
mkdir -p /usr/local/mingw/lib
cp regex.h /usr/local/mingw/include
cp libregex.a /usr/local/mingw/lib

安装gdbm libtool

pacman -S libtool gdbm

安装openldap

msys 不能解压有软链接的包,所以需要下载源码到本地,解压了在放到/usr/src/ldap里
https://www.openldap.org/software/download/
cd /usr/src/ldap
env  CPPFLAGS=-I/usr/local/mingw/include  LDFLAGS=-L/usr/local/mingw/lib #这里主要是regex的环境变量
./configure --prefix=/usr/local/mingw
make depend 
make
make install

你可能感兴趣的:(windos编译安装clickhouse(2)-编译openldap)