#50310 SASL headers are not detected after pkg-config change
Opened 3 months ago by firstyear. Modified 2 months ago

Issue Description

After the merge of the PKG_CONFIG change, on SUSE the server fails to build.

This is because the pkg-config for sasl contains:

libdir = /usr/lib64

Name: Cyrus SASL
Description: Cyrus SASL implementation
URL: http://www.cyrussasl.org/
Version: 2.1.26
Libs: -L${libdir} -lsasl2
Libs.private:  -ldl -lresolv

Note the lack of include directory - where all sasl headers are in /usr/include/sasl/sasl.h

As a result, we should use sasl/sasl.h instead of sasl.h is the code base.

Metadata Update from @firstyear:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None

3 months ago

Your libsasl2.pc file should have a Cflags line in it. But it only references the system's includedir.

I worked around the issue by adding the below lines to configure.ac in my pkg-config patches, but it looks like $includedir isn't working for you. Using $oldincludedir should work on all platforms, but your fix is the correct way forwards. sasl.h is supposed to be included by #include <sasl/sasl.h>, which is why libsasl.pc only specifies the system's includedir.

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

@hmc This is what I have on OpenSUSE tumbleweed, so likely it's upstream or some configure related decision. Additionally, if it's not SUSE, it'll be another platform that highlights this issue.

So I agree, I think the sasl/sash.h is correct solution here, to solve this "once and forall".

@mreynolds Do you mind checking this?

Most likely. On Debian, the Cflags line is present. If this works for @mreynolds, it is safe to remove the lines I copied in above.

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.4.1

2 months ago

Login to comment on this ticket.