Failing build on M1 MacBook

384 views
Skip to first unread message

Ben Rohlfs

unread,
Feb 14, 2022, 6:18:09 AM2/14/22
to Repo and Gerrit Discussion, דוד אוסטרובסקי‎
Hi,

I am trying to build Gerrit on a M1 MacBook (for the first time), and I am getting this error message for `bazelisk build gerrit`:

ERROR: /Users/brohlfs/gerrit/tools/node_tools/BUILD:9:14: While resolving toolchains for target //tools/node_tools:rollup-bin: no matching toolchains found for types @build_bazel_rules_nodejs//toolchains/node:toolchain_type

Any ideas? Is that a M1 problem or something unrelated?

-Ben

brohlfs$ java --version
openjdk 11.0.12 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)

brohlfs$ bazelisk version
Bazelisk version: v1.11.0
Build label: 5.0.0
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Jan 19 14:16:16 2022 (1642601776)
Build timestamp: 1642601776
Build timestamp as int: 1642601776

brohlfs$ npm version
{
  gerrit: '3.1.0-SNAPSHOT',
  npm: '8.5.0',
  node: '16.14.0',
  v8: '9.4.146.24-node.20',
  uv: '1.43.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '93',
  nghttp2: '1.45.1',
  napi: '8',
  llhttp: '6.0.4',
  openssl: '1.1.1m+quic',
  cldr: '40.0',
  icu: '70.1',
  tz: '2021a3',
  unicode: '14.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}

David Ostrovsky

unread,
Feb 14, 2022, 6:42:51 AM2/14/22
to Ben Rohlfs, Repo and Gerrit Discussion
Am Mo., 14. Feb. 2022 um 12:18 Uhr schrieb Ben Rohlfs <bro...@google.com>:
Hi,

I am trying to build Gerrit on a M1 MacBook (for the first time), and I am getting this error message for `bazelisk build gerrit`:

ERROR: /Users/brohlfs/gerrit/tools/node_tools/BUILD:9:14: While resolving toolchains for target //tools/node_tools:rollup-bin: no matching toolchains found for types @build_bazel_rules_nodejs//toolchains/node:toolchain_type

I don't have access to M1 MacBook, but the rules_nodejs version is hopefully outdated
I've spent the whole weekend messing around with the upgrade, see: [1], [2].

Any chance, you could cherry-pick the pending changes and give it a try, or even review
and approve ;-)

The upstream seems to support M1  MacBook: [3], but also note Alex Eagle's comment:

  Note this doesn't include updating our list of nodejs mirror download locations,
  so you'll still have to specify that manually in your node_repositories call in WORKSPACE

[1] https://gerrit-review.googlesource.com/c/gerrit/+/330240 : Bazel: Bump rules_nodejs version to 4.6.1
[2] https://gerrit-review.googlesource.com/c/gerrit/+/330241 : Bazel: Bump rules_nodejs version to 5.1.

Ben Rohlfs

unread,
Feb 14, 2022, 7:24:57 AM2/14/22
to David Ostrovsky, Repo and Gerrit Discussion
Thanks! Your change 330241 "Bump rules_nodejs version to 5.1" does the trick for my build. :-)

I have reviewed and +2ed both changes.

-Ben
Reply all
Reply to author
Forward
0 new messages