Variable LIBMARIADB not defined


My work environment is as follows.
  • Debian 9 (in VirtualBox)
  • prerequisites installed (mariadb, omniorb, sphinx…)
  • Tango 9.3.4 (from GitLab, and jar from Github)
  • database configuration (user, privileges…) done

From this environment I try to build tango-controls with the following instructions.

~/tango-src$ ant build package
~/tango-src$ cd build/distr
~/tango-src/build/distr$ ./configure –enable-mariadb –enable-dbserver –enable-dbcreate –enable-java –with-mysql-admin=${TANGO_USER} –with-mysql-admin-passwd=${TANGO_PASS}
~/tango-src/build/distr$ make
make[3] : on entre dans le répertoire « /home/tangouser/tango-src/build/distr/cppserver/database »
CXX ClassFactory.o
In file included from ./DataBaseClass.h:51:0,
from ClassFactory.cpp:109:
./DataBase.h:56:14: error: conflicting declaration ‘typedef bool my_bool’
typedef bool my_bool;
In file included from ./DataBase.h:51:0,
from ./DataBaseClass.h:51,
from ClassFactory.cpp:109:
/usr/include/mysql/mysql.h:53:14: note: previous declaration as ‘typedef char my_bool’
typedef char my_bool;
ClassFactory.cpp:2:20: warning: ‘RcsId’ defined but not used [-Wunused-variable]
static const char *RcsId = "$Header$";
Makefile:619 : la recette pour la cible « ClassFactory.o » a échouée

In the file build/distr/cppserver/database/DataBase.h the variable LIBMARIADB is not defined anywhere. This is what causes the build error. I searched all the code, also configuration generators (ant, automake), I did not find any trace of definition of this variable.

Any help to unblock my situation is welcome.
Edited 1 year ago
Hi JC,

as a quick workaround you can uncomment the offending code. See below.
I've opened to track that issue.

The symbol LIBMARIADB is defined by the mariadb client header.

diff –git a/DataBase.h b/DataBase.h
index 09d54c4..47346a9 100644
— a/DataBase.h
+++ b/DataBase.h
@@ -51,11 +51,11 @@
#include <mysql.h>
#include <update_starter.h>

-#if MYSQL_VERSION_ID >= 80001
-typedef bool my_bool;
+// #ifndef LIBMARIADB
+// #if MYSQL_VERSION_ID >= 80001
+// typedef bool my_bool;
+// #endif
+// #endif

#define DB_SQLError "DB_SQLError"
#define DB_IncorrectArguments "DB_IncorrectArguments"
Thank you for this prompt answer and for opening a ticket on GitLab about this!
So first I will comment these lines of code to continue the build.
Edited 1 year ago
I now have a fix ready at Please have a look if that works.
I was not able to get the bugfix/compilation-error-my-bool branch via git. I integrated the changes in the DataBase.h file by hand.

The build works perfectly!

Thanks Thomas.
Edited 1 year ago
Register or login to create to post a reply.