From 88cd377e04d624c076867b2570a7c11cd4d24d26 Mon Sep 17 00:00:00 2001
From: Xueshan Feng <xueshan-feng@stanford.edu>
Date: Wed, 4 Mar 2020 21:02:20 -0800
Subject: [PATCH] Add libkrb5-dev; ln -s libsasl2.so.3.0.0 libsasl2.so.2.

---
 build.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/build.sh b/build.sh
index 340fd99..cb3b89c 100755
--- a/build.sh
+++ b/build.sh
@@ -20,6 +20,7 @@ function apt_get_install {
     groff-base \
     libsasl2-modules-gssapi-mit \
     libc6-dev \
+    libkrb5-dev \
     libssl-dev \
     libsasl2-dev \
     libperl-dev \
@@ -51,6 +52,7 @@ function install_cyrus_sasl {
         CFLAGS="-Wno-cast-function-type -Wno-implicit-function-declaration"
     make && make install
     ln -s ${ARTIFACTS}/usr/lib/sasl2 /usr/lib/sasl2
+    (cd ${ARTIFACTS}/usr/lib; ln -s libsasl2.so.3.0.0 libsasl2.so.2)
 }
 
 # Install OpenLDAP
@@ -67,9 +69,7 @@ function install_openldap {
         --enable-slapd --enable-dynacl --enable-aci --enable-cleartext --enable-crypt --enable-spasswd \
         --enable-rewrite --enable-rlookups --enable-slapi --enable-backends=mod --enable-overlays=mod \
         --with-subdir=ldap --with-cyrus-sasl --with-threads --with-tls=openssl \
-        LDFLAGS="-L${ARTIFACTS}/usr/lib \
-             -L${ARTIFACTS}/usr/lib/sasl2 \
-             -Wl,-rpath,${ARTIFACTS}/usr/lib,-rpath,${ARTIFACTS}/usr/lib/sasl2" \
+        LDFLAGS="-L/usr/lib/sasl2 -Wl,-rpath,/usr/lib/sasl2" \
         CFLAGS="-Wno-cast-function-type \
                 -Wno-implicit-function-declaration \
                 -Wno-incompatible-pointer-types \
-- 
GitLab