chipsalliance / homebrew-verible

Apache License 2.0
16 stars 8 forks source link

Build fails on Apple M1 macs #10

Closed poetaman closed 1 year ago

poetaman commented 3 years ago

Expected Behavior

Code should build on M1 (ARM64) macs

Actual Behavior

Build fails with errors on M1 macs (build succeeds on x86 mac)

==> Installing google/verible/verible
==> bazel build --jobs=8 --compilation_mode=opt --copt=-march=native //...
Last 15 lines from /Users/reportaman/Library/Logs/Homebrew/verible/01.bazel:
Analyzing: 1789 targets (68 packages loaded, 605 targets configured)
WARNING: Download from https://mirror.bazel.build/ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not FoundWARNING: Download from https://mirror.bazel.build/github.com/jmillikin/rules_m4/releases/download/v0.1/m4-gnulib-788db09a9f88abbef73c97e8d7291c40455336d8.tar.xz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException
GET returned 404 Not FoundWARNING: Download from https://mirror.bazel.build/ftp.gnu.org/gnu/bison/bison-3.3.2.tar.xz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not FoundWARNING: Download from https://mirror.bazel.build/github.com/jmillikin/rules_bison/releases/download/v0.1/bison-gnulib-788db09a9f88abbef73c97e8d7291c40455336d8.tar.xz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpExce
ption GET returned 404 Not FoundWARNING: Download from https://mirror.bazel.build/github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not FoundAnalyzing: 1789 targets (75 packages loaded, 607 targets configured)
ERROR: /private/tmp/verible-20210524-4463-1xwgue4/.brew_home/_bazel/91a8a79b286e633105eb5e6515121504/external/bazel_tools/tools/cpp/BUILD:469:14: Target '@bazel_tools//tools/cpp:compiler' depends on toolchain '@local_config_cc//:cc-compiler-darwin_arm64', which cannot be found: no such target '@local_config_cc//:cc-compiler-darwin_arm64': target 'cc-compiler-darwin_arm64' not declared in package '' defined by /private/tmp/verible-20210524-4463-1xwgue4/.brew_home/_bazel/91a8a79b286e633105eb5e6515121504/external/local_config_cc/BUILD'
ERROR: While resolving configuration keys for @com_google_protobuf//:protoc: Analysis failed
ERROR: While resolving toolchains for target @com_google_protobuf//:protoc: Analysis failed
ERROR: Analysis of target '//third_party/proto/kythe:storage_proto' failed; build aborted: Analysis failed
INFO: Elapsed time: 16.901s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (85 packages loaded, 607 targets configured)
FAILED: Build did NOT complete successfully (85 packages loaded, 607 targets configured)

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

Steps to Reproduce the Problem

brew tap google/verible
brew install verible

Specifications

hzeller commented 3 years ago

Passing on to Johan as he is working on the brew package and might know some of the things still needed in M1

poetaman commented 3 years ago

Seems like compiling it directly on machine gives the same error. Link: https://github.com/google/verible/issues/260#issuecomment-848079292.