You are not logged in.

#1 2021-10-16 09:23:25

leonavis
Member
From: Bremen, Germany
Registered: 2021-06-27
Posts: 71

[SOLVED] Compilation of java-program failed

Hello,

I did try to install logism-evolution-git from the AUR and apparantly it compiles in Java. I get this error

==> Starting build()...
Downloading https://services.gradle.org/distributions/gradle-7.0.2-bin.zip
..........10%...........20%...........30%..........40%...........50%...........60%..........70%...........80%...........90%..........100%

Welcome to Gradle 7.0.2!

Here are the highlights of this release:
 - File system watching enabled by default
 - Support for running with and building Java 16 projects
 - Native support for Apple Silicon processors
 - Dependency catalog feature preview

For more details see https://docs.gradle.org/7.0.2/release-notes.html

To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.0.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that /usr/lib/jvm/java-8-openjdk/jre contains a valid JDK installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 37s
2 actionable tasks: 2 executed
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: logisim-evolution-git

So I checked and this is what's installed

 ✘  ~  pacman -Ss jdk
...
extra/jdk-openjdk 17.u35-1 [installed]
    OpenJDK Java 17 development kit
...
extra/jre-openjdk 17.u35-1 [installed]
    OpenJDK Java 17 full runtime environment
extra/jre-openjdk-headless 17.u35-1 [installed]
    OpenJDK Java 17 headless runtime environment
...
extra/jre8-openjdk 8.u292-1 [installed]
    OpenJDK Java 8 full runtime environment
extra/jre8-openjdk-headless 8.u292-1 [installed]
...
 ~  pacman -Ss java-enviroment
 ✘  ~  pacman -Ss java-enviroment-common
 ✘  ~  pacman -Ss java-environment-common
extra/java-environment-common 3-3 [installed]
    Common files for Java Development Kits
 ~  pacman -Ss java-runtime-common    
extra/java-runtime-common 3-3 [installed]
    Common files for Java Runtime Environments

I put it in the Noobie Corner because it might stem from an AUR-installation (with yay, btw), but I do believe the problem itself has something to do with my (maybe bad?) openjdk-installation, since it's just the Java-compliation that fails (by now). It's strange that it uses the v8, which I do believe is only on board because Arduino pulled it.

Last edited by leonavis (2021-10-16 10:24:39)

Offline

#2 2021-10-16 10:11:06

Daerandin
Member
From: Norway
Registered: 2013-05-07
Posts: 268
Website

Re: [SOLVED] Compilation of java-program failed

I'm assuming you mean logisim-evolution-git. I have no experience with said package as I've never used it. But if you look at the aur page for this package then it has not been updated in over 2 years, and there is a comment claiming that the build system has changed. If that is the case, then it is highly likely that the current PKGBUILD for this package is broken. I would suggest the logisim-evolution package, which seems to be actively maintained.

If you absolutely want to use the unmaintained git package, it might be required to use a newer java version. There is a very good Arch Wiki page describing how to set the java version for your system.

In any case, you should always include full output, not just parts of it. yay is also not doing you any favors if you don't understand the manual build process with makepkg.

EDIT: The comment on the git package is newer than the last update of the package, so it was most likely fixed to match the new build system. Ensuring that your default java version is set to the newest one might be the most likely solution.

Last edited by Daerandin (2021-10-16 10:19:42)

Online

#3 2021-10-16 10:14:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,467

Re: [SOLVED] Compilation of java-program failed

What's your default java set to?

archlinux-java status

Offline

#4 2021-10-16 10:24:26

leonavis
Member
From: Bremen, Germany
Registered: 2021-06-27
Posts: 71

Re: [SOLVED] Compilation of java-program failed

Thank you friends! Both your replies were very helpful. I now installed the logisim-evolution-package instead of the git.

What's your default java set to?

It was on 8, I changed it to 17, then the package did get build some, but not much further (other errors started to emerge), so I tried, as advised above, the non-git package, which works like a charm.

Offline

Board footer

Powered by FluxBB