#50311 Ticket 50310 - fix sasl header include
Closed 3 years ago by spichugi. Opened 5 years ago by firstyear.
firstyear/389-ds-base xxxxx-sasl2-pc  into  master

file modified
-2
@@ -838,8 +838,6 @@ 

  m4_include(m4/db.m4)

  

  PKG_CHECK_MODULES([SASL], [libsasl2])

- # Workaround failure by Mozilla ldapsdk to #include <sasl/sasl.h>

- SASL_CFLAGS="$SASL_CFLAGS -I$includedir/sasl"

  

  PKG_CHECK_MODULES([ICU], [icu-i18n >= 60.2])

  

file modified
+1 -1
@@ -39,7 +39,7 @@ 

  #include "fe.h"

  #include "pratom.h"

  #include "pw_verify.h"

- #include <sasl.h>

+ #include <sasl/sasl.h>

  

  static void log_bind_access(

      Slapi_PBlock *pb,

@@ -22,7 +22,7 @@ 

  #include "prcvar.h"

  #include "prlog.h" /* for PR_ASSERT */

  #include "fe.h"

- #include <sasl.h>

+ #include <sasl/sasl.h>

  #if defined(LINUX)

  #include <netinet/tcp.h> /* for TCP_CORK */

  #endif

@@ -404,7 +404,7 @@ 

      return rc;

  }

  

- #include <sasl.h>

+ #include <sasl/sasl.h>

  

  int

  slapi_ldap_get_lderrno(LDAP *ld, char **m, char **s)

file modified
+1 -1
@@ -14,7 +14,7 @@ 

  #include "slap.h"

  #include "slapi-plugin.h"

  #include "fe.h"

- #include <sasl.h>

+ #include <sasl/sasl.h>

  #include <arpa/inet.h>

  #ifndef USE_OPENLDAP

  #include "mozldap.h"

@@ -20,8 +20,8 @@ 

  #include <slap.h>

  #include <fe.h>

  #include <pw_verify.h>

- #include <sasl.h>

- #include <saslplug.h>

+ #include <sasl/sasl.h>

+ #include <sasl/saslplug.h>

  #include <unistd.h>

  

  static char *serverfqdn;

@@ -41,7 +41,7 @@ 

  #include <ldap.h>

  #include "ldaptool.h"

  #include "ldaptool-sasl.h"

- #include <sasl.h>

+ #include <sasl/sasl.h>

  #include <stdio.h>

  

  #if defined(HPUX)

@@ -39,7 +39,7 @@ 

  #include "ldclt.h"                              /* This tool's include file */

  #include "utils.h" /* Utilities functions */    /*JLS 14-11-00*/

  

- #include <sasl.h>

+ #include <sasl/sasl.h>

  #include "ldaptool-sasl.h"

  #if !defined(USE_OPENLDAP)

  #include <ldap_ssl.h> /* ldapssl_init(), etc... */

Bug Description: After the merge of the PKG_CONFIG change, on SUSE
the server fails to build. This is because the pkg-config for
sasl on suse doesn't add the -I include for sasl to the path so
using sasl.h doesn't work.

Fix Description: Change all references to sasl/sasl.h

https://pagure.io/389-ds-base/issue/50310

Author: William Brown william@blackhats.net.au

Review by: ???

RPM build passes basic and sasl tests on F29. :thumbsup:

Please remove the following lines from configure.ac:
# Workaround failure by Mozilla ldapsdk to #include <sasl/sasl.h>
SASL_CFLAGS="$SASL_CFLAGS -I$oldincludedir/sasl"

Then autoreconf -fiv and compile as normal (./configure --enable-debug --with-openldap --enable-cmocka --enable-asan)

These lines should no longer be needed, but it is better to check on a few platforms.

@mreynolds I know you're probably busy, but any time to check this?

@mreynolds I know you're probably busy, but any time to check this?

Sorry this was on my list of things to do today, and.... its done! Works for me, ack!

@hmc I applied your suggested change to @firstyear patch, and it also works for me. So double ack!

@firstyear can you also test @hmc's change?

Which change is that? This is a follow up to @hmc's change to fix thebuild on suse? So I think I have tested it?

Anyway, unless you "scream" in the next few hours, I'll merge it this afternoon, thanks mate :)

Which change is that?

Remove these lines from configure.ac:

# Workaround failure by Mozilla ldapsdk to #include <sasl/sasl.h>
SASL_CFLAGS="$SASL_CFLAGS -I$oldincludedir/sasl"

It would be nice to remove these lines if they are not needed

Sure, I'll remove those, test, and then merge then?

Sure, I'll remove those, test, and then merge then?

:thumbsup:

rebased onto bc20722

5 years ago

Pull-Request has been merged by firstyear

5 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3370

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago