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

[cpprestsdk] Cannot find dynamic library dependencies at runtime #25978

Closed
klalumiere opened this issue Jul 25, 2022 · 2 comments
Closed

[cpprestsdk] Cannot find dynamic library dependencies at runtime #25978

klalumiere opened this issue Jul 25, 2022 · 2 comments

Comments

@klalumiere
Copy link
Contributor

Describe the bug
On Linux, cpprestsdk cannot find its dynamic libraries dependencies at runtime, like libboost_random.so.1.79.0.

Environment

  • OS: Linux
  • Compiler: clang version 10.0.0-4ubuntu1

To Reproduce
Steps to reproduce the behavior:

  1. Add a dependency on qpid-proton in vcpkg.json:
            {
                "name": "cpprestsdk",
                "version>=": "2.10.18#1"
            }
  2. Link on it.
  3. Compile it with the triplet x64-linux-dynamic and run your program. At runtime, you'll see an error looking like error while loading shared libraries: libboost_random.so.1.79.0: cannot open shared object file: No such file or directory. You can use lddtree to confirm that the transitive dependency missing comes from cpprestsdk.

Expected behavior
No runtime error.

Failure logs
error while loading shared libraries: libboost_random.so.1.79.0: cannot open shared object file: No such file or directory

Additional context
It's a RUNPATH (RPATH) problem. I'll open a pull request in a few seconds.

@Osyotr
Copy link
Contributor

Osyotr commented Jul 25, 2022

#23035 is merged, so the linked doc is outdated. Please update your vcpkg instance and use VCPKG_FIXUP_ELF_RPATH flag

@klalumiere
Copy link
Contributor Author

This work. Thanks a lot! 😃

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 a pull request may close this issue.

2 participants