ZhangHuangbin wrote:I got "Segmentation fault" too.
Not sure why it happened. Can you try to delete OpenLDAP (and all data) and re-install it?
Also, you can try other supported distributions: RHEL, CentOS, Debian 5, Ubuntu 10.04 LTS.
The reason is:
The "LDAP_R_COMPILE" flag in /etc/make.conf is turned on to make it build and install a libldap_r library . So it installs the "ldap-client" port first which installs that library.
Then it builds the actual server code from the "ldap-server" port. But there it has the "WITH_SHELL" flag turned on which is supposed to turn OFF the threaded version. Somehow OpenLDAP's configure script still picks up this libldap_r library and links it in even though the code isn't compile with all the right flags.
Result is that the slapd binary is now trying to use the wrong library code that expects certain structures to be initialized but they're not, so SEGFAULT.
So just have to manually re-install the net/openldap24-server port without the SHELL backend module.
(credits: Ivan)