[MDEV-27863] cannot compile without wsrep Created: 2022-02-16  Updated: 2022-04-12  Resolved: 2022-04-12

Status: Closed
Project: MariaDB Server
Component/s: Compiling, wsrep
Affects Version/s: 10.4
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Sergei Golubchik Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

First, wsrep plugin is marked mandatory. This can be fixed with the following

--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -36,7 +36,7 @@ IF(WITH_WSREP AND NOT EMBEDDED_LIBRARY)
     wsrep_plugin.cc
     service_wsrep.cc
   )
-  MYSQL_ADD_PLUGIN(wsrep ${WSREP_SOURCES} MANDATORY NOT_EMBEDDED EXPORT_SYMBOLS LINK_LIBRARIES wsrep-lib wsrep_api_v26)
+  MYSQL_ADD_PLUGIN(wsrep ${WSREP_SOURCES} DEFAULT STATIC_ONLY NOT_EMBEDDED EXPORT_SYMBOLS LINK_LIBRARIES wsrep-lib wsrep_api_v26)
 ELSE()
   ADD_LIBRARY(wsrep STATIC wsrep_dummy.cc)
   ADD_DEPENDENCIES(wsrep GenError)

This patch is already in bb-10.4-serg, you can use that branch as a base.
After that change, compiling with -DPLUGIN_WSREP=NO fails with numerous errors like

/home/serg/Abk/5.5/sql/log_event.cc:13782:20: error: 'class THD' has no member named 'wsrep_info'
13782 |   my_snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1,
      |                    ^~~~~~~~~~



 Comments   
Comment by Jan Lindström (Inactive) [ 2022-02-17 ]

I do not think -DPLUGIN_WSREP=NO have ever worked. Windows uses -DWITH_WSREP=0 and that works. After few tries, I have no idea what to change on those cmake files to get it work. In my opinion code changes would be quite big so I'm redundant to do those.

Generated at Thu Feb 08 09:56:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.