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

Remove libcurl_vendor #64

Closed
wants to merge 1 commit into from
Closed

Remove libcurl_vendor #64

wants to merge 1 commit into from

Conversation

jacobperron
Copy link

Instead rely on system provided version.

@clalancette I went ahead and did this anyways. I'll trigger CI on all platforms to see where we stand.

Instead rely on system provided version.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@@ -12,8 +12,7 @@ endif()

find_package(ament_cmake_ros REQUIRED)
find_package(ament_index_cpp REQUIRED)
# TODO(wjwwood): remove libcurl_vendor and just use system curl when possible
find_package(libcurl_vendor REQUIRED)
find_package(CURL REQUIRED)
Copy link
Contributor

@clalancette clalancette Jun 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fairly certain this is going to fail on Windows. At least, it did for me locally. I had to do the following:

  1. > set CMAKE_PREFIX_PATH=C:\ProgramData\chocolatey\lib\curl\tools\curl-7.67.0-win64-mingw
  2. Add list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a") right above the find_package(CURL) line.

With both of those things, I was able to compile successfully. However, the tests failed because they couldn't then find the dll at runtime. That might be able to be solved by putting the environment hooks for Windows back in place, but I'm not entirely sure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yeah adding C:\ProgramData\chocolatey\lib\curl\tools\curl-7.67.0-win64-mingw to PATH works as well. It's not very portable though, since the path changes with the version of curl (e.g. I have 7.77.0). I couldn't find any recommended solutions involving CMake online... maybe this is the motivation to keep our vendor package.

@jacobperron
Copy link
Author

I don't have a good solution for Windows (or the time to iterate on this).

@felrock
Copy link

felrock commented Jan 5, 2022

Hi, i just ran into this issue here today. And changing to find_package(CURL REQUIRED) fixed it for me. Could a fix for windows just be a simple if-else here, so if windows find libcurl_vendor else find CURL?

@clalancette
Copy link
Contributor

libcurl_vendor should do the appropriate thing if you already have the curl development libraries installed. That is, on Linux, it is just a simple wrapper around the real libraries. If that is not working for you, then something else has gone wrong. Please open a separate issue with details on your platform, what you are trying, and the error output you are getting.

@felrock
Copy link

felrock commented Jan 5, 2022

Ok will do that

@clalancette clalancette mentioned this pull request Feb 3, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants