# Compilation issue Mac Ventura & Percona Server 5.7.26-29

**URL:** <https://forums.percona.com/t/compilation-issue-mac-ventura-percona-server-5-7-26-29/22125>\
**Category:** Percona Server for MySQL 5.7\
**Tags:** mysql, percona, closed-no-reply\
**Created:** [May 18, 2023, 7:17am UTC](https://forums.percona.com/t/compilation-issue-mac-ventura-percona-server-5-7-26-29/22125 "2023-05-18T07:17:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathan\_Janken](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nathan_janken/32/10631_2.png) [@Nathan\_Janken](https://forums.percona.com/u/Nathan_Janken)\
**Post date:** [May 18, 2023, 7:17am UTC](https://forums.percona.com/t/compilation-issue-mac-ventura-percona-server-5-7-26-29/22125/1 "2023-05-18T07:17:30Z")

</div>

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

> **[Building Percona Server for MySQL 8.0 with RocksDB Storage Engine on macOS](https://www.percona.com/blog/building-percona-server-for-mysql-8-0-with-rocksdb-storage-engine-on-macos/)**
>
> In Percona Server for MySQL 8.0.29-21, we added a patch that helps us build server code on macOS. Now it's possible to build RocksDB Storage Engine as well.

But neither of them seem to work. I have done this

```auto
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

```auto
/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

```auto
[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.

```auto
$ 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:

> **[Percona Server for MySQL - Compiling Percona Server for MySQL 5.7 from Source](https://docs.percona.com/percona-server/5.7/installation/compile.html)**
>
> After either fetching the source repository or extracting a source tarball
> (from Percona or one you generated yourself), you must
> configure and build Percona Server. Do the following:

```auto
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

```auto
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
