-
Notifications
You must be signed in to change notification settings - Fork 7
build: link libucontext for Alpine #66
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
build: link libucontext for Alpine #66
Conversation
Fibers library requires 'makecontext', 'getcontext', 'setcontext' and 'swapcontext' symbols. There are no such symbols in Alpine musl c library implementation [1]: third party library expected to be used for them. This patch adds PkgConfig and libucontext requirement to CMake if ucontext wasn't found in libc and libucontext linking. 1. https://www.openwall.com/lists/musl/2018/01/29/2 Closes #65
It seems, those functions are needed only for the asynchronous API. We don't use this API (instead we use syncronous API with our own socket ready check). Can we just disable the async API / ucontext dependency? If we'll keep the dependency, can we solve the problem on the mariadb-connector-c side? Maybe it was already solved in the upstream and we can just backport a patch. Did you look over the issue tracker? I don't mind current solution, though. |
from mariadb-connector-c:
Thus, on the aarch64 architecture, if ucontext.h is found library calls will be used. |
They're exist, okay. It does not mean that they're called. Again, we don't use the API, which calls them. |
There is a discussion in mariadb jira: https://jira.mariadb.org/browse/MDEV-13775 , but I don't see a way to fix this without changing mariadbconnector sources (I'm not really experienced in CMake btw). I also haven't found any flags to disable async in mariadbconnector build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so.
Fibers library requires 'makecontext', 'getcontext', 'setcontext' and 'swapcontext' symbols. There are no such symbols in Alpine musl c library implementation [1]: third party library expected to be used for them. This patch adds PkgConfig and libucontext requirement to CMake if ucontext wasn't found in libc and libucontext linking.
Closes #65