-
Notifications
You must be signed in to change notification settings - Fork 36
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
abseil/20180223 - Wrong linkage order #176
Comments
@r-darwish Are we able to fix the link order manually now that we know of the issue? |
@solvingj I got notified of this issue as I ran into a similar issue. In my case, it was a package which attempted to install some system libraries and then link against them. But since the library was only added as if it was part of the package, conan did not know that there was a dependency between the two. As soon another package (or some other command) added a link dependency to that system library, cmake sometimes reordered the link order which made compilation break. So essentially, this is an issue for every package doing something like:
All it takes that this potentially breaks is:
cmake (or any other build system) has no knowledge that package_lib depends on somelib which gives potential for link failures |
Unless I'm missing something, it looks like abseil's |
Did anyone involved make any headway with this? @drrlvn or @bschindler ? |
Both @r-darwish and I had babies very recently so we're not doing much work, it'll take us a bit to get back. Sorry. |
@r-darwish changes are in testing/20180223 branch, please give a try |
The testing branch works for me, thanks! |
confirmed as fixed, closing |
@bschindler sorry for hijacking the topic but I do have exactly this situation that you mention
Is there any solution in conan how to handle this situation? In my specific case I am talking about openssl with libcryto that has a dependency on libdl. |
Description of Problem, Request, or Question
Trying to build this app caused the following linkage command:
Which caused the following error:
sysinfo.cc:(.text+0x452): undefined reference to `AbslInternalSpinLockWake'
This is due to the fact that
-labsl_spinlock_wait
, which containsAbslInternalSpinLockWake
, comes before-labsl_base
, which depends on it. As stated here, the order should be reversed. Running the same command when moving-labsl_spinlock_wait
to end of the command seems to work.The current implementation of
package_info
callstools.collect_libs
, which in turn callsos.listdir
, which does not guarantee any order, so the problem reproduces randomly.Package Details (Include if Applicable)
Steps to reproduce (Include if Applicable)
Compile the program above.
The text was updated successfully, but these errors were encountered: