The issue with mariadb
10.3 has been fixed upstream. Here is a patch for the fix.
mariadb_10_3.patch
diff --git a/sdk/databaselayer/CMakeLists.txt b/sdk/databaselayer/CMakeLists.txt
index b7632bc7d..23907a5ad 100644
--- a/sdk/databaselayer/CMakeLists.txt
+++ b/sdk/databaselayer/CMakeLists.txt
@@ -56,6 +56,18 @@ if ( WITH_MYSQL )
include_directories(${MYSQLCLIENT_INCLUDE})
message("-- Adding MySQL include path: ${MYSQLCLIENT_INCLUDE} ")
FILE(GLOB MYSQL_SRCS "src/dblayer/Mysql*.cpp")
+
+if(UNIX AND NOT APPLE)
+# Recent (2019) versions of debian and Arch have mariadb 10.3 which, it seems, isn't directly compatable with the included dblayer source
+# It has a necessary header file in /usr/include/mariadb/server/ so flag to #include it if it exists
+# See https://github.com/eranif/codelite/issues/2215
+ find_path(MARIADBSERVER_INCLUDE NAMES mysql.h PATH_SUFFIXES mysql/server mariadb/server)
+ if ( NOT ${MARIADBSERVER_INCLUDE} STREQUAL "MARIADBSERVER_INCLUDE-NOTFOUND" )
+ add_definitions( -DMARIADBSERVER_INCLUDE=1 )
+ message( "-- Adding MySQL server include" )
+ endif(NOT ${MARIADBSERVER_INCLUDE} STREQUAL "MARIADBSERVER_INCLUDE-NOTFOUND")
+endif(UNIX AND NOT APPLE)
+
endif ( WITH_MYSQL )
# Define the output
diff --git a/sdk/databaselayer/src/dblayer/MysqlPreparedStatementWrapper.cpp b/sdk/databaselayer/src/dblayer/MysqlPreparedStatementWrapper.cpp
index 699df3a53..3cac9b6c6 100644
--- a/sdk/databaselayer/src/dblayer/MysqlPreparedStatementWrapper.cpp
+++ b/sdk/databaselayer/src/dblayer/MysqlPreparedStatementWrapper.cpp
@@ -1,3 +1,9 @@
+#if defined(MARIADBSERVER_INCLUDE)
+// See https://github.com/eranif/codelite/issues/2215
+// (For some reason this needs to come before the other #includes)
+ #include "server/mysql.h"
+#endif
+
#include "../include/MysqlPreparedStatementWrapper.h"
#include "../include/MysqlPreparedStatementResultSet.h"
#include "../include/MysqlDatabaseLayer.h"
diff --git a/sdk/databaselayer/src/dblayer/MysqlResultSetMetaData.cpp b/sdk/databaselayer/src/dblayer/MysqlResultSetMetaData.cpp
index a22963a9a..831708d23 100644
--- a/sdk/databaselayer/src/dblayer/MysqlResultSetMetaData.cpp
+++ b/sdk/databaselayer/src/dblayer/MysqlResultSetMetaData.cpp
@@ -1,5 +1,5 @@
#include "../include/MysqlResultSetMetaData.h"
-#include "mysql_com.h"
+#include "mysql.h"
// ctor
MysqlResultSetMetaData::MysqlResultSetMetaData(MysqlInterface* pInterface, MYSQL_RES* pMetaData)
Here is a patch to update PKGBUILD
PKGBUILD.patch
diff --git a/PKGBUILD b/PKGBUILD
index 86485d9..ca19afb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@
pkgname=codelite
pkgver=12.0
-pkgrel=1
+pkgrel=2
pkgdesc="Cross platform C/C++/PHP and Node.js IDE written in C++"
arch=('i686' 'x86_64')
url="http://www.codelite.org/"
@@ -22,7 +22,7 @@ depends=('wxgtk'
'clang' 'lldb'
'libedit'
'libssh'
- 'libmariadbclient'
+ 'mariadb-libs'
'ncurses'
'xterm' 'curl'
'python2'
@@ -34,10 +34,15 @@ optdepends=('graphviz: callgraph visualization'
'valgrind: debugger'
)
-source=(https://github.com/eranif/${pkgname}/archive/${pkgver//_/-}.tar.gz http://repos.codelite.org/wxCrafterLibs/wxgui.zip)
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/eranif/${pkgname}/archive/${pkgver//_/-}.tar.gz"
+ http://repos.codelite.org/wxCrafterLibs/wxgui.zip
+ mariadb_10_3.patch
+)
md5sums=('674287c16de4744726afd5fd6521ee4f'
- '20f3428eb831c3ff2539a7228afaa3b4')
+ '20f3428eb831c3ff2539a7228afaa3b4'
+ 'd6da3b478ec7577abd05d8183d20a705')
#if [[ "$CARCH" == 'i686' ]]; then
@@ -52,6 +57,11 @@ noextract=('wxgui.zip')
pkg_name_ver="${pkgname}-${pkgver//_/-}"
+prepare() {
+ cd "${srcdir}/${pkg_name_ver}"
+ patch -p1 -i "${srcdir}"/mariadb_10_3.patch
+}
+
# 20151027: ArchLinux clang/llvm-3.7: CommandLine Error: Option 'aarch64-reserve-x18' registered more than once
# 20151027: -DENABLE_LLDB=0: ArchLinux clang/llvm-3.7: CommandLine Error: Option 'aarch64-reserve-x18' registered more than once
# 20151027: sudo chmod 000 /usr/lib/codelite/LLDBDebugger.so
Pinned Comments
uffe commented on 2016-09-26 11:42 (UTC) (edited on 2020-07-27 18:21 (UTC) by uffe)
ATTENTION: read this before flagging this package out-of-date
This package "codelite" represents the stable release of the codelite project.
I do not consider the "Weekly Builds" from http://downloads.codelite.org/ as stable releases (neither does the codelite project)
Generally speaking - this package will not be updated before the codelite release/download page (https://downloads.codelite.org/) have a new stable release published.
Please respect that - Thanks
PS: to clear up a recent misunderstanding - this does not mean that I won't accept patches that is needed for stable codelite to build against refreshed libraries etc
PS: I have added new "codelite-unstable" package to AUR that follows the weekly/latest builds from the codelite project.