-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[package] boost/1.73.0: undefined reference to `jump_fcontext' #3159
Comments
See the Boost.Context docs. Is your assembler configured correctly? |
@madebr thanks for the hint, I found those lines which do not look too wrong:
and this is the dump of the object files:
|
and one directory up is a static library looking good too:
|
Ok, then let's focus on the boost cmake test_package script. CMake is complaining about the boost version that is too recent and you're using an old cmake 3.10. I have a pr that let's conan generate the cmake imported boost targets at #2097 |
I see that I get those warnings, maybe they have anything to do with it?:
and here is the linker output you are looking for I guess:
For me it looks good or should there be more linked into the test program? |
My cmake version (3.17.2) displays similar warnings, and ends up working just fine.
For reference, the linking command for me (gcc9@Linux) is:
It's more or less the same. Can you try/check the following?
|
The latest conan version I could test so far was 1.30 and it did not make a difference. About the symlink, it is the following:
Also setting CC and CXX explicitly did not change anything for me. Except if some caching played a trick on me. |
I can reproduce your problem, First, I built boost without using conan.
Then I compiled the coroutine application without conan/cmake.
But when leaving out the context library, your error appears:
Looking at your comment in #3159 (comment), |
Yes I have overlooked this the first time. libboost_context is missing! And if I add it to the link command manually it resolves everything. Now of course is the question, why is it missing? The generated conanbuildinfo.cmake looks good and contains boost_context:
But if I look into the build.make file in the CMakeFiles/coroutine_exe.dir directory I see this, missing context:
So I wonder, how is the list of libraries to link to generated, and why is it missing boost_context in the static case? |
Ok, I am not sure if I got this logic right, Ubuntu 18.04 comes with CMake 3.10.2 which only knows boost up to version 1.65. |
Can you try #2097?
Apart from this, you can also use the cmake package from conan-center-index as a build requirement (RECOMMENDED) |
Hmm is this patch compatible with conan-package-tools?
|
@sturmf |
I've created conan-io/conan#7874 to get some feedback on my boost recipe. |
I just now created a pull request to change the line from This fixes the problem for me and seems to be in line with other test executables also linked this way. |
@madebr One question, can you look over my pull request? Is it in the correct form or should I have provided it differently? |
We also have #2205, does that fix your issue? |
@madebr I just rebased to the latest conan-center-index version which has #2205 merged. Unfortunately it still does not work under Ubuntu 18.04. I think it even made it worse and now can't resolve any library:
|
This has been solved with the boost package restructuring, thanks!. |
Package and Environment Details (include every applicable attribute)
Conan profile (output of
conan profile show default
orconan profile show <profile>
if custom profile is in use)This gets enhanced by the selected settings of the conan-package-builder:
Steps to reproduce (Include if Applicable)
Running conan-package-tools 0.34.3 can build the first boost variants (shared=True) without problems but fails on this one which seems to be the first with shared=False. The failure seems to happen during the test_package linking step of coroutine_exe.
Logs (Include/Attach if Applicable)
Click to expand log
The text was updated successfully, but these errors were encountered: