[MDEV-13775] cross compile fail on arm/mips musl Created: 2017-09-09 Updated: 2021-10-29 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 5.5.57 |
| Fix Version/s: | 5.5 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Lucian Cristian | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | armhf, compile, mips, musl | ||
| Environment: |
Linux LEDE/OpenWRT SDK |
||
| Description |
|
trying to build mariadb 5.5.x on arm/mips targets with musl it gives me the following error
with glibc it works properly, x86_64 and i386 are also working with musl and glibc patching the my_context.h file like this
is working, what could be the right approach ? |
| Comments |
| Comment by Sergei Golubchik [ 2017-09-09 ] | ||||
|
Does it mean that you have <ucontext.h>, but it is not usable? If yes, I'd say the correct approach is to check in CMakeLists.txt whether ucontext.h is usable. In configure.cmake there's a check:
and instead of (or together with) this it should use CHECK_C_SOURCE_COMPILES. | ||||
| Comment by Lucian Cristian [ 2017-09-09 ] | ||||
|
cat CMakeCache.txt | grep UCONTEXT in gcc-5.4.0/fixincludes/tests/base/sys I have cat ucontext.h /* DO NOT EDIT THIS FILE. It has been auto-edited by fixincludes from: "fixinc/tests/inc/sys/ucontext.h" This had to be done to correct non-standard usages in the #if defined( LINUX_IA64_UCONTEXT_CHECK )
#endif /* LINUX_IA64_UCONTEXT_CHECK */ #define HAVE_UCONTEXT_H 1 – | ||||
| Comment by Sergei Golubchik [ 2017-09-09 ] | ||||
|
Yes, so HAVE_UCONTEXT_H is set, but apparently it cannot be used. The fix is to test it in configure.cmake. Your formatting didn't work because {{ ... }} is for inline code, for multi-line code snippets use {code} ... {code}. | ||||
| Comment by Lucian Cristian [ 2017-09-09 ] | ||||
|
so if it can't be used I think is safe to assume MY_CONTEXT_DISABLE and use the patch above in building the image without messing with configure.cmake | ||||
| Comment by Daniel Black [ 2021-10-29 ] | ||||
|
Yes. You're probably right both counts. This looks like something musl would omit. |