[CDRIVER-1952] cyrus header checks don't account for non-system paths Created: 09/Dec/16  Updated: 05/Jan/17  Resolved: 05/Jan/17

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.6.0

Type: Bug Priority: Major - P3
Reporter: Hannes Magnusson Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-1944 On macOS, config is unable to detect ... Closed

 Description   

if test "$enable_sasl" = "auto" -a "$sasl_mode" != "no"; then    
  AC_CHECK_HEADERS([sasl/sasl.h],    
     [have_sasl_headers=yes],    
     [have_sasl_headers=no])    
  if test "$have_sasl_headers" = "no"; then    
     SASL_LIBS=""    
     enable_sasl=no    
     sasl_mode=no    
  fi    
fi    

I don't know why we are doing this header check twice, but I believe it doesn't work for non-default search directories since we don't upgrade the CFLAGS with the cflags from the pkgconfig search.



 Comments   
Comment by Githook User [ 05/Jan/17 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1952 cyrus header checks don't account for non-system paths
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/c2c0611983f9ed83ff7f80c61c38fba26388df90

Comment by Hannes Magnusson [ 16/Dec/16 ]

This isn't actually broken today (and therefore not requesting 1.5.1 backport).

libsasl doesn't come with pkg-config compatible manifests, so the PKG_CHECK_MODULES() isn't ever going to succeed.
If some distro however happens to provide their own, then cool. It still will work (before this patch) as that will be system install, not custom directory.
So, this patch is only fixing a very hypothetical future case where someone makes up their own .pc file with libsasl installed in random location – or – if the next release (if there ever will be any) includes a .pc file, and people start installing it out-of-systemdir.

That is also the reason why there are two AC_CHECK_HEADER() checks, one for pkg-config installed, and one for everything else.

Generated at Wed Feb 07 21:13:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.