-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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: drop libssh CONFIG-style detection #14614
Closed
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
vszakats
changed the title
cmake: try dropping libssh hack 1
cmake: drop libssh CONFIG-style detection
Aug 20, 2024
vszakats
added a commit
that referenced
this pull request
Aug 20, 2024
For libssh, it fixes a "unity" build issue where libssh deprecation warnings were not suppressed before this patch, because the suppression macro was only set before just one of the two `libssh.h` includes. If the other was compiled first in unity mode, the warnings appeared. Seen in local curl-for-win build (`CW_CONFIG=test-x64-libssh-quictls`) with libssh 0.11.0. (Also in a GHA/macos cmake job upcoming in #14614) Use this opportunity to drop duplicate SSH header includes from the SSH modules. It's enough to include them via the common `ssh.h` header. Closes #14612
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Aug 20, 2024
``` /Users/runner/work/curl/curl/lib/version.c: In function 'curl_version_info': /Users/runner/work/curl/curl/lib/version.c:584:15: error: declaration of 'ssh_buffer' shadows a global declaration [-Werror=shadow] 584 | static char ssh_buffer[80]; | ^~~~~~~~~~ In file included from /Users/runner/work/curl/curl/lib/vssh/ssh.h:35, from /Users/runner/work/curl/curl/lib/urldata.h:185, from /Users/runner/work/curl/curl/lib/altsvc.c:32, from /Users/runner/work/curl/curl/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_0_c.c:4: /opt/homebrew/include/libssh/libssh.h:99:35: note: shadowed declaration is here 99 | typedef struct ssh_buffer_struct* ssh_buffer; | ^~~~~~~~~~ ``` Ref: https://github.com/curl/curl/actions/runs/10477958747/job/29020250670#step:9:48 Tested via curl#14614
vszakats
added a commit
that referenced
this pull request
Aug 20, 2024
``` /Users/runner/work/curl/curl/lib/version.c: In function 'curl_version_info': /Users/runner/work/curl/curl/lib/version.c:584:15: error: declaration of 'ssh_buffer' shadows a global declaration [-Werror=shadow] 584 | static char ssh_buffer[80]; | ^~~~~~~~~~ In file included from /Users/runner/work/curl/curl/lib/vssh/ssh.h:35, from /Users/runner/work/curl/curl/lib/urldata.h:185, from /Users/runner/work/curl/curl/lib/altsvc.c:32, from /Users/runner/work/curl/curl/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_0_c.c:4: /opt/homebrew/include/libssh/libssh.h:99:35: note: shadowed declaration is here 99 | typedef struct ssh_buffer_struct* ssh_buffer; | ^~~~~~~~~~ ``` Ref: https://github.com/curl/curl/actions/runs/10477958747/job/29020250670#step:9:48 Tested via #14614 Closes #14617
vszakats
force-pushed
the
cm-libssh-fixups
branch
from
August 20, 2024 21:24
2d8a6a3
to
eeb3b70
Compare
vszakats
added a commit
to curl/curl-for-win
that referenced
this pull request
Aug 21, 2024
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.
Drop
find_package(libssh CONFIG)
detection method in favour ofthe Find module that supports both
pkg-config
, and CMake-native(since #14555) detection.
This aligns
libssh
detection with other dependencies. It makes thebuild honor custom configuration via
LIBSSH_INCLUDE_DIR
,LIBSSH_LIBRARY
.Also enable libssh in a GHA/macos cmake job for build coverage.
Fixing:
https://github.com/curl/curl-for-win/blob/4f9acbed92fd4aac0e874c9a591bec7d621cd9f2/curl.sh#L255-L263
libssh, due to a regression missing to enable libssh when
found via
find_package(libssh CONFIG)
.Ref: https://github.com/curl/curl/actions/runs/10470138955/job/28994650338
Follow-up to 422696f #14555
libssh.h
symbol #14617w/o whitespace: https://github.com/curl/curl/pull/14614/files?w=1