JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.33k stars 1.11k forks source link

Compiling compose desktop project in fedora docker failes #2110

Open Hero9909 opened 2 years ago

Hero9909 commented 2 years ago

Issues

when compiling a Gradle project with compose-gradle-plugin:1.1.1 the packageRpm task is not able to determine the needed modules

Steps to reproduce

create a docker image or install needed packages manual in a fedora:36 base. dnf install java-latest-openjdk-devel binutils fakeroot clone or receive the source code of the project. run build via ./gradlew :packageRpm

expectation

seamless build producing an rpm

actual behavior

build fails at task :packageRpm throwing External tool execution failed

additional notes

I've verified the procedure by hand and checked with java-17 and java-18 / java-latest

``` > External tool execution failed: * Command: [/usr/lib/jvm/java-18-openjdk-18.0.1.0.10-1.rolling.fc36.x86_64/bin/jlink, @/evoCalc/app/build/compose/tmp/createRuntimeImage.args.txt] * Working dir: [] * Exit code: 2 * Standard output log: /project/app/build/compose/logs/createRuntimeImage/jlink-2022-06-11-18-17-29-out.txt * Error log: /project/app/build/compose/logs/createRuntimeImage/jlink-2022-06-11-18-17-29-err.txt ``` /project/app/build/compose/logs/createRuntimeImage/jlink-2022-06-11-18-17-29-out.txt ``` Error: --module-path is not specified and this runtime image does not contain jmods directory. Usage: jlink --module-path --add-modules [,...] Use --help for a list of possible options ```
ThalusA commented 1 year ago

I have the exact same problem

dzirbel commented 8 months ago

I had the same problem on Linux Mint 21.2; installing RPM build tools fixed it: sudo apt install rpm for Ubuntu/Linux Mint. However, the documentation and error message here could be greatly improved to indicate that there are missing dependencies on the machine.

For reference, the error message that I'm getting without rpm installed is

Execution failed for task ':packageReleaseRpm'.
> External tool execution failed:
  * Command: [/home/dzirbel/.jdks/temurin-18.0.2.1/bin/jpackage, @/home/dzirbel/workspace/compose-playground/build/compose/tmp/packageReleaseRpm.args.txt]
  * Working dir: []
  * Exit code: 1
  * Standard output log: /home/dzirbel/workspace/compose-playground/build/compose/logs/packageReleaseRpm/jpackage-2023-10-11-13-55-47-out.txt
  * Error log: /home/dzirbel/workspace/compose-playground/build/compose/logs/packageReleaseRpm/jpackage-2023-10-11-13-55-47-err.txt
  *

where the -out logfile is empty and the -err one contains only Error: Invalid or unsupported type: [rpm].