New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: fix HAVE_LDAP_SSL
, HAVE_LDAP_URL_PARSE
on non-Windows
#12006
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blind fix, let's see the CI results. Ref: curl#11964 (effort to sync cmake detections with autotools) Closes #xxxxx
16 tasks
HAVE_LDAP_SSL
for OpenLDAPHAVE_LDAP_SSL
, HAVE_LDAP_URL_PARSE
for OpenLDAP
do what autotools does: - always check for ldap_ssl.h, even with LDAPS force-disabled - set HAVE_LDAP_SSL if LDAPS enabled (default), regardless of the result of the ldap_ssl.h check. This header is missing from OpenLDAP packages, e.g. from the one bundled with macOS or the latest OpenLDAP installed via Homebrew on macOS.
concat seems unnecessary.
also make sure to target a macOS version when LDAP was not yet deprecated to avoid compiler warnings.
HAVE_LDAP_SSL
, HAVE_LDAP_URL_PARSE
for OpenLDAPHAVE_LDAP_SSL
, HAVE_LDAP_URL_PARSE
on non-Windows
Merged this one minor cleanup too early. The follow-up is in 4e8a3a1. |
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Oct 3, 2023
Left there by accident after adding proper detection for this. Follow-up to 772f0d8 curl#12006 Closes #xxxxx
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Oct 3, 2023
Left there by accident after adding proper detection for this. Follow-up to 772f0d8 curl#12006 Closes #xxxxx
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 3, 2023
We disabled it partly because in macOS builds LDAPS was not enable in CMake builds. Also wrongly assumed this also applies to autotools builds, but it turned out to be an issue with CMake builds and fixed here: curl/curl#12006 Try re-enabling to see how it goes. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. We must build for Mavericks to avoid these warnings. First, let's try without changing the target.
vszakats
added a commit
that referenced
this pull request
Oct 3, 2023
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 3, 2023
We disabled it partly because in macOS builds LDAPS was not enable in CMake builds. Also wrongly assumed this also applies to autotools builds, but it turned out to be an issue with CMake builds and fixed here: curl/curl#12006 Try unblocking to see how it goes. We might still want to block it in the future. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. We must build for Mavericks to avoid these warnings. First, let's try without changing the target. UPDATE: It cases warnings, but there are some even without this feature enabled.
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 3, 2023
On macOS this auto-detects LDAP (tested with CMake), but not LDAPS. CMake fix pending: curl/curl#12006
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 3, 2023
We disabled it partly because in macOS builds LDAPS was not enabled in CMake builds. Also wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds and fixed here: curl/curl#12006 (in curl 8.4.0) We this fix, we can enable it. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present.
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 3, 2023
We disabled it partly because in macOS builds LDAPS was not enabled in CMake builds. Also wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds and fixed here: curl/curl#12006 (in curl 8.4.0) We this fix, we can enable it. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present.
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 4, 2023
We disabled it partly because in macOS CMake builds, LDAPS did not enable automatically. We wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds only and fixed here: curl/curl#12006 (in curl 8.4.0) With this fix landed, we can re-enable it in CMake and re-enable with autotools for all curl versions. With 8.3.0 this will only enable LDAP, without LDAPS. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, we target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present, but we only enable LDAP/LDAPS on macOS when targeting 10.9. Also fix `_OSVER` value for `10.[0-9]` inputs.
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 5, 2023
On macOS this auto-detects LDAP (tested with CMake), but not LDAPS. CMake fix pending: curl/curl#12006
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 5, 2023
We disabled it partly because in macOS CMake builds, LDAPS did not enable automatically. We wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds only and fixed here: curl/curl#12006 (in curl 8.4.0) With this fix landed, we can re-enable it in CMake and re-enable with autotools for all curl versions. With 8.3.0 this will only enable LDAP, without LDAPS. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, we target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present, but we only enable LDAP/LDAPS on macOS when targeting 10.9. Also fix `_OSVER` value for `10.[0-9]` inputs.
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 5, 2023
We disabled it partly because in macOS CMake builds, LDAPS did not enable automatically. We wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds only and fixed here: curl/curl#12006 (in curl 8.4.0) With this fix landed, we can re-enable it in CMake and re-enable with autotools for all curl versions. With 8.3.0 this will only enable LDAP, without LDAPS. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, we target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present, but we only enable LDAP/LDAPS on macOS when targeting 10.9. Also fix `_OSVER` value for `10.[0-9]` inputs.
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 7, 2023
On macOS this auto-detects LDAP (tested with CMake), but not LDAPS. CMake fix pending: curl/curl#12006
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 7, 2023
We disabled it partly because in macOS CMake builds, LDAPS did not enable automatically. We wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds only and fixed here: curl/curl#12006 (in curl 8.4.0) With this fix landed, we can re-enable it in CMake and re-enable with autotools for all curl versions. With 8.3.0 this will only enable LDAP, without LDAPS. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, we target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present, but we only enable LDAP/LDAPS on macOS when targeting 10.9. Also fix `_OSVER` value for `10.[0-9]` inputs.
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 7, 2023
On macOS this auto-detects LDAP (tested with CMake), but not LDAPS. CMake fix pending: curl/curl#12006
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 7, 2023
We disabled it partly because in macOS CMake builds, LDAPS did not enable automatically. We wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds only and fixed here: curl/curl#12006 (in curl 8.4.0) With this fix landed, we can re-enable it in CMake and re-enable with autotools for all curl versions. With 8.3.0 this will only enable LDAP, without LDAPS. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, we target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present, but we only enable LDAP/LDAPS on macOS when targeting 10.9. Also fix `_OSVER` value for `10.[0-9]` inputs.
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 7, 2023
On macOS this auto-detects LDAP (tested with CMake), but not LDAPS. CMake fix pending: curl/curl#12006
vszakats
added a commit
to vszakats/curl-for-win
that referenced
this pull request
Oct 7, 2023
We disabled it partly because in macOS CMake builds, LDAPS did not enable automatically. We wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds only and fixed here: curl/curl#12006 (in curl 8.4.0) With this fix landed, we can re-enable it in CMake and re-enable with autotools for all curl versions. With 8.3.0 this will only enable LDAP, without LDAPS. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, we target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present, but we only enable LDAP/LDAPS on macOS when targeting 10.9. Also fix `_OSVER` value for `10.[0-9]` inputs.
vszakats
added a commit
to curl/curl-for-win
that referenced
this pull request
Oct 8, 2023
On macOS this auto-detects LDAP (tested with CMake), but not LDAPS. CMake fix pending: curl/curl#12006
vszakats
added a commit
to curl/curl-for-win
that referenced
this pull request
Oct 8, 2023
We disabled it partly because in macOS CMake builds, LDAPS did not enable automatically. We wrongly assumed this also applies to autotools builds, but it turned out this was an issue with CMake builds only and fixed here: curl/curl#12006 (in curl 8.4.0) With this fix landed, we can re-enable it in CMake and re-enable with autotools for all curl versions. With 8.3.0 this will only enable LDAP, without LDAPS. The other reason for disabling it was that Apple deprecated the LDAP API in 10.10. To avoid extra deprecation warnings coming with LDAP on macOS, we target OS X 10.9 Mavericks instead of High Sierra. The build also runs fine with these warning present, but we only enable LDAP/LDAPS on macOS when targeting 10.9. Also fix `_OSVER` value for `10.[0-9]` inputs.
zuoxiaofeng
pushed a commit
to zuoxiaofeng/curl
that referenced
this pull request
Nov 28, 2023
- set `HAVE_LDAP_URL_PARSE` if `ldap_url_parse` function exists. Before this patch we set it based it on the presence of `stricmp`, which correctly enabled it on e.g. Windows, but was inaccurate for other platforms. - always set `HAVE_LDAP_SSL` if an LDAP backend is detected and LDAPS is not explicitly disabled. This mimics autotools behaviour. Previously we set it only for Windows LDAP. After this fix, LDAPS is correctly enabled in default macOS builds. - enable LDAP[S] for a CMake macOS CI job. Target OS X 10.9 (Mavericks) to avoid deprecation warnings for LDAP API. - always detect `HAVE_LDAP_SSL_H`, even with LDAPS explicitly disabled. This doesn't make much sense, but let's do it to sync behaviour with autotools. - fix benign typo in variable name. Ref: curl#11964 (effort to sync cmake detections with autotools) Closes curl#12006
zuoxiaofeng
pushed a commit
to zuoxiaofeng/curl
that referenced
this pull request
Nov 28, 2023
Follow-up to 772f0d8 curl#12006
zuoxiaofeng
pushed a commit
to zuoxiaofeng/curl
that referenced
this pull request
Nov 28, 2023
Left there by accident after adding proper detection for this. Follow-up to 772f0d8 curl#12006 Ref: curl#11964 (effort to sync cmake detections with autotools) Closes curl#12015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
set
HAVE_LDAP_URL_PARSE
ifldap_url_parse
function exists.Before this patch we set it based it on the presence of
stricmp
,which correctly enabled it on e.g. Windows, but was inaccurate for
other platforms.
always set
HAVE_LDAP_SSL
if an LDAP backend is detected andLDAPS is not explicitly disabled. This mimics autotools behaviour.
Previously we set it only for Windows LDAP. After this fix, LDAPS is
correctly enabled e.g. in default macOS builds.
enable LDAP[S] for a CMake macOS CI job. Target OS X 10.9 (Mavericks)
to avoid deprecation warnings for LDAP API.
always detect
HAVE_LDAP_SSL_H
, even with LDAPS explicitly disabled,to sync behaviour with autotools.
fix benign typo in internal variable name.
eliminate an internal variable.
Ref: #11964 (effort to sync cmake detections with autotools)
Closes #12006