Skip to content
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+conan with -DEXIV2_ENABLE_LIBSSH=On is broken on msvc #603

Closed
clanmills opened this issue Dec 19, 2018 · 8 comments
Closed

cmake+conan with -DEXIV2_ENABLE_LIBSSH=On is broken on msvc #603

clanmills opened this issue Dec 19, 2018 · 8 comments
Milestone

Comments

@clanmills
Copy link
Collaborator

cmake/FindSSH.cmake reports being unable to find libssh. There doesn't seem to be any code in conanfile.py to find libssh. It's working OK on MacOS-X because I build using "pure" CMake (no conan) and libssh is install in /usr/local/

The work-around is to not request this feature in v0.27 We can fix this in 0.27.1

...
-- Found ZLIB: C:/Users/rmills/.conan/data/zlib/1.2.11/conan/stable/package/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/lib/zlib.lib (found version "1.2.11") 
-- Found CURL: C:/Users/rmills/.conan/data/libcurl/7.60.0/bincrafters/stable/package/ae6191bc1194317ff7cdbc84d4d302ab49975618/lib/libcurl.lib (found version "7.60.0") 
CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find SSH (missing: SSH_LIBRARY SSH_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindSSH.cmake:20 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/findDependencies.cmake:23 (find_package)
  CMakeLists.txt:61 (include)


-- Configuring incomplete, errors occurred!
See also "C:/Users/rmills/gnu/github/exiv2/buildserver/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/rmills/gnu/github/exiv2/buildserver/build/CMakeFiles/CMakeError.log".
@clanmills clanmills added this to the v0.27.1 milestone Dec 19, 2018
@piponazo
Copy link
Collaborator

There is not official conan recipe for libssh, neither an official FindSSH.cmake provided by CMake. There is however a conan package for libssh2:

https://bintray.com/bincrafters/public-conan/libssh2%3Abincrafters

I actually never tried to use compile libSSH on Mac or Windows. Let's see if this is something in which exiv2 windows users are interested.

@D4N
Copy link
Member

D4N commented Dec 21, 2018 via email

@piponazo
Copy link
Collaborator

Ha! I did not know that.

If we can do the same with libcurl I would vote for dropping one of the dependencies. The less dependencies the better.

@clanmills
Copy link
Collaborator Author

We could just drop this. I tried to use it on the Mac earlier this week and it didn't seem to be working. There were test scripts for this that operation on a (free) AWS node in Singapore. It hasn't been tested for several years and nobody has ever mentioned it in issues or on the forum. If we remove it, it's unlikely to be missed.

I think we should remove the Video and EPS code as well.

However support for http is useful and valuable. That's implemented in two ways. When curl is available, it's used and support http and https. There's a "no thrills" implementation of the http protocol in http.cpp, so all every build of exiv2 supports http. I don't know that ftp and ftps is useful.

@piponazo
Copy link
Collaborator

I am always happy to drop things we do not need, specially if they add an external dependency. If you agree, we can keep that code in 0.27 (since it has been already released) and drop it from master.

@clanmills
Copy link
Collaborator Author

clanmills commented Dec 21, 2018

I think we should remove several relics from v0.28 (EPS, Video, ftp, ssh).

The product "road-map" is to maintain v0.27 for a couple of years with security fixes. When we arrive at 0.28.0.1 (RC1), we'll publish a list of deprecated features and users will speak up.

The relics (deprecated features) will be in every "dot" edition of Exiv2 0.27. I can list the "deprecated" features in "the dots" to give users plenty of warning.

@piponazo
Copy link
Collaborator

I was going to try to use libssh2 after @D4N 's comment, but I think we are using libssh. We have these inclusions:

include/exiv2/ssh.hpp
27:#include <libssh/libssh.h>
28:#include <libssh/sftp.h>

Which are different to the headers provided with libssh2:
https://github.com/libssh2/libssh2/tree/master/include

@clanmills If I understood correctly, CMake can find libssh on Mac if the system package is installed right? I think there is not an issue here ... we do not have a libssh recipe in conan because it does not exist. If somebody wants to use the SSH features, they will need to use a system package or compile the library by their owns.

If you agree with this observation, please close the issue. And please, when you guys have some time, I would like to reminds you that #617 has been open for review for few weeks.

@clanmills
Copy link
Collaborator Author

#617 is on my TODO list. I built it with -DEXIV2_BUILD_VIDEO=On on MacOS-X. I expected warning and didn't get them. It's on my list to investigate other platforms. So, please be sure, #617 has not been forgotten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants