-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Resolving linking order is a nightmare on alpine #1645
Comments
I don't know what you are talking about. Please explain. |
Here is a concrete example what I ended up with as libraries for one of our applications. The sort order matters, the required libraries and dependencies of dependencies differ between versions ~6 months apart (we use abseil-cpp which comes with alpine 3.19 due required patches included with it). I have a much large example, but in this app alone had to figure out the directly required libs and here also the dependencies between the flags* libs by trial and error. Both platforms use the same code base and I do not see a reason at all why here for example the flags library is required on alpine at all. I also refer to this discussion: #367 find_package(absl REQUIRED) |
This is not a reproduction, it is a list of libraries. Please provide a reproduction of the problem so I can see what is going on. |
If I'm understanding your problem is similar to mine, I found the easiest way to tackle this was to:
I've attached an example CMake script to reproduce the first 2 steps below:
Hope that helps! |
I wrote a python script to extract the information out and do a topological sort on the targets. Python has a builtin library for doing topological sort. |
Describe the issue
Multiple reports already exist explaining how struggling resolving library linking order can be in general. Though it's become more of a nightmare lately with more absl dependencies needed for the very same code base, and handling different library link orders for my two primaryr platforms (Ubuntu 22.04 and Alpine 3.19) is really insane. After spending several hours on it (counting) I want to add my +1 for an at least somewhat better maintainable packaging.
Steps to reproduce the problem
Use a random app which depends on boringssl and abseil, and have fun sorting the libraries.
What version of Abseil are you using?
20240116.1
What operating system and version are you using?
Alpine 3.19
What compiler and version are you using?
musl
What build system are you using?
cmake
Additional context
No response
The text was updated successfully, but these errors were encountered: