eblot / homebrew-armeabi

Homebrew tap for ARM EABI toolchain
MIT License
43 stars 11 forks source link

Unable to install using homebrew #1

Closed julianvogels closed 5 years ago

julianvogels commented 6 years ago

I am unable to install arm-none-eabi-gcc It seems like both ftp.heikorichter.name and the fr.mirror.babylon.network mirror are down? I am not behind a proxy.


==> Installing arm-none-eabi-gcc from eblot/armeabi
==> Installing dependencies for eblot/armeabi/arm-none-eabi-gcc: mpfr, isl, libmpc, libelf, arm-none-eabi-binutils, gcc
==> Installing eblot/armeabi/arm-none-eabi-gcc dependency: mpfr
==> Downloading https://homebrew.bintray.com/bottles/mpfr-4.0.1.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/22/223ac973eb796b275cf751111c458dc1466f82f302e96ca764ea091309d1a963?__gda__=exp=1522946943~hmac=4742de391
######################################################################## 100.0%
==> Pouring mpfr-4.0.1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/mpfr/4.0.1: 28 files, 4.6MB
==> Installing eblot/armeabi/arm-none-eabi-gcc dependency: isl
==> Downloading https://homebrew.bintray.com/bottles/isl-0.19.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e2/e286024c142af0e968d8562e83745a05dd059dbe226c41fe6053c8fd481815fe?__gda__=exp=1522946944~hmac=94386f7ec
######################################################################## 100.0%
==> Pouring isl-0.19.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/isl/0.19: 66 files, 3.8MB
==> Installing eblot/armeabi/arm-none-eabi-gcc dependency: libmpc
==> Downloading https://homebrew.bintray.com/bottles/libmpc-1.1.0.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libmpc-1.1.0.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/libmpc/1.1.0: 12 files, 353.8KB
==> Installing eblot/armeabi/arm-none-eabi-gcc dependency: libelf
==> Downloading https://homebrew.bintray.com/bottles/libelf-0.8.13_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libelf-0.8.13_1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/libelf/0.8.13_1: 12 files, 222.3KB
==> Installing eblot/armeabi/arm-none-eabi-gcc dependency: arm-none-eabi-binutils
==> Downloading http://ftp.gnu.org/gnu/binutils/binutils-2.30.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/arm-none-eabi-binutils/2.30 --target=arm-none-eabi --disable-shared --disable-nls --with-gmp=/usr/local/opt/gm
==> make
==> make install
🍺  /usr/local/Cellar/arm-none-eabi-binutils/2.30: 77 files, 16.1MB, built in 2 minutes 17 seconds
==> Installing eblot/armeabi/arm-none-eabi-gcc dependency: gcc
Warning: Building gcc from source:
  The bottle needs the Xcode CLT to be installed.
==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz
######################################################################## 100.0%
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/e9e0ee09389a54cc4c8fe1c24ebca3cd765ed0ba/gcc/6.1.0-jit.patch
######################################################################## 100.0%
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/df0465c02a/gcc/apfs.patch
######################################################################## 100.0%
==> Patching
==> Applying 6.1.0-jit.patch
patching file gcc/jit/Make-lang.in
==> Applying apfs.patch
patching file libstdc++-v3/include/Makefile.in
Hunk #1 succeeded at 1763 (offset -1 lines).
==> ../configure --build=x86_64-apple-darwin17.4.0 --prefix=/usr/local/Cellar/gcc/7.3.0_1 --libdir=/usr/local/Cellar/gcc/7.3.0_1/lib/gcc/7 --enable-langu
==> make
==> make install
🍺  /usr/local/Cellar/gcc/7.3.0_1: 1,487 files, 285.9MB, built in 53 minutes 39 seconds
==> Installing eblot/armeabi/arm-none-eabi-gcc
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-7.2.0/gcc-7.2.0.tar.xz
==> Downloading from http://ftp.heikorichter.name/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.xz

curl: (6) Could not resolve host: ftp.heikorichter.name
Trying a mirror...
==> Downloading http://fr.mirror.babylon.network/gcc/releases/gcc-7.2.0/gcc-7.2.0.tar.xz

curl: (6) Could not resolve host: fr.mirror.babylon.network
Error: Failed to download resource "arm-none-eabi-gcc"
Download failed: http://fr.mirror.babylon.network/gcc/releases/gcc-7.2.0/gcc-7.2.0.tar.xz```
julianvogels commented 6 years ago

I tried it a second time, this time it failed differently


Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (caskroom/cask).
No changes to formulae.

==> Installing arm-none-eabi-gcc from eblot/armeabi
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-7.2.0/gcc-7.2.0.tar.xz
==> Downloading from http://ftp.halifax.rwth-aachen.de/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.xz
######################################################################## 100.0%
==> Cloning https://github.com/eblot/newlib-cygwin.git
Cloning into '/Users/julianvogels/Library/Caches/Homebrew/arm-none-eabi-gcc--newlib--git'...
remote: Counting objects: 7501, done.
remote: Compressing objects: 100% (5119/5119), done.
remote: Total 7501 (delta 3382), reused 4082 (delta 2297), pack-reused 0
Receiving objects: 100% (7501/7501), 13.81 MiB | 6.57 MiB/s, done.
Resolving deltas: 100% (3382/3382), done.
==> Checking out branch clang-armeabi-20170818
==> ditto /private/tmp/arm-none-eabi-gcc--newlib-20180405-65944-qzz00j/libgloss /private/tmp/arm-none-eabi-gcc-20180405-65944-d4h1v3/gcc-7.2.0/libgloss
==> ditto /private/tmp/arm-none-eabi-gcc--newlib-20180405-65944-qzz00j/newlib /private/tmp/arm-none-eabi-gcc-20180405-65944-d4h1v3/gcc-7.2.0/newlib
==> /private/tmp/arm-none-eabi-gcc-20180405-65944-d4h1v3/gcc-7.2.0/configure --prefix=/usr/local/Cellar/arm-none-eabi-gcc/7.2.0 --target=arm-none-eabi --d
==> mkdir -p /usr/local/Cellar/arm-none-eabi-gcc/7.2.0/arm-none-eabi/lib/fpu/interwork
==> make
Last 15 lines from /Users/julianvogels/Library/Logs/Homebrew/arm-none-eabi-gcc/05.make:
                 from /private/tmp/arm-none-eabi-gcc-20180405-65944-d4h1v3/gcc-7.2.0/libstdc++-v3/include/precompiled/stdc++.h:52:
/private/tmp/arm-none-eabi-gcc-20180405-65944-d4h1v3/gcc-7.2.0/build/arm-none-eabi/thumb/libstdc++-v3/include/bits/ostream_insert.h:36:10: fatal error: bits/cxxabi_forced.h: No such file or directory
 #include <bits/cxxabi_forced.h>
          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[8]: *** [arm-none-eabi/bits/stdc++.h.gch/O2g.gch] Error 1
make[8]: *** Waiting for unfinished jobs....
make[7]: *** [all-recursive] Error 1
make[6]: *** [all] Error 2
make[5]: *** [multi-do] Error 1
make[4]: *** [all-multi] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libstdc++-v3] Error 2
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/eblot/homebrew-armeabi/issues

/usr/local/Homebrew/Library/Homebrew/exceptions.rb:426:in `block in dump': undefined method `check_for_bad_install_name_tool' for #<Homebrew::Diagnostic::Checks:0x007f838b9722d0> (NoMethodError)
Did you mean?  check_for_tap_ruby_files_locations
    from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:425:in `each'
    from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:425:in `dump'
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:138:in `rescue in <main>'
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:30:in `<main>'```
eblot commented 6 years ago

The first issues come from an invalid/incomplete mirror.

The second issue is real. Try updating brew, I've updated the formula to use GCC 7.3 and Newlib 3.0 (but not tested yet)

(as a side note: I'm not really using GCC anymore, I moved to LLVM/Clang for all my ARM-based projects)

eblot commented 6 years ago

Note: if the mirror (http://fr.mirror.babylon.network/) fails again, replace the 'mirror' line in the Formula with a better mirror from https://gcc.gnu.org/mirrors.html (or remove the mirror line)

julianvogels commented 6 years ago

Hi eblot, I tried again, but it failed with another error. The mirror was fine this time.

$ brew install arm-none-eabi-gcc

[…]

==> Installing arm-none-eabi-gcc from eblot/armeabi
==> Installing dependencies for eblot/armeabi/arm-none-eabi-gcc: gcc
==> Installing eblot/armeabi/arm-none-eabi-gcc dependency: gcc
Warning: Building gcc from source:
  The bottle needs the Xcode CLT to be installed.
==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz
######################################################################## 100.0%
==> ../configure --build=x86_64-apple-darwin17.5.0 --prefix=/usr/local/Cellar/gc
==> make
==> make install
🍺  /usr/local/Cellar/gcc/8.1.0: 1,495 files, 336.4MB, built in 58 minutes 38 seconds
==> Installing eblot/armeabi/arm-none-eabi-gcc
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz
Already downloaded: /Users/julianvogels/Library/Caches/Homebrew/arm-none-eabi-gcc-7.3.0.tar.xz
==> Downloading ftp://sourceware.org/pub/newlib/newlib-3.0.0.tar.gz
Already downloaded: /Users/julianvogels/Library/Caches/Homebrew/arm-none-eabi-gcc--newlib-3.0.0.tar.gz
==> ditto /private/tmp/arm-none-eabi-gcc--newlib-20180522-75670-1o1ho4j/newlib-3
==> /private/tmp/arm-none-eabi-gcc-20180522-75670-1lj9jiu/gcc-7.3.0/configure --
==> mkdir -p /usr/local/Cellar/arm-none-eabi-gcc/7.3.0/arm-none-eabi/lib/fpu/int
==> make
Last 15 lines from /Users/julianvogels/Library/Logs/Homebrew/arm-none-eabi-gcc/04.make:
                 from /private/tmp/arm-none-eabi-gcc-20180522-75670-1lj9jiu/gcc-7.3.0/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /private/tmp/arm-none-eabi-gcc-20180522-75670-1lj9jiu/gcc-7.3.0/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /private/tmp/arm-none-eabi-gcc-20180522-75670-1lj9jiu/gcc-7.3.0/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /private/tmp/arm-none-eabi-gcc-20180522-75670-1lj9jiu/gcc-7.3.0/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /private/tmp/arm-none-eabi-gcc-20180522-75670-1lj9jiu/gcc-7.3.0/libstdc++-v3/include/precompiled/stdc++.h:52:
/private/tmp/arm-none-eabi-gcc-20180522-75670-1lj9jiu/gcc-7.3.0/build/arm-none-eabi/libstdc++-v3/include/bits/ios_base.h:46:11: fatal error: system_error: No such file or directory
 # include <system_error>
           ^~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [arm-none-eabi/bits/stdc++.h.gch/O2g.gch] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libstdc++-v3] Error 2
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/eblot/homebrew-armeabi/issues

Any idea how I could resolve this?

harrisonturton commented 5 years ago

After trying to install a few times, it keeps hanging on the ninja install step:

==> Installing arm-none-eabi-llvm from eblot/armeabi
==> Downloading http://releases.llvm.org/7.0.1/llvm-7.0.1.src.tar.xz
Already downloaded: /Users/harrisonturton/Library/Caches/Homebrew/downloads/3530b75a6033ce88f438ea48e36ae70728b6ecc9d8a8973e44cbc477ee45ab4c--llvm-7.0.1.src.tar.xz
==> Downloading https://releases.llvm.org/7.0.1/cfe-7.0.1.src.tar.xz
Already downloaded: /Users/harrisonturton/Library/Caches/Homebrew/downloads/e88421c4653fa9f4ffce3393a1f6d5142d07908c95d1f75a773666512dbe373b--cfe-7.0.1.src.tar.xz
==> Downloading https://releases.llvm.org/7.0.1/clang-tools-extra-7.0.1.src.tar.xz
Already downloaded: /Users/harrisonturton/Library/Caches/Homebrew/downloads/c055cc8e0627d814063653c11d38b48b74bc35a0b0d39dbf7c65c1972b9c22ee--clang-tools-extra-7.0.1.src.tar.xz
==> Downloading https://releases.llvm.org/7.0.1/lld-7.0.1.src.tar.xz
Already downloaded: /Users/harrisonturton/Library/Caches/Homebrew/downloads/28d82806d84a7bbd190fe047904a84918fb8a67efb334b465d683f658a0546f4--lld-7.0.1.src.tar.xz
==> Downloading https://gist.githubusercontent.com/eblot/43552f8c01cc7d2ee4faef42454c2c83/raw/157c5fee1d9e2ea4c87af78511ce81702a473e80/lld_armv6m_thunk_support.diff
Already downloaded: /Users/harrisonturton/Library/Caches/Homebrew/downloads/72fc03289a59f997c9dd7ac9d1f7fa412c0150909412d9a1bb943ee37fec2cbf--lld_armv6m_thunk_support.diff
==> Patching lld
==> Applying lld_armv6m_thunk_support.diff
patching file ELF/Driver.cpp
patching file ELF/Thunks.cpp
==> cmake -G Ninja /private/tmp/arm-none-eabi-llvm-20190125-38111-1opp1mk/llvm-7.0.1.src -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=False -DLLVM_INCLUDE_TESTS=False -DLLVM_TARG
==> ninja

Think this could be related. Any ideas?

eblot commented 5 years ago

You can install it with -d -v to check where it stalls. Beware it takes time (several minutes, depending on your computer) to build a full toolchain, there is no bottle (pre-compiled tarball) for now.

eblot commented 5 years ago

As a side note, be sure to allocate enough RAM if you use a VM to build a toolchain: each process can eat over 1GB of RAM, and Ninja uses all CPU threads available. If there is no enough physical RAM available, and your computer starts to swap, it may takes hours to complete the build. Check the cpu/ram resources while building if it seems to "hang", and reduce the number of virtual CPUs if you see the RAM usage skyrockets.

eblot commented 5 years ago

No news, and unable to reproduce, closing.