0

I am trying to install something using brew, but I get the following error, c compiler is unable to create an executable. I installed Xcode and the command line tools.

Drs-MBP-2:Qt5.14.2 sherif_omran$ brew install rbenv ruby-build 
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/cask and homebrew/core).
==> New Formulae
nerdctl
==> Updated Formulae
Updated 42 formulae.
==> Renamed Formulae
mr2 -> zoro
==> Updated Casks
Updated 9 casks.
==> Deleted Casks
jalbum

Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.

==> Downloading https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.xz
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/1b3275d8fa55c27c48d0dc1ea0d6f1e05308bb826e4f1df51c026b08f28a37a3--m4-1.4.19.tar.xz
==> Downloading https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/70e2744f2b485424b5ad79ac600895f02258d01f5a8425994c340e1d013a7216--autoconf-2.71.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/manifests/0.29.2_3
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/ac691fc7ab8ecffba32a837e7197101d271474a3a84cfddcc30c9fd6763ab3c6--pkg-config-0.29.2_3.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/blobs/sha256:8c6160305abd948b8cf3e0d5c6bb0df192fa765bbb9535dda0b573cb60abbe52
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/506df5e0002bc557fe9c6a6eadce3e4bbe4ecdfd029053bdc950d6569c9e40bc--pkg-config--0.29.2_3.high_sierra.bottle.tar.gz
==> Downloading https://ftp.gnu.org/gnu/readline/readline-8.1-patches/readline81-001
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/6607f4de8f3c741c80b9d2b64e03b93056bec46d0534dafc9d8f714c95debea7--readline81-001
==> Downloading https://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/118fcba9dbeb2dd253f11507b4f4e3167af70954a464b35e4d0d7e79d3965d1b--readline-8.1.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/ruby-build/manifests/20211227
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/0f1027210e3670dfc5327204a123502e9d6176d439c4909353ec4f4a2a95864c--ruby-build-20211227.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/ruby-build/blobs/sha256:3d18d498a34fca3e657a14614e88d87f114a8fd3d419596a6f986f42fe034be5
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/44be296c211777a5567387cffbb54cc3cecfe1613afddf7ebb2cebb01b292cb4--ruby-build--20211227.all.bottle.tar.gz
==> Downloading https://github.com/rbenv/rbenv/archive/v1.2.0.tar.gz
Already downloaded: /Users/sherif_omran/Library/Caches/Homebrew/downloads/04b752d33f8d66d3c8185a7780267cd2ccef6f82b194186d809c805b5ae4f33b--rbenv-1.2.0.tar.gz
==> Installing dependencies for rbenv: m4, autoconf, pkg-config, readline and ruby-build
==> Installing rbenv dependency: m4
==> ./configure --prefix=/usr/local/Cellar/m4/1.4.19
Last 15 lines from /Users/sherif_omran/Library/Logs/Homebrew/m4/01.configure:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./build-aux/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 make supports nested variables... (cached) yes
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/private/tmp/m4-20220101-94670-1hbcfr6/m4-1.4.19':
configure: error: C compiler cannot create executables
See `config.log' for more details

Do not report this issue to Homebrew/brew or Homebrew/core!


Error: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.

Drs-MBP-2:Qt5.14.2 sherif_omran$ gcc
clang: error: no input files
Drs-MBP-2:Qt5.14.2 sherif_omran$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
Drs-MBP-2:Qt5.14.2 sherif_omran$ 

Update:

I could solve it using manual installation of CLANG compiler using ports. Brew kept asking for compiler to compile the code, but ports let me install the compiler package.

4
  • Did you look at config.log as the message says?
    – nohillside
    Commented Dec 31, 2021 at 23:48
  • here is config.log, pastebin.com/T7BvjnXn Commented Jan 1, 2022 at 7:37
  • Just to be clear, when you say, ports let me install the compiler package, does that mean that MacPorts let you install the compiler?
    – Seamus
    Commented Jan 3, 2022 at 21:26
  • @Seamus: yes macports. Commented Jan 4, 2022 at 20:33

1 Answer 1

1

Perhaps I'm missing something, but the issue seems to be stated clearly:

Error: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.

I don't use Homebrew because of philosophical differences :) I use MacPorts instead. I just checked, and they do support High Sierra (10.13) & even much "older" versions (Tiger/10.4) that may be downloaded here. MacPorts also maintains a GitHub repo where you may find other useful stuff, post issues, etc.

Most helpfully, MacPorts provides installation instructions for both Macports and Xcode for all supported versions. Apple still sources vintage versions of Xcode and the "Command Line Tools" on their Developer's Site.

7
  • macports supports back to Tiger - although many apps can't be ported as they use new things
    – mmmmmm
    Commented Jan 2, 2022 at 13:12
  • 1
    It also helps to use the macports home page where the install instructions macports.org/install.php tell you how to install both Xcode and Macports on all versions back to Tiger
    – mmmmmm
    Commented Jan 2, 2022 at 13:14
  • @mmmmmm: Thank you for that information. I've tried to incorporate it into my answer, but please suggest any edits you feel might be an improvement.
    – Seamus
    Commented Jan 2, 2022 at 19:14
  • yes i could solve it using port and installing the llvc compiler clang and manual adjustment of the compiler. Commented Jan 3, 2022 at 21:10
  • 1
    @Seamus Much much better to remove all reference to Github for macports it makes things much more complex then their home page.
    – mmmmmm
    Commented Jan 3, 2022 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .