title: install protobuf on MacOS 12.0.1 error: C compiler cannot create executables
body: <p>I'm trying to install <code>protobuf</code> using these instructions: <a href="https://github.com/protocolbuffers/protobuf" rel="nofollow noreferrer">https://github.com/protocolbuffers/protobuf</a></p>
  <p>However when I run the local <code>./configure</code> file with C++ installed on my local MacOS</p>
  <pre><code>q@Q-336-MacBook-Pro:~/Downloads/protobuf-3.21.1&gt; 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
  </code></pre>
  <p>I get the error</p>
  <pre><code>q@Q-336-MacBook-Pro:~/Downloads/protobuf-3.21.1&gt; ./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
  </code></pre>