riscv-software-src / homebrew-riscv

homebrew (macOS) packages for RISC-V toolchain
https://riscv.org
310 stars 50 forks source link

riscv-gnu-toolchain build from source fails #21

Closed cookiestuf closed 6 years ago

cookiestuf commented 6 years ago

Hi,

I'm trying to build the riscv-gnu-toolchain from source but I'm running into a missing file error. Any advice on how to proceed? Running OS X High Sierra 10.13

airbears2-10-142-97-41:~ sarahzhou$ brew reinstall --build-from-source riscv-gnu-toolchain
==> Reinstalling riscv/riscv/riscv-gnu-toolchain 
==> Cloning https://github.com/riscv/riscv-gnu-toolchain.git
Updating /Users/sarahzhou/Library/Caches/Homebrew/riscv-gnu-toolchain--git
==> Checking out branch master
Synchronizing submodule url for 'dtc'
Synchronizing submodule url for 'pixman'
Synchronizing submodule url for 'roms/SLOF'
Synchronizing submodule url for 'roms/ipxe'
Synchronizing submodule url for 'roms/openbios'
Synchronizing submodule url for 'roms/openhackware'
Synchronizing submodule url for 'roms/qemu-palcode'
Synchronizing submodule url for 'roms/seabios'
Synchronizing submodule url for 'roms/sgabios'
Synchronizing submodule url for 'roms/u-boot'
Synchronizing submodule url for 'roms/vgabios'
==> Patching
patching file riscv-gcc/libstdc++-v3/include/Makefile.in
==> ./configure --prefix=/usr/local/Cellar/riscv-gnu-toolchain/gnu --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-syste
==> make
Last 15 lines from /Users/sarahzhou/Library/Logs/Homebrew/riscv-gnu-toolchain/02.make:

make

rm -rf stamps/build-binutils-newlib build-binutils-newlib
mkdir build-binutils-newlib
cd build-binutils-newlib && CC_FOR_TARGET=riscv64-unknown-elf-gcc /private/tmp/riscv-gnu-toolchain-20180422-24108-16u3x1z/riscv-binutils-gdb/configure \
        --target=riscv64-unknown-elf \
         \
        --prefix=/usr/local/Cellar/riscv-gnu-toolchain/gnu \
         \
        --disable-werror \
        --with-expat=yes  \
        --enable-gdb
/bin/sh: /private/tmp/riscv-gnu-toolchain-20180422-24108-16u3x1z/riscv-binutils-gdb/configure: No such file or directory
make: *** [stamps/build-binutils-newlib] Error 127

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/riscv/homebrew-riscv/issues
sbeamer commented 6 years ago

I appreciate this report!

I am able to build riscv-gnu-toolchain both by rebuilding within Homebrew and by building it directly from its repo. Being unable to reproduce this issue, it is challenging for me to debug.

I imagine there might be an issue during the build process if homebrew is somehow not recursively cloning the submodules.

Could you try building it directly from the repo?

Please let me know if you find anything new.

sbeamer commented 6 years ago

Please comment again to reopen this if you have more information.