← Back to team overview

maria-discuss team mailing list archive

cross-compiling mariadb-galera

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear MariaDB community,

I've got a question regarding the cross-compilation of MariaDB. More
specifically I'm trying to create a buildroot package for MariaDB
Galera cluster. I added mariadb-galera to buildroot/package/Config.in
and created a folder buildroot/package/mariadb-galera containing the
following files (normal buildroot procedure):

buildroot/package/mariadb-galera/Config.in
buildroot/package/mariadb-galera/mariadb-galera.mk

mariadb-galera.mk contains, among other things:

MARIADB_GALERA_CONF_OPT = -DCMAKE_CROSSCOMPILING=1 -DWITH_WSREP=ON
- -DWITH_INNODB_DISALLOW_WRITES=1

I'm building for Raspberry Pi. I'm using version 10.0.12. The build
fails with:

CMake Error at storage/xtradb/CMakeLists.txt:434 (MESSAGE):
  Percona XtraDB is not supported on this platform

This error is trigger in storage/xtradb/CMakeLists.txt when XTRADB_OK
is not set; it seems to me that XTRADB_OK is set in either one of the
following cases:

1) CMAKE_CROSSCOMPILING is NOT set and some tests are successful (thus
setting HAVE_IB_GCC_ATOMIC_BUILTINS)

or

2) We're compiling for MSVC or CMAKE_SYSTEM_NAME is "SunOS" and some
other conditions are met.

Since I'm not compiling for MSVC or SunOS and I'm crosscompiling
indeed, XTRADB_OK is not set and the error is triggered. Here I'm
stuck. I've got the feeling that as such one cannot cross-compile
xtradb because XTRADB_OK will never be set; or maybe with proper
options passed to cmake the tests would be made elsewhere and
HAVE_IB_GCC_ATOMIC_BUILTINS would be set beforehand? Or maybe I should
patch this CMakeLists.txt? Or maybe I should just compile without
xtradb altogether, if that's possible? Any guidance would be appreciated.

Cheers,

Sylvain Raybaud


PS: I was not sure whether to post this on -discuss or -devel so I
opted for the most general list. Don't hesitate to ask me to repost
elsewhere if you feel this would be more appropriate.

- -- 
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJT0hcjAAoJEEkkwl4JtJ9yJx8P/3tGWbYBK+WFAmG0qWH8AJkI
UjwNkNBri+p7GwaaHl/cnNrerTaNSFsRrusUvwr9UwSjn2xZgsYd+v/I97tMzORi
sjLFYt7JM42/Hm3PmMshpr+B+8CX3oZ9NQa/vy6sJ4jZrYZ/GsjsFMB14HD8FG0I
qbySRVxssrixl856ZVPae9W1aVK06oEAiANAQhZ/+ZJOdIMKB+32rXfdDHJR8jGA
pseZG74xoZfjWkNQ0D4qmZfkJpeAk1wR1mAU1QE5nFSauvjqGEgYzzUokh3Tp/2/
zyl+dMgu6eG3rl+zrF8Pf6cDoLr2cM6SjlTq4ggMVITLl0CT6x2r9xJQVe8XdqrM
LDAhjeHhzKrPbq3AmKKX3UBTj+01v/VdSp3ro73I4ruu8g6XSqF+2DQAOqLZ4qDH
66KZLewagdsuekwCx07jDHRFg840lKchUhXxtuu8GLb1KFIgdbYa4th2rP1U+idf
NFHYmOMVyOE20hYa1F4mOI0bAYHThY3oqr4SxnqVYVl6+Rxu9OfBEEfkTi1i4wTz
S807RR4N7LC7SbiNxaU3DULycZIDysaOv6f5xoJf8VvUBCis0cwahYzqUj1B97p9
fAYmEhmS7W/YS0R56dhi2S7v//VNbdpLhmpIXPhmwHjvBeyBoEskXovHcdu1wgSQ
58S1ykhVWcHgNpXvZa55
=OFL8
-----END PGP SIGNATURE-----