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

fix the linker error on ubuntu 24.04 #3559

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

georgeliao
Copy link
Contributor

@georgeliao georgeliao commented Jul 3, 2024

close #3558

A minimalistic example to reproduce this is to have an executable in Multipass CMake environment links to Qt6::Network and ssh where ssh target is built by the git submodule library libssh of multipass.

The problem here is that the executable links to libQt6Network.so.6.4.2->libcurl-gnutls.so.4->libssh.so.4 and 3rd-party libssh. So there are two libssh shared libraries linked to the same executable. Symbol versioning is a mechanism used in shared libraries to manage changes in the library API over time. In this case, the system lissh has the symbol version that linker is looking for but 3rd-party does not have. Besides, the linker apparently is looking into the 3rd-party libssh for the functions he needs as opposed to the system libssh.

So one possible fix for this is to disambiguate the double libssh libraries by changing the 3rd-party libssh library from shared library to static library.

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.84%. Comparing base (9a9bcf8) to head (cbafad3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3559      +/-   ##
==========================================
- Coverage   88.88%   88.84%   -0.04%     
==========================================
  Files         254      254              
  Lines       14222    14222              
==========================================
- Hits        12641    12636       -5     
- Misses       1581     1586       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@georgeliao georgeliao force-pushed the fix_linker_error_ubuntu_24.04 branch from 23dbd39 to cbafad3 Compare July 9, 2024 10:54
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.

Linker error on ubuntu 24.04, it does not occur on ubuntu 23.10
1 participant