Skip to content

Reason for linking against both libldap and libldap_r #13

Open
@jeremyevans

Description

@jeremyevans

In the extconf.rb file, for OpenLDAP2, ruby-ldap attempts to link to both libldap and libldap_r: https://github.com/alexey-chebotar/ruby-ldap/blob/master/extconf.rb#L189

This causes problems on OpenBSD, since both ldap and ldap_r may define the same symbols, but they may be defined differently. This causes the following warning message when ruby-ldap is loaded:

ruby18:/usr/local/lib/libldap_r.so.12.0: /usr/local/lib/libldap.so.12.0 : WARNING: symbol(ldap_int_global_options) size mismatch, relink your program

Installing the gem using either --without-libldap or --without-libldap_r fixes the problem. Is there a reason ruby-ldap attempts to load both ldap and ldap_r? If not, is there a preference for loading ldap or ldap_r? I maintain the ruby-ldap port for OpenBSD, and am leaning towards using --without-libldap_r, but would like to make sure that will not cause other problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions