[MDEV-8883] more cross-compiling fixes Created: 2015-10-02 Updated: 2015-10-24 Resolved: 2015-10-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 10.0.22, 10.1.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Sprint: | 10.0.22 | ||||||||
| Description |
|
See patches from this thread
|
| Comments |
| Comment by Sylvain Raybaud [ 2015-10-14 ] |
|
Hi It seems BR2_ARCH_HAS_ATOMICS cannot be used, because for example on 32bits architectures some atomic operations may not be available even though BR2_ARCH_HAS_ATOMICS is set to true. Therefore your solution should be used. However I just realised that CHECK_C_SOURCE_RUNS should never be invoked by this script in buildroot because it's enclosed in IF(NOT CMAKE_CROSSCOMPILING) (https://github.com/MariaDB/server/blob/10.1/storage/innobase/CMakeLists.txt, line #75). Is -DCMAKE_CROSSCOMPILING supposed to passed when invoking cmake or is it supposed to be determined automatically? |
| Comment by Sergei Golubchik [ 2015-10-22 ] |
|
I've fixed the "XtraDB not supported" error (it won't be issued if XtraDB is disabled). According to https://cmake.org/cmake/help/v3.0/variable/CMAKE_CROSSCOMPILING.html the variable CMAKE_CROSSCOMPILING) is set by CMake automatically. |
| Comment by Sylvain Raybaud [ 2015-10-23 ] |
|
Hi Thanks for the fix! When CMAKE_CROSSCOMPILING is set these tests are skipped indeed and HAVE_IB_GCC_ATOMIC_BUILTINS is not set. It triggers another build failure, at least when crosscompiling for arm in buildroot, that I've filed under Cheers, Sylvain |
| Comment by Sylvain Raybaud [ 2015-10-23 ] |
|
I propose the attached patch (the idea of which was suggested by serg) to be able to automatically check for atomic intrinsics event when cross-compiling. mariadb-galera-02-fix_innodb_cmakelist.patch |
| Comment by Sergei Golubchik [ 2015-10-23 ] |
|
Thanks, I've done that too (not your patch verbatim, but similar). |