Make from source. ldap error

Hi! i try make libreoffice from source.

# ./ --without-java --enable-gtk3

configure without errors.

after configure i try make:

# make

and have error:

# make
checking whether getpwuid_r takes a fifth argument... yes
checking whether strerror_r returns int... no
checking for ldap_bind in -lldap... yes
checking for ldap_simple_bind in -lldap_r... no
configure: error: library 'ldap_r' is required for LDAP
/root/libreoffice/external/postgresql/ ошибка выполнения рецепта для цели «/root/libreoffice/workdir/ExternalProject/postgresql/build»
make[1]: *** [/root/libreoffice/workdir/ExternalProject/postgresql/build] Ошибка 1
make[1]: *** Ожидание завершения заданий…
Makefile:247: ошибка выполнения рецепта для цели «build»
make: *** [build] Ошибка 2

my system:

root@libra:~# uname -a
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u1 x86_64 GNU/Linux
root@libra:~# dpkg -l | grep -i ldap
ii  golang-openldap-dev                   0.2-1                              all          OpenLDAP client integration for Go, using cgo
ii  ldap-utils                            2.4.40-4                           amd64        OpenLDAP utilities
ii  ldapscripts                           2.0.5-1                            all          Add and remove users and groups (stored in a LDAP directory)
ii  libldap-2.4-2:amd64                   2.4.40-4                           amd64        OpenLDAP libraries
ii  libldap-2.4-2-dbg:amd64               2.4.40-4                           amd64        Debugging information for OpenLDAP libraries
ii  libldap-java                          4.18+dfsg1-1                       all          Netscape Directory SDK for Java
ii  libldap2-dev:amd64                    2.4.40-4                           amd64        OpenLDAP development libraries
ii  libnet-ldap-perl                      1:0.6400+dfsg-2                    all          client interface to LDAP servers
ii  libsasl2-modules-ldap:amd64           2.1.26.dfsg1-13                    amd64        Cyrus SASL - pluggable authentication modules (LDAP)
ii  python-ldap                           2.4.10-1                           amd64        LDAP interface module for Python
ii  python-ldap-dbg                       2.4.10-1                           amd64        LDAP interface module for Python (debug extension)
ii  slapd                                 2.4.40-4                           amd64        OpenLDAP server (slapd)
ii  smbldap-tools                         0.9.9-1                            all          Scripts to manage Unix and Samba accounts stored on LDAP

How to fix it?

You need to add the line:

-lpthread \

to /external/postgresql/ b/external/postgresql/

Check out this post:

Which shows you: