install protobuf on MacOS 12.0.1 error: C compiler cannot create executables

I'm trying to install protobuf using these instructions: https://github.com/protocolbuffers/protobuf

However when I run the local ./configure file with C++ installed on my local MacOS

q@Q-336-MacBook-Pro:~/Downloads/protobuf-3.21.1> gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: x86_64-apple-darwin21.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I get the error

q@Q-336-MacBook-Pro:~/Downloads/protobuf-3.21.1> ./configure
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-apple-darwin21.2.0
checking host system type... x86_64-apple-darwin21.2.0
checking target system type... x86_64-apple-darwin21.2.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '501' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for gcc... /usr/local/opt/llvm/bin/clang
checking whether the C compiler works... no
configure: error: in `/Users/qliu/Downloads/protobuf-3.21.1':
configure: error: C compiler cannot create executables
See `config.log' for more details


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation