question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation via brew fails on M1 Macs

See original GitHub issue

Trying to install the latest bloop via Homebrew on a M1 MBP fails:

➜ brew install scalacenter/bloop/bloop
==> Installing bloop from scalacenter/bloop
==> Downloading https://github.com/scalacenter/bloop/releases/download/v1.4.8/ba
Already downloaded: /Users/moritz/Library/Caches/Homebrew/downloads/15b656d402cb87c13fcd6b5ed9a4fa4844dc7a8bfd053e3dd8436e081d2827d3--bash-completions
==> Downloading https://github.com/scalacenter/bloop/releases/download/v1.4.8/zs
Already downloaded: /Users/moritz/Library/Caches/Homebrew/downloads/8097faaab156e49489f66095321e47efcbf6eb834af7fb6812db66aa24445af4--zsh-completions
==> Downloading https://github.com/scalacenter/bloop/releases/download/v1.4.8/fi
Already downloaded: /Users/moritz/Library/Caches/Homebrew/downloads/0f402fb7013984ff25db8a5a4ee5a8ac7030ae895220f5a49af243352a97e603--fish-completions
==> Downloading https://github.com/scalacenter/bloop/releases/download/v1.4.8/bl
Already downloaded: /Users/moritz/Library/Caches/Homebrew/downloads/34257445775368b19ca13cd407ed295836d269ffbfdf750d1492bd60cbffeac0--bloop-coursier.json
==> coursier install --install-dir bin --default-channels=false --channel channe
Last 15 lines from /Users/moritz/Library/Logs/Homebrew/bloop/01.coursier:
Downloading https://github.com/shyiko/jabba/raw/master/index.json
Downloaded https://github.com/shyiko/jabba/raw/master/index.json
Exception in thread "main" coursier.jvm.JvmCache$JvmNotFoundInIndex: JVM graalvm:19.3 not found in index: No JVM found for OS darwin and CPU architecture arm64
	at coursier.jvm.JvmCache.$anonfun$getIfInstalled$2(JvmCache.scala:101)
	at coursier.jvm.JvmCache.$anonfun$getIfInstalled$2$adapted(JvmCache.scala:100)
	at coursier.util.Task$.$anonfun$flatMap$extension$1(Task.scala:14)
	at coursier.util.Task$.$anonfun$flatMap$extension$1$adapted(Task.scala:14)
	at coursier.util.Task$.wrap(Task.scala:84)
	at coursier.util.Task$.$anonfun$flatMap$2(Task.scala:14)
	at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:831)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
rosysaltcommented, Jun 15, 2022

I was able to install bloop a couple of days ago on Apple M1 chip. Below are the steps, in case it’s helpful for someone:

  1. Install GraalVM CE 22.2.0-dev build
  2. Install bloop with Coursier

Step 1: Install GraalVM CE 22.2.0-dev build

Graal introduced a support for Apple M1 in version 22.2. As of today, that version is still in the dev status. Hence I downloaded that version from the graalvm latest dev releases

I downloaded graalvm-ce-java11-darwin-aarch64-dev.tar.gz, but I think java17 should work as well.

Then follow the Installation on macOS Platforms

After that, I should see:

 >> java -version
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment GraalVM CE 22.2.0-dev (build 11.0.16+5-jvmci-22.2-b03)
OpenJDK 64-Bit Server VM GraalVM CE 22.2.0-dev (build 11.0.16+5-jvmci-22.2-b03, mixed mode)

Step 2: Install bloop

cs install bloop

And then I have this:

 >> bloop about
bloop v1.5.0-18-003e6c7b

Using Scala v2.12.15 and Zinc v1.6.0
Running on Java JDK v11.0.16 (/Library/Java/JavaVirtualMachines/graalvm-ce-java11-22.2.0-dev/Contents/Home)
  -> Supports debugging user code, Java Debug Interface (JDI) is available.
Maintained by the Scala Center and the community.
1reaction
arixmkiicommented, May 5, 2022

And update on another issue, that JDK can’t be located in index. It is because for 22.1.0 default graalvm tag is not populated, only these are available in index:

      "jdk@graalvm-java11": {
        "22.1.0": "tgz+https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.1.0/graalvm-ce-java11-darwin-aarch64-22.1.0.tar.gz"
      },
      "jdk@graalvm-java17": {
        "22.1.0": "tgz+https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.1.0/graalvm-ce-java17-darwin-aarch64-22.1.0.tar.gz"
      },

And here is coursier issue, that states, that currently tag is hardcoded https://github.com/coursier/coursier/issues/1789#issuecomment-658185317

So, I needed a workaround of my own index.json with content:

{
  "darwin": {
    "arm64": {
      "jdk@graalvm": {
        "22.1.0": "tgz+https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.1.0/graalvm-ce-java17-darwin-aarch64-22.1.0.tar.gz"
      }
    }
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install homebrew on M1 mac - Stack Overflow
Homebrew installation on apple silicon, step by step: Open a terminal window (it should be zsh); Run this command:.
Read more >
not able to install homebrew on m1 MacBook #668 - GitHub
Just run sudo rm -rf /opt/homebrew and then run 2step's command to perform installation again. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ ...
Read more >
Using Homebrew on M1 Mac - Earthly Blog
Homebrew made some changes to where it installs packages if you are running it on a new M1 Mac, and these changes may...
Read more >
How to install Homebrew in macOS Catalina or M1 Mac
How to install Homebrew on macOS Catalina or M1 Mac · Open Terminal and enter this command xcode-select --install · Click Install from...
Read more >
Issues Installing Homebrew on New Macbook M1 Silicon ...
Issues Installing Homebrew on New Macbook M1 Silicon? ... Error messages in terminal ... Check the box to Open using Rosetta.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found