diff options
author | Dmitry Shulga <dmitry.shulga@mariadb.com> | 2021-04-28 10:43:02 +0700 |
---|---|---|
committer | Dmitry Shulga <dmitry.shulga@mariadb.com> | 2021-04-28 10:43:02 +0700 |
commit | c4c7dca728bd2d7b77c953b0c3b10961e6247573 (patch) | |
tree | 67bf1a19b7824b6e9564b57e76df3d3da5d2d715 | |
parent | 54c460ace606157f2a23706ec98e9de70aba767e (diff) | |
download | mariadb-git-bb-10.6-MDEV-25543.tar.gz |
MDEV-25543: Building failure on MacOS in case MariadDB server is compiled with XCode 12.5bb-10.6-MDEV-25543
Attempt to build MariaDB server on MacOS could result in
compilation errors like the following one:
In file included from server-10.2/storage/perfschema/cursor_by_account.cc:28:
In file included from server-10.2/include/my_global.h:287:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/math.h:309:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/type_traits:418:
server-10.2/version:1:1: error: expected unqualified-id
MYSQL_VERSION_MAJOR=10
^
server-10.2/build.dir/include/my_config.h:529:29: note: expanded from macro 'MYSQL_VERSION_MAJOR'
This kind of compiler errors occur by the reson that compiler's system headers
contain the directive '#include <version>' and a compiler is invoked
with -I${CMAKE_SOURCE_DIR}.
The MariaDB source code root directory contains the file VERSION that is handled
by the compiler during processing the directive #include <version>
since file names on MacOS are case insensetive, so version and VERSION is treated as
the same file name.
To fix the issue the source code root directory should be removed from a list
of directories used by the compiler for include search path.
-rw-r--r-- | storage/perfschema/CMakeLists.txt | 3 | ||||
-rw-r--r-- | storage/perfschema/pfs_prepared_stmt.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt index d344c182af0..1884256407f 100644 --- a/storage/perfschema/CMakeLists.txt +++ b/storage/perfschema/CMakeLists.txt @@ -20,8 +20,7 @@ # along with this program; if not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/include +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql ${CMAKE_BINARY_DIR}/sql ${CMAKE_CURRENT_BINARY_DIR} diff --git a/storage/perfschema/pfs_prepared_stmt.h b/storage/perfschema/pfs_prepared_stmt.h index c163514ccc2..1b017b508a6 100644 --- a/storage/perfschema/pfs_prepared_stmt.h +++ b/storage/perfschema/pfs_prepared_stmt.h @@ -29,8 +29,8 @@ */ #include "pfs_stat.h" -#include "include/mysql/psi/psi.h" -#include "include/mysql/psi/mysql_ps.h" +#include "mysql/psi/psi.h" +#include "mysql/psi/mysql_ps.h" #include "pfs_program.h" #define PS_NAME_LENGTH NAME_LEN |