graalvm / native-build-tools

Native-image plugins for various build tools
https://graalvm.github.io/native-build-tools/
Other
371 stars 61 forks source link

compile-no-fork failed: Version to check #644

Open koutheir opened 4 days ago

koutheir commented 4 days ago

Building a native image fails with the following error. Can you please provide a way to opt out of this version check?

$ mvn -Pnative package
...
[ERROR] Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.10.3:compile-no-fork (build-native) on project spring-boot-initial: Execution build-native of goal org.graalvm.buildtools:native-maven-plugin:0.10.3:compile-no-fork failed: Version to check 'native-image 23.0.1 2024-10-15
[ERROR] Java(TM) SE Runtime Environment MicroDoc GraalVM Embedded 23.0.1+11.1 (build 23.0.1+11-microdoc-p111200-t20241029n1-evaluation-linux-amd64-le-gcc11.2-gnu-glibc-jvmci-b01)
[ERROR] Java HotSpot(TM) 64-Bit Server VM MicroDoc GraalVM Embedded 23.0.1+11.1 (build 23.0.1+11-microdoc-p111200-t20241029n1-evaluation-linux-amd64-le-gcc11.2-gnu-glibc-jvmci-b01, mixed mode)' can't be parsed.

And for reference, here is the version reported by our native-image:

$ $JAVA_HOME/bin/native-image --version
native-image 23.0.1 2024-10-15
Java(TM) SE Runtime Environment MicroDoc GraalVM Embedded 23.0.1+11.1 (build 23.0.1+11-microdoc-p111200-t20241029n1-evaluation-linux-amd64-le-gcc11.2-gnu-glibc-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM MicroDoc GraalVM Embedded 23.0.1+11.1 (build 23.0.1+11-microdoc-p111200-t20241029n1-evaluation-linux-amd64-le-gcc11.2-gnu-glibc-jvmci-b01, mixed mode)

And here is an excerpt of pom.xml:

...
<profiles>
    <profile>
        <id>native</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.graalvm.buildtools</groupId>
                    <artifactId>native-maven-plugin</artifactId>
                    <version>0.10.3</version>
                    <executions>
                        <execution>
                            <id>build-native</id>
                            <goals>
                                <goal>compile-no-fork</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

System Info