The basic bug, to quote below: "autoconf detects libbind.a and hence it gets linked into libldap{,_r}.so. libbind.a contains a broken implementation of getaddrinfo()" This is a documented debian bug: for further information, see debian bug #112459. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=112459&mbox=yes The way they dealt with it was to put in a conflict with bind-dev. Since you can't really install bind without bind-dev in gentoo, this probably isn't the best solution. The way I dealt with it was the attached patch to the ebuild. This a) tells the autoconf not to use -lbind to find it's resolv library and b) disables perl. Unfortunately, because perl also uses -lbind, when perl is enabled, configures adds -lbind to the Perl lib flags, as well as the main lib flags. ;-( I haven't figured out how to fix that one yet... Reproducible: Always Steps to Reproduce: 1. Emerge bind 2. Emerge openldap (I've confirmed this with 2.0.27-r5, 2.1.26 and 2.2.6) 3. Try and start slapd Actual Results: This causes a message saying that getaddrinfo returns null on startup, and slapd refuses to start.
Created attachment 27107 [details, diff] openldap-2.1.26.ebuild diff
disabling perl is not an option. i've never seen this problem case you describe here, and every openldap instance i have access to is linked against libresolv, and perl is linked against libresolv as well. i don't even have a libbind on my system and I do have BIND running as a nameserver here.