"configure: error: C compiler cannot create executables"
I'm getting this error msg "configure: error: C compiler cannot create executables" which seems to be a recurring problem. There are lots of old answers to this, but those solutions don't seem to work for me. So, I'm asking this question again in 2020.
Mac OS 10.15.7 (Catalina)
Mac Xcode 11.6 (11E708)
Command Line Tools 11.5
$ which cc
/usr/bin/cc
$ ls -l /usr/bin/cc
/usr/bin/cc -> clang
$ cc -v
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ which gcc
/opt/local/bin/gcc
$ ls -l /opt/local/bin/gcc -> /usr/bin/gcc
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ echo $CC
/opt/local/bin/gcc
I wonder if this is a problem with clang vs. using a real gcc from gnu?
MacBook Pro with Touch Bar