kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
739 stars 253 forks source link

Unable to compile (error: undefined reference to 'ber_sockbuf_add_io') #26

Closed simkin closed 10 years ago

simkin commented 11 years ago

Compilation fails on Debian Wheezy:

        objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o \
        objs/ngx_modules.o \
        -lpthread -lcrypt -lldap -lpcre -lssl -lcrypto -ldl -lz
/usr/src/nginx-auth-ldap//ngx_http_auth_ldap_module.c:1112: error: undefined reference to 'ber_sockbuf_add_io'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/usr/src/nginx-1.4.3'
make: *** [build] Error 2

I already have several ldap packages installed. Please advise which packages are mandatory for successfull compilation

dpkg --get-selections | grep -v deinstall |grep ldap
ldap-utils                                      install
libldap-2.4-2:amd64                             install
libldap-ocaml-dev                               install
libldap2-dev:amd64                              install
lua-ldap:amd64                                  install
ruby-ldap                                       install

OS: 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

itsoli commented 10 years ago

Adding -llber to the linker flags fixed compilation with recent OpenLDAP versions for me.

simkin commented 10 years ago

That works, thanks!

jefferai commented 10 years ago

I ran into this as well; perhaps it should be added into config by default?

dkavedk commented 10 years ago

Secundo la moción.