intellij-platform-gradle-plugin
intellij-platform-gradle-plugin copied to clipboard
Gradle won't download JBR JCEF
Describe the bug The task buildSearchableOptions fails when a plugin is build inside a docker container with the same error as the other issue https://github.com/JetBrains/gradle-intellij-plugin/issues/1210
To Reproduce I created a repository with the minimum configuration to reproduce the error https://github.com/udelledo/idea-plugin-docker-error The build fails with both the plugin version 1.13.3, and 1.15.0, when executed inside the container, but it works well when it's executed on the host OS
Expected behavior Expect that the build complete successfully in the docker container as it does on the host os
Environment:
- OS: host OS Oracle linux 8, build host docker image based on openjdk:17-alpine
- Gradle IntelliJ Plugin Version 1.13.3 (default used when creating a new idea plugin), and 1.15.0
- Gradle Version 8.1.1
I'm pretty sure it's because your docker container uses alpine which uses musl rather than glibc so it also uses different linker settings.
You basically have the same problem as I have on Guix (ld.so
cannot be found). Basically everyone that doesn't use the correct version of whatever Linux distribution the JBR that is shipped with IntelliJ was built with will have the same problem.
Try changing openjdk:17-alpine
to openjdk:17
in your docker run
command line.
I'm not saying that's the right fix, but it should work around the problem.
The right fix is to include JBR
in the alpine distribution as a regular apk package and then use that. But that also needs a change in gradle-intellij-plugin, see https://github.com/JetBrains/gradle-intellij-plugin/issues/1437 . Otherwise, it won't use it even when its there.
@JetBrains: I know it's annoying to have to package JBR and include it in Linux distributions, but in my opinion a Java VM is lowlevel and expansive enough that it HAS to be part of the operating system. Otherwise whatever small thing the operating system changes makes your Java VM break, and that's more annoying. On the other hand, from personal experience, with JBR in the operating system and the issue 1437 fixed, IntelliJ IDEA works great!
Edit: Just tried changing openjdk:17-alpine
to openjdk:17
in your example and that made it work.
I'm also pretty sure if IDEA did download JBR JCEF, the resulting VM won't start either. So that wouldn't have helped.
@daym thanks for the tip, that fixed my issue. I hadn't thought about it because it was working some time ago