riscv-software-src / homebrew-riscv

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

brew test riscv-tools failed on macOS 11.3 #67

Closed ljerbi closed 2 years ago

ljerbi commented 3 years ago

after installing risk-tools using brew, I get the following output when I run brew test riscv-tools

==> Testing riscv/riscv/riscv-tools ==> /opt/brew/opt/riscv-gnu-toolchain/bin/riscv64-unknown-elf-gcc /private/tmp/riscv-tools-test-20210830-24311-11gdeba/hello.c Last 15 lines from /Users/lindajerbi/Library/Logs/Homebrew/riscv-tools/test.01.riscv64-unknown-elf-gcc: 2021-08-30 22:54:52 +0200

/opt/brew/opt/riscv-gnu-toolchain/bin/riscv64-unknown-elf-gcc /private/tmp/riscv-tools-test-20210830-24311-11gdeba/hello.c

dyld: Library not loaded: /opt/brew/opt/gettext/lib/libintl.8.dylib Referenced from: /opt/brew/Cellar/riscv-gnu-toolchain/master/bin/../lib/gcc/riscv64-unknown-elf/11.1.0/../../../../riscv64-unknown-elf/bin/as Reason: image not found riscv64-unknown-elf-gcc: internal compiler error: Abort trap: 6 signal terminated program as Please submit a full bug report, with preprocessed source if appropriate. See https://gcc.gnu.org/bugs/ for instructions. Error: riscv/riscv/riscv-tools: failed An exception occurred within a child process: BuildError: Failed executing: /opt/brew/opt/riscv-gnu-toolchain/bin/riscv64-unknown-elf-gcc /private/tmp/riscv-tools-test-20210830-24311-11gdeba/hello.c /opt/brew/Library/Homebrew/formula.rb:2137:in block in system' /opt/brew/Library/Homebrew/formula.rb:2073:inopen' /opt/brew/Library/Homebrew/formula.rb:2073:in system' /opt/brew/Library/Taps/riscv/homebrew-riscv/riscv-tools.rb:26:inblock in ' /opt/brew/Library/Homebrew/formula.rb:1937:in block (3 levels) in run_test' /opt/brew/Library/Homebrew/utils.rb:550:inwith_env' /opt/brew/Library/Homebrew/formula.rb:1936:in block (2 levels) in run_test' /opt/brew/Library/Homebrew/formula.rb:918:inwith_logging' /opt/brew/Library/Homebrew/formula.rb:1935:in block in run_test' /opt/brew/Library/Homebrew/mktemp.rb:63:inblock in run' /opt/brew/Library/Homebrew/mktemp.rb:63:in chdir' /opt/brew/Library/Homebrew/mktemp.rb:63:inrun' /opt/brew/Library/Homebrew/formula.rb:2186:in mktemp' /opt/brew/Library/Homebrew/formula.rb:1929:inrun_test' /opt/brew/Library/Homebrew/test.rb:43:in block in <main>' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:93:inblock in timeout' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in block in catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:incatch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:108:intimeout' /opt/brew/Library/Homebrew/test.rb:48:in `

'

sbeamer commented 3 years ago

I might try rebuilding the tools from source (with the --build-from-source) flag. It appears you moved your brew install location, which is normally fine, but sometimes it can break bottles (pre-compiled installs).

zqy1018 commented 3 years ago

I also ran into this problem on my Apple Silicon Mac (with macOS 11.4). I guess that there is something incompatible with the ARM architecture, and thus I re-installed the toolchain with another brew(previously installed with arch -x86_64 in Rosseta 2 environment). This seems to work.