node-LDAP icon indicating copy to clipboard operation
node-LDAP copied to clipboard

Fix node12 compilation errors and get it working on centos 7

Open jjhoughton opened this issue 5 years ago • 1 comments

This PR:

  • fixes the compilation errors when compling with node12
  • If you are using linux and are compiling with node10 or above it'll use a prebuilt version of libldap and liblber that is compiled against the same version of openssl that node uses. As i've removed the dependancy on openldap i've included the headers in this pr so you no longer have to have openldap-devel installed. Notice i've commited liblber.a and libldap.a. They where compiled like this https://github.com/jjhoughton/napi-ldap/pull/3/commits/14abe78a4098858815e5a8665a91a028ba8c72db See the commit message for more details
commit 37dbb2043fbab457d1a4aba01fe13820f0d75627 (HEAD, ripjar/fix-node12-compilation-errors)
Author: Joshua Houghton <[email protected]>
Date:   Fri Aug 14 16:44:03 2020 +0000

    Remove dependancy on libldap on linux

    The issue is that centos 7 has the old version of openssl installed
    and node12 is compiled with the new version of openssl. As libldap
    on centos 7 is compiled against the old version of openssl we get a
    segfault if we compile against the system version of libldap.

    Thereofore I've built a version of libldap against the correct
    version of openssl which i then statically link against my node
    library. I've also included the ldap header file so i can remove
    the dependancy on openldap-devel.

    Signed-off-by: Joshua Houghton <[email protected]>

jjhoughton avatar Aug 16 '20 10:08 jjhoughton

I've also got this to work with mac and centos6 with node10 and node12 https://github.com/ripjar/node-LDAP/pull/1 i'll port the changes across if you're interested

jjhoughton avatar Sep 07 '20 16:09 jjhoughton