-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Build failures with recent embedded libssh2 #4303
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
Conversation
0c271bb to
0f3969d
Compare
|
Rebased due to #4282. I'm just sitting at the train station and got no Windows VM ready, so I cannot test this right now. So please only merge if you've confirmed this works on Windows. Otherwise I'll try to test this in a few days, hopefully. |
|
In this branch, specifying |
0f3969d to
fc2ccf6
Compare
|
That is... strange. At least that's why I'm adding the bindir parameter to |
|
@carlosmn: have you actually specified |
fc2ccf6 to
dd81940
Compare
|
Refactored this PR to not introduce a new variable "USE_EMBEDDED_LIBSSH2". I've also added a new change to allow using an embedded libssh2 not only on Windows systems, but also on all other systems. @tiennou, this might be of interest to you for iOS. |
dd81940 to
77d3953
Compare
|
I've rebased this PR on top of latest master to fix conflicts. I've also converted the USE_SSH option to work exactly like USE_HTTPS works, so that one can explicitly choose backends. |
c71f845 to
8aba1a2
Compare
8aba1a2 to
ef4a1ce
Compare
|
Anybody cares enough to review? I'd really like to get this landed :) |
|
A Ninja build reported the following (note the detection of v1.8.2 in
|
|
Thanks for testing, @tiennou.
The detection is perfectly normal and is part of the auto-detection similar to how the HTTPS selection works. As you've set USE_SSH=libssh2_embedded it's not used in the end.
Right, I see that, too. Didn't notice earlier because I also had system libssh2 available and thus it still found the correct header. Will investigate. |
Due to recent changes to some required defines in libssh2, we now fail to build the library correctly. This results from the fact that we're manually including libssh2 sources and its include directory into our own build infrastructure, which may not be configured as required by libssh2. As libssh2 is driven by CMake as well, we can simply include it as a subdirectory and stop caring for its configuration. Instead, we will now just link against the generated library and be done with it, without caring about the library internals.
Following the HTTPS backend selection, let's make the SSH backend selection more generic. Instead of choosing "-DUSE_SSH=(ON|OFF)", one can now also set it to an explicit backend. Currently, only two backends "libssh2" and "libssh2_embedded" are supported.
When setting the STRINGS property for cache variables, CMake GUI will present a dropdown box so that the developer may choose one of supplied values. Use this feature for HTTPS, SHA1 and SSH backends, which all support a fixed set of values, only.
|
Fixed the issue @tiennou noticed. |
ef4a1ce to
da35922
Compare
|
Sorry, forgot to say that I don't mind, and both have been dwarfed by your #5284 since 😜. I usually rebase on top of whatever master is reflexively, only to stop if there's any conflicts… If this one goes it quickly, I'll have to adapt the other on top anyways. |
Indeed. I guess it's going to take some time until that one lands, though, as I still need to see how to make it backwards compatible with older versions of CMake. |
|
I don't want to embed libssh2. Going to close this; let's stop embedding that library entirely. |
Another day, another build infrastructure tweak. So yet again, please do not merge until #4282 is merged.
This PR improves how we build libssh2. In recent commits, they have changed some things regarding their build infrastructure, which would require us to add additional hacks to compile libssh2 directly as part of our own sources. As libssh2 uses CMake, though, we should simply be including it as a subdirectory and be done about it.
Note that this means that there is an additional dynamic library that has to be distributed. I don't know yet whether it is possible to statically link it instead of generating a dynamic one to avoid this, but I'll take another stab at this later. Regardless of this it is definitly the right thing to do, as we do not want to fiddle with their build instructions. Doing so may lead to subtle breakages due to the build environment not matching what the libssh2 project expects, which is critical to avoid in a library directly related to the user's security.
This fixes #4302.