← Back to team overview

maria-developers team mailing list archive

Re: Cross-compiling MariaDB galera cluster

 

Hi again

On 14/08/2014 14:48, Sergei Golubchik wrote:
> Yes, you can compile without XtraDB. I think -DWITHOUT_XTRADB=1 will do.
> 
> I don't really know why xtradb's CMakeLists.txt uses CHECK_C_SOURCE_RUNS
> instead of CHECK_C_SOURCE_COMPILES. It was like this since 2009, when
> storage/innodb_plugin/plug.in got this check (AC_TRY_RUN back then) for
> the first time.

Unfortunately it seems that even if I set -DWITHOUT_XTRADB=1 the test is
still run:

$ cmake -DWITHOUT_XTRADB=1 ..
[...]
CMake Error at storage/xtradb/CMakeLists.txt:435 (MESSAGE):
  Percona XtraDB is not supported on this platform


-- Configuring incomplete, errors occurred!
[...]

Is there an easy workaround?

It seems to me that CONFIGURE_PLUGINS (defined in cmake/plugin.cmake)
will try to configure everything in storage/*. Maybe this should be
patched? Or maybe storage/xtradb/CMakeList.txt should be modified to
exit silently if WITHOUT_XTRADB if set. For example the attached "quick
and dirty" patch seems to do the trick for me.

Regards,

-- 
Sylvain Raybaud
www.green-communications.fr
--- a/storage/xtradb/CMakeLists.txt	2014-10-14 14:46:21.468051623 +0200
+++ b/storage/xtradb/CMakeLists.txt	2014-10-14 14:46:57.476052587 +0200
@@ -425,12 +425,13 @@
   SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
 ENDIF()
 
-IF(XTRADB_OK)
-  MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
-    DEFAULT
-    RECOMPILE_FOR_EMBEDDED
-    LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
-ELSE()
-  MESSAGE(FATAL_ERROR "Percona XtraDB is not supported on this platform")
+IF(NOT WITHOUT_XTRADB)
+  IF(XTRADB_OK)
+    MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
+      DEFAULT
+      RECOMPILE_FOR_EMBEDDED
+      LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
+  ELSE()
+    MESSAGE(FATAL_ERROR "Percona XtraDB is not supported on this platform")
+  ENDIF()
 ENDIF()
-

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References