riscv-software-src / homebrew-riscv

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

Brew install riscv-tools failed on MacOS 11.5.1-arm64 #73

Closed mercurially closed 2 years ago

mercurially commented 3 years ago

==> sed -i .bak s/.=host-darwin.o$// riscv-gcc/gcc/config.host ==> sed -i .bak s/. x-darwin.$// riscv-gcc/gcc/config.host ==> ./configure --prefix=/opt/homebrew/Cellar/riscv-gnu-toolchain/master --with- ==> make Last 15 lines from /Users/zhangqiulei/Library/Logs/Homebrew/riscv-gnu-toolchain/04.make: installing /private/tmp/riscv-gnu-toolchain-20211007-39509-1h96yof/riscv-gdb/opcodes/po/vi.gmo as /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/locale/vi/LC_MESSAGES/opcodes.mo install: /private/tmp/riscv-gnu-toolchain-20211007-39509-1h96yof/riscv-gdb/opcodes/po/zh_CN.gmo: No such file or directory installing /private/tmp/riscv-gnu-toolchain-20211007-39509-1h96yof/riscv-gdb/opcodes/po/zh_CN.gmo as /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/locale/zh_CN/LC_MESSAGES/opcodes.mo if test "opcodes" = "gettext"; then \ if test -r /private/tmp/riscv-gnu-toolchain-20211007-39509-1h96yof/riscv-gdb/opcodes/../mkinstalldirs; then \ /private/tmp/riscv-gnu-toolchain-20211007-39509-1h96yof/riscv-gdb/opcodes/../mkinstalldirs /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gettext/po; \ else \ /private/tmp/riscv-gnu-toolchain-20211007-39509-1h96yof/riscv-gdb/opcodes/mkinstalldirs /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gettext/po; \ fi; \ /usr/bin/install -c -m 644 /private/tmp/riscv-gnu-toolchain-20211007-39509-1h96yof/riscv-gdb/opcodes/po/Makefile.in.in \ /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gettext/po/Makefile.in.in; \ else \ : ; \ fi mkdir -p stamps/ && touch stamps/build-gdb-newlib

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

Traceback (most recent call last): 25: from /opt/homebrew/Library/Homebrew/build.rb:229:in <main>' 24: from /opt/homebrew/Library/Homebrew/build.rb:133:ininstall' 23: from /opt/homebrew/Library/Homebrew/utils.rb:550:in with_env' 22: from /opt/homebrew/Library/Homebrew/build.rb:138:inblock in install' 21: from /opt/homebrew/Library/Homebrew/formula.rb:1275:in brew' 20: from /opt/homebrew/Library/Homebrew/formula.rb:2434:instage' 19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in stage' 18: from /opt/homebrew/Library/Homebrew/resource.rb:91:instage' 17: from /opt/homebrew/Library/Homebrew/resource.rb:116:in unpack' 16: from /opt/homebrew/Library/Homebrew/resource.rb:199:inmktemp' 15: from /opt/homebrew/Library/Homebrew/mktemp.rb:63:in run' 14: from /opt/homebrew/Library/Homebrew/mktemp.rb:63:inchdir' 13: from /opt/homebrew/Library/Homebrew/mktemp.rb:63:in block in run' 12: from /opt/homebrew/Library/Homebrew/resource.rb:117:inblock in unpack' 11: from /opt/homebrew/Library/Homebrew/download_strategy.rb:102:in stage' 10: from /opt/homebrew/Library/Homebrew/download_strategy.rb:110:inchdir' 9: from /opt/homebrew/Library/Homebrew/resource.rb:121:in block (2 levels) in unpack' 8: from /opt/homebrew/Library/Homebrew/formula.rb:2454:inblock in stage' 7: from /opt/homebrew/Library/Homebrew/utils.rb:550:in with_env' 6: from /opt/homebrew/Library/Homebrew/formula.rb:2455:inblock (2 levels) in stage' 5: from /opt/homebrew/Library/Homebrew/formula.rb:1282:in block in brew' 4: from /opt/homebrew/Library/Homebrew/build.rb:178:inblock (2 levels) in install' 3: from /opt/homebrew/Library/Taps/riscv/homebrew-riscv/riscv-gnu-toolchain.rb:41:in install' 2: from /opt/homebrew/Library/Homebrew/formula.rb:2225:insystem' 1: from /opt/homebrew/Library/Homebrew/formula.rb:2225:in open' /opt/homebrew/Library/Homebrew/formula.rb:2289:inblock in system': Failed executing: make (BuildError) 9: from /opt/homebrew/Library/Homebrew/brew.rb:162:in <main>' 8: from /opt/homebrew/Library/Homebrew/brew.rb:174:inrescue in

' 7: from /opt/homebrew/Library/Homebrew/exceptions.rb:509:in dump' 6: from /opt/homebrew/Library/Homebrew/exceptions.rb:455:inissues' 5: from /opt/homebrew/Library/Homebrew/exceptions.rb:459:in fetch_issues' 4: from /opt/homebrew/Library/Homebrew/utils/github.rb:61:inissues_for_formula' 3: from /opt/homebrew/Library/Homebrew/utils/github.rb:30:in search_issues' 2: from /opt/homebrew/Library/Homebrew/utils/github.rb:160:insearch' 1: from /opt/homebrew/Library/Homebrew/utils/github/api.rb:234:in open_rest' /opt/homebrew/Library/Homebrew/utils/github/api.rb:304:inraise_error': Validation Failed: [{"message"=>"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.", "resource"=>"Search", "field"=>"q", "code"=>"invalid"}] (GitHub::API::ValidationFailedError)

abrasumente233 commented 3 years ago

I just ran into the exact problem as you described.

Try clear the homebrew cache, then make sure you have a good internet connection to run homebrew install riscv-tools smoothly, without interrupting it when cloning some git repos.

The whole error report is just misleading, and took me so long to figure out. I guess the bottom half is homebrew failing to load its bug reporter thing. And the actual make log is only showing the last 15 lines, which is totally irrelevant to the issue.

The file you really want to check out is ~/Library/Logs/Homebrew/riscv-gnu-toolchain/04.make. I skimmed over and find it cannot find configure file in riscv-binutils folder, which is empty when I lsed it. It could be that I had accidentally cut off the git clone process when installing, because of my crappy Internet.

It could be other issues though, but make sure to check out the full make log.

irmathebest commented 2 years ago

I have exactly the same problem but have not solve it. @abrasumente233 Could you plz tell me how can I check the make log? It seems to be pretty long. Thank you! @mercurially Have you solved this problem?

abrasumente233 commented 2 years ago

I have exactly the same problem but have not solve it. @abrasumente233 Could you plz tell me how can I check the make log? It seems to be pretty long. Thank you! @mercurially Have you solved this problem?

Search for "error" or something like that in the log? Or you can post an attachment here, I can try to take a look.

irmathebest commented 2 years ago

I have exactly the same problem but have not solve it. @abrasumente233 Could you plz tell me how can I check the make log? It seems to be pretty long. Thank you! @mercurially Have you solved this problem?

Search for "error" or something like that in the log? Or you can post an attachment here, I can try to take a look.

I have not see anything related to "error" in the 04.make file . Here is the error in the terminal, also do you need the 04.make file? Thank you again and happy holiday!

if test "opcodes" = "gettext"; then \ if test -r /private/tmp/riscv-gnu-toolchain-20211225-51255-y9uiwg/riscv-gdb/opcodes/../mkinstalldirs; then \ /private/tmp/riscv-gnu-toolchain-20211225-51255-y9uiwg/riscv-gdb/opcodes/../mkinstalldirs /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gettext/po; \ else \ /private/tmp/riscv-gnu-toolchain-20211225-51255-y9uiwg/riscv-gdb/opcodes/mkinstalldirs /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gettext/po; \ fi; \ /usr/bin/install -c -m 644 /private/tmp/riscv-gnu-toolchain-20211225-51255-y9uiwg/riscv-gdb/opcodes/po/Makefile.in.in \ /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gettext/po/Makefile.in.in; \ else \ : ; \ fi mkdir /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gdb/python/gdb/command mkdir /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gdb/python/gdb/function mkdir /opt/homebrew/Cellar/riscv-gnu-toolchain/master/share/gdb/python/gdb/printer mkdir -p stamps/ && touch stamps/build-gdb-newlib

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

/opt/homebrew/Library/Homebrew/utils/github/api.rb:304:in raise_error': Validation Failed: [{"message"=>"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.", "resource"=>"Search", "field"=>"q", "code"=>"invalid"}] (GitHub::API::ValidationFailedError) from /opt/homebrew/Library/Homebrew/utils/github/api.rb:234:inopen_rest' from /opt/homebrew/Library/Homebrew/utils/github.rb:166:in search' from /opt/homebrew/Library/Homebrew/utils/github.rb:34:insearch_issues' from /opt/homebrew/Library/Homebrew/utils/github.rb:67:in issues_for_formula' from /opt/homebrew/Library/Homebrew/exceptions.rb:491:infetch_issues' from /opt/homebrew/Library/Homebrew/exceptions.rb:487:in issues' from /opt/homebrew/Library/Homebrew/exceptions.rb:541:indump' from /opt/homebrew/Library/Homebrew/brew.rb:155:in rescue in <main>' from /opt/homebrew/Library/Homebrew/brew.rb:143:in

' /opt/homebrew/Library/Homebrew/formula.rb:2307:in block in system': Failed executing: make (BuildError) from /opt/homebrew/Library/Homebrew/formula.rb:2243:inopen' from /opt/homebrew/Library/Homebrew/formula.rb:2243:in system' from /opt/homebrew/Library/Taps/riscv/homebrew-riscv/riscv-gnu-toolchain.rb:40:ininstall' from /opt/homebrew/Library/Homebrew/build.rb:172:in block (3 levels) in install' from /opt/homebrew/Library/Homebrew/utils.rb:588:inwith_env' from /opt/homebrew/Library/Homebrew/build.rb:134:in block (2 levels) in install' from /opt/homebrew/Library/Homebrew/formula.rb:1297:inblock in brew' from /opt/homebrew/Library/Homebrew/formula.rb:2473:in block (2 levels) in stage' from /opt/homebrew/Library/Homebrew/utils.rb:588:inwith_env' from /opt/homebrew/Library/Homebrew/formula.rb:2472:in block in stage' from /opt/homebrew/Library/Homebrew/resource.rb:126:inblock (2 levels) in unpack' from /opt/homebrew/Library/Homebrew/download_strategy.rb:110:in chdir' from /opt/homebrew/Library/Homebrew/download_strategy.rb:102:instage' from /opt/homebrew/Library/Homebrew/resource.rb:122:in block in unpack' from /opt/homebrew/Library/Homebrew/mktemp.rb:63:inblock in run' from /opt/homebrew/Library/Homebrew/mktemp.rb:63:in chdir' from /opt/homebrew/Library/Homebrew/mktemp.rb:63:inrun' from /opt/homebrew/Library/Homebrew/resource.rb:208:in mktemp' from /opt/homebrew/Library/Homebrew/resource.rb:121:inunpack' from /opt/homebrew/Library/Homebrew/resource.rb:96:in stage' from /opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/lib/ruby/2.6.0/forwardable.rb:230:instage' from /opt/homebrew/Library/Homebrew/formula.rb:2452:in stage' from /opt/homebrew/Library/Homebrew/formula.rb:1290:inbrew' from /opt/homebrew/Library/Homebrew/build.rb:129:in block in install' from /opt/homebrew/Library/Homebrew/utils.rb:588:inwith_env' from /opt/homebrew/Library/Homebrew/build.rb:124:in install' from /opt/homebrew/Library/Homebrew/build.rb:224:in
'

abrasumente233 commented 2 years ago

@irmathebest Happy holiday to you too! The error from the terminal looks harmless, can you please post the 04.make file?

irmathebest commented 2 years ago

@irmathebest Happy holiday to you too! The error from the terminal looks harmless, can you please post the 04.make file?

Sure! I'd love to. Thanks again! Seems like it does not allow this file type. I may paste it into a docx file then. Hopefully it is not too long lolllll 04make.docx

abrasumente233 commented 2 years ago

@irmathebest

/bin/sh: /private/tmp/riscv-gnu-toolchain-20211225-6105-11l1rrj/riscv-binutils/configure: No such file or directory make: *** [stamps/build-binutils-newlib] Error 127

This seems to be the same problem I was having. Because git failed to clone binutils repo, can you run brew cleanup and install again? Make sure it doesn't get interrupted along the process, especially when git is cloning!

irmathebest commented 2 years ago

@irmathebest

/bin/sh: /private/tmp/riscv-gnu-toolchain-20211225-6105-11l1rrj/riscv-binutils/configure: No such file or directory make: *** [stamps/build-binutils-newlib] Error 127

This seems to be the same problem I was having. Because git failed to clone binutils repo, can you run brew cleanup and install again? Make sure it doesn't get interrupted along the process, especially when git is cloning!

Thank you so much! I used to brew cleanup and reinstall but it still happens. Do you think I can clone binutils manually? Also, how to make sure whether the process is not interrupted? Saying, I can not use my laptop anymore but just wait for it again?

abrasumente233 commented 2 years ago

You can manually clone binutils if you know where does brew cache thses repos, but sorry I don't remember exactly where. Oh you can use the laptop when installing šŸ˜‚, just don't Ctrl+C the brew install, and I guess it would be fine.

irmathebest commented 2 years ago

You can manually clone binutils if you know where does brew cache thses repos, but sorry I don't remember exactly where. Oh you can use the laptop when installing šŸ˜‚, just don't Ctrl+C the brew install, and I guess it would be fine.

lolllll Got it. Thanks again. I did not ctrl+c brew install but I've done it several times , it still does not work, may be I need to manually find the brew cache.

dyslexicat commented 2 years ago

brew --cache should give you the path to your cache. After that you can go into the riscv-gnu-toolchain--git folder and remove the riscv-binutils and run brew install again.

rewired-gh commented 2 years ago

Also failed on macOS 12.3.1.

PrettyMeng commented 2 years ago

I solve this problem by manually removing the riscv-gnu-toolchain--git folder and re-install by brew install riscv-tools. Hope this helps!

tim-sheung commented 2 years ago

I solve this problem by manually removing the riscv-gnu-toolchain--git folder and re-install by brew install riscv-tools. Hope this helps!

This works for me too!

apepkuss commented 2 years ago

I solve this problem by manually removing the riscv-gnu-toolchain--git folder and re-install by brew install riscv-tools. Hope this helps!

This works for me too!