DragonFlyBSD / DPorts

The dedicated application build system for DragonFly BSD
Other
89 stars 44 forks source link

net/nss-pam-ldapd NSS module fails to export required symbol, can't be linked at runtime #83

Closed ftigeot closed 10 years ago

ftigeot commented 10 years ago

net/nss-pam-ldapd provides a Name Service Switch module compatible with the reference nss_ldap implementation.

Howewer, this module can't be linked in at runtime by applications due to a missing symbol. Various messages similar to these ones are shown in /var/log/messages: nslcd: NSSWITCH(nss_load_module): ldap, Undefined symbol "nss_module_register" cron[5716]: NSSWITCH(nss_load_module): ldap, Undefined symbol "nss_module_register" newsyslog: NSSWITCH(nss_load_module): ldap, Undefined symbol "nss_module_register"

It turns out nss-pam-ldapd chooses which type of libc interface to use (glibc,solaris or freebsd) by checking the name of the operating system it is built on (in a configure script).

Adding CONFIGURE_ARGS+= --with-nss-flavour=freebsd in Makefile.DragonFly forces it to always use the FreeBSD libc interface and provide the required symbols in /usr/local/lib/nss_ldap.so.1 and fixes operation on DragonFly.

With this simple one-line change, nss-pam-ldapd works as expected.

jrmarino commented 10 years ago

done! https://github.com/DragonFlyBSD/DPorts/commit/9ae75f2b0ef2b430fb5fffac44c59deec8f54205