Hello,
I need to build gRPC with gcc on mac. When trying to do so, boringssl-with-basel compilation fails with:
[ 12%] Building ASM object third_party/boringssl-with-bazel/CMakeFiles/crypto.dir/apple-aarch64/crypto/chacha/chacha-armv8-apple.S.o
clang: error: unsupported option '--noexecstack'
make[2]: *** [third_party/boringssl-with-bazel/CMakeFiles/crypto.dir/apple-aarch64/crypto/chacha/chacha-armv8-apple.S.o] Error 1
make[1]: *** [third_party/boringssl-with-bazel/CMakeFiles/crypto.dir/all] Error 2
This is how my cmake configuration of gRPC looks like:
(running from grpc/cmake/):
cmake -B release -DCMAKE_EXE_LINKER_FLAGS="-ld_classic" -DCMAKE_BUILD_TYPE=Release -DgRPC_INSTALL=ON -DgRPC_ABSL_PROVIDER=package \
-DgRPC_PROTOBUF_PROVIDER=package -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_COMPILER=/opt/homebrew/bin/g++-13 \
-DCMAKE_C_COMPILER=/opt/homebrew/bin/gcc-13 -DCMAKE_INSTALL_PREFIX=../../install -DCMAKE_PREFIX_PATH=../../install -S ../
I've tried several things, including cloning the boringssl-with-basel in a separate directory and building it locally (not as part of grpc) but this also fails with different reasons.
Is there a standard way to build gRPC on macOs with gcc? or disable the offending package from boringssl build?
Thanks,
Dan
Versions
-------------
cmake: 3.28.0
macOS: Sonoma 14.2.1 (23C71)
Xcode: 15.1.0.0.1.1700200546
gcc: gcc-13 (Homebrew GCC 13.2.0) 13.2.0
clang: Apple clang version 15.0.0 (clang-1500.0.40.1)
grpc: v1.60.0