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

libcurl "no version information available" #62

Open
AlexisTM opened this issue May 11, 2021 · 16 comments
Open

libcurl "no version information available" #62

AlexisTM opened this issue May 11, 2021 · 16 comments
Labels

Comments

@AlexisTM
Copy link

Hi,

I receive the following warning when compiling ros2 as well as other code using the libcurl_vendor library.

/usr/bin/cmake: /home/alexis/kobi/ros2_thirdparty/install/opt/libcurl_vendor/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)

image

I tried both the foxy branch as well as ros2 branch:

Foxy branch:

libcurl_vendor$ git log
commit f20037d20a3a69c4f580a1f127b528884c3575ac (grafted, HEAD -> foxy, tag: 2.3.4, origin/foxy)

Ros2 branch:

libcurl_vendor$ git log
commit 791becb15061bfb064512a17ddbd341eeb14cef7 (grafted, HEAD -> ros2, tag: 2.5.0, origin/ros2)

CMake version:

$ cmake --version 
cmake version 3.10.2

Would this be due to an "old cmake version"?

@clalancette
Copy link
Contributor

Would this be due to an "old cmake version"?

It's unclear. The version of cmake that is in Ubuntu Focal is 3.16, so we don't regularly test with something older than that. If you build with a newer CMake, does the issue go away?

@AlexisTM AlexisTM changed the title libcurl "ver libcurl "no version information available" May 11, 2021
@AlexisTM
Copy link
Author

This is built on 18.04 as required due to some Nvidia dependencies. At the moment, we do not have the ability to update the cmake version due to some other libraries failing with newer cmake versions.

@clalancette
Copy link
Contributor

Ah, I think I see what is going on. The libcurl_vendor package will only build something if it can't find the 'curl' system library (on Ubuntu 18.04, that would be libcurl4-openssl-dev. Since we always have that installed on our local machines and CI, we never attempt to build libcurl_vendor on Linux. I suspect if you install libcurl4-openssl-dev, the problem will go away.

@AlexisTM
Copy link
Author

I will try that! [It is built in a docker and it is very likely for libcurl4 not to be installed]

@AlexisTM
Copy link
Author

@clalancette I confirm that installing libcurl4-openssl-dev solves the problem.

@clalancette
Copy link
Contributor

OK, great. There is likely a bug here, so I'll leave this open. But since we don't see it "in real life", it is going to be low priority.

@AlexisTM
Copy link
Author

No issue, I have the workaround at the moment. Thanks for the support!

@jacobperron
Copy link
Contributor

I'm seeing this error when I build ROS 2 core packages with the cmake arg -DFORCE_BUILD_VENDOR_PKG=ON. My use case is to build a custom ROS 2 archive to distribute, and so I've turned that flag on to force all vendor packages to build in case users don't have them installed.

@jacobperron
Copy link
Contributor

Looking into this a little, I guess it has something to do with the system installed version of cmake originally building against a different version or environment, compared to the vendored libcurl. E.g. It's easy to reproduce the error by running cmake after sourcing a workspace in which libcurl_vendor was built:

$ cmake --version
cmake: /path/to/my/workspace/install/opt/libcurl_vendor/lib/libcurl.so.4: no version information available (required by cmake)
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

I tried building cmake locally, and with it I don't see the "no version information available" errors. Although, it looks like cmake was built without linking against libcurl, so I'm not sure if it's a valid experiment.

@AlexisTM
Copy link
Author

@jacobperron On my side, I had the issue when building from source on Ubuntu 18.04 but not on 20.04.
On 18.04, libcurl_vendor is built, on 20.04 it uses the system version. So there must be some cmake issues in the package, but I have no clue what it is. 😞

@jacobperron
Copy link
Contributor

IIUC, the version of libcurl we're building is not compatible with the system installed version, which cmake depends on: https://gitlab.kitware.com/cmake/cmake/-/issues/20872

So, I'm not sure that building libcurl_vendor on systems that cause cmake to dynamically link against libcurl would ever work.

@clalancette
Copy link
Contributor

@jacobperron is right; I'm pretty sure the problem is that cmake itself depends on libcurl, and when we try to replace it with the vendored package it gets upset.

Honestly, I think the right solution here may be to stop vendoring libcurl completely and just get it from the "system" (that would be apt on Ubuntu/Debian, dnf on RHEL, chocolatey? on Windows, and brew on macOS).

@jacobperron
Copy link
Contributor

I was about to ask what was/is the original reason for vendoring curl?

@clalancette
Copy link
Contributor

This is the commit that added it: 290ff82 .

But it looks like the curl package is available on all of our target platforms. I'm going to give a shot at removing the vendor package completely and see if things still work on Windows, in particular.

@jacobperron
Copy link
Contributor

I'm removing it locally for my project, since we can rely on the system version. But if we can remove it in general that would be cool.

@jacobperron
Copy link
Contributor

See #64

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

No branches or pull requests

3 participants