I am having some trouble compiling Percona Server 5.7.26-29 on a Mac running the Ventura OS and I’m hoping someone can help.
I’ve tried following the instructions
But neither of them seem to work. I have done this
brew install cmake zstd openssl@1.1 libevent lz4 icu4c protobuf libfido2
xcode-select --install
git clone https://github.com/percona/percona-server.git --depth 1 --branch Percona-Server-5.7.26-29
cd percona-server/
git submodule init
git submodule update
cd ..
mkdir percona-build
cd percona-build
cmake ../percona-server \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_CONFIG=mysql_release \
-DMYSQL_MAINTAINER_MODE=OFF \
-DDOWNLOAD_BOOST=ON \
-DWITH_BOOST=./boost \
-DWITH_SYSTEM_LIBS=ON \
-DWITHOUT_TOKUDB=ON \
-DWITH_ROCKSDB=ON
cmake --build . -- -j
I get a bunch of errors like this
/Users/XXXXXXXX/Documents/workspace/percona-server/storage/rocksdb/rocksdb/port/port_posix.h:50:12: fatal error: 'endian.h' file not found
and eventually it fails with
[ 39%] Linking CXX static library ../../archive_output_directory/libprotobuf.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../archive_output_directory/libprotobuf.a(atomicops_internals_x86_gcc.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../archive_output_directory/libprotobuf.a(atomicops_internals_x86_msvc.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../archive_output_directory/libprotobuf.a(atomicops_internals_x86_gcc.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../archive_output_directory/libprotobuf.a(atomicops_internals_x86_msvc.cc.o) has no symbols
[ 39%] Built target protobuf
make: *** [all] Error 2
i don’t know if it is related to the eventual failure, but endian.h is here. however the build isn’t picking it up.
$ pwd
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine
$ ls
_limits.h _mcontext.h _param.h _types.h byte_order.h endian.h fasttrap_isa.h limits.h param.h profile.h signal.h types.h vmparam.h
i’ve tried manually moving it to /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include, but then it just gets more errors about things it can’t find
and I’ve also tried these instruction:
brew install cmake zstd openssl@1.1 libevent lz4 icu4c protobuf libfido2
xcode-select --install
git clone https://github.com/percona/percona-server.git --depth 1 --branch Percona-Server-5.7.26-29
cd percona-server/
git submodule init
git submodule update
cd ..
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DDOWNLOAD_BOOST=ON -DWITH_BOOST=./boost
make
and this ends up failing with an error message like this
In file included from /Users/nathanjanken/Documents/workspace/percona-server/storage/perfschema/cursor_by_account.cc:22:
In file included from /Users/nathanjanken/Documents/workspace/percona-server/storage/perfschema/cursor_by_account.h:24:
In file included from /Users/nathanjanken/Documents/workspace/percona-server/storage/perfschema/pfs_engine_table.h:19:
In file included from /Users/nathanjanken/Documents/workspace/percona-server/sql/auth/auth_common.h:22:
In file included from /Users/nathanjanken/Documents/workspace/percona-server/sql/table.h:24:
In file included from /Users/nathanjanken/Documents/workspace/percona-server/sql/datadict.h:18:
In file included from /Users/nathanjanken/Documents/workspace/percona-server/sql/handler.h:38:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:551:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string_view:219:
/Users/nathanjanken/Documents/workspace/percona-server/version:1:1: error: expected unqualified-id
MYSQL_VERSION_MAJOR=5
^
/Users/nathanjanken/Documents/workspace/percona-server/include/my_config.h:394:29: note: expanded from macro 'MYSQL_VERSION_MAJOR'
#define MYSQL_VERSION_MAJOR 5
Any help is appreciated! Thank you so much