-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building native image on Windows 11 - mvn failure #234
Comments
I have tried using
The odd thing is that it is complaining about |
After I have disabled the entire <!-- <classpath>-->
<!-- ${project.build.directory}${file.separator}${project.build.finalName}.jar${path.separator}${settings.localRepository}${file.separator}oracle${file.separator}dbtools${file.separator}dbtools-common${file.separator}${sqlcl.version}${file.separator}dbtools-common-${sqlcl.version}.jar${path.separator}${settings.localRepository}${file.separator}org${file.separator}reflections${file.separator}reflections${file.separator}${reflections.version}${file.separator}reflections-${reflections.version}.jar${path.separator}${settings.localRepository}${file.separator}org${file.separator}javassist${file.separator}javassist${file.separator}${javassist.version}${file.separator}javassist-${javassist.version}.jar${path.separator}${settings.localRepository}${file.separator}org${file.separator}slf4j${file.separator}slf4j-api${file.separator}${slf4j.version}${file.separator}slf4j-api-${slf4j.version}.jar${path.separator}${settings.localRepository}${file.separator}org${file.separator}slf4j${file.separator}slf4j-jdk14${file.separator}${slf4j.version}${file.separator}slf4j-jdk14-${slf4j.version}.jar${path.separator}${settings.localRepository}${file.separator}org${file.separator}graalvm${file.separator}js${file.separator}js-scriptengine${file.separator}${graalvm.version}${file.separator}js-scriptengine-${graalvm.version}.jar-->
<!-- </classpath>--> |
|
Well, that was not so good either.
I must say I'm walking quite blind here as I'm totally inexperienced in this topic. If you would have some time to help me out - it would be great. |
It works on macOS. I cannot test it on Windows at the moment, but I suspect, that this line is as you suspected platform specific.
and try again? It should be possible to make the POM truly platform independent. Thx. |
Unfortunately that doesn't work :/
|
Ok. Thanks. I have to setup an environment to reproduce this myself. It looks like the colon in the drive letter is now the problem. |
As a workaround can comment out the classpath argument as follows: <execution>
<id>build-native</id>
<goals>
<goal>build</goal>
</goals>
<phase>package</phase>
<!-- Override classpath to ensure js is not added to the classpath.
This reduces resuting image size by 24 MB (162 MB instead of 186 MB). -->
<configuration>
<!--classpath>
${project.build.directory}/${project.build.finalName}.jar:${settings.localRepository}/oracle/dbtools/dbtools-common/${sqlcl.version}/dbtools-common-${sqlcl.version}.jar:${settings.localRepository}/org/reflections/reflections/${reflections.version}/reflections-${reflections.version}.jar:${settings.localRepository}/org/javassist/javassist/${javassist.version}/javassist-${javassist.version}.jar:${settings.localRepository}/org/slf4j/slf4j-api/${slf4j.version}/slf4j-api-${slf4j.version}.jar:${settings.localRepository}/org/slf4j/slf4j-jdk14/${slf4j.version}/slf4j-jdk14-${slf4j.version}.jar:${settings.localRepository}/org/graalvm/js/js-scriptengine/${graalvm.version}/js-scriptengine-${graalvm.version}.jar
</classpath-->
<buildArgs combine.children="append">
<!-- including all charsets works for build-native only!?! -->
<buildArg>-H:+AddAllCharsets</buildArg>
</buildArgs>
</configuration>
</execution>
</executions> As mentioned in the comment the classpath just leads to a smaller native executable. |
Looks like comma (
|
This is really strange. |
Interesting. I tried to use Does it work now on Windows 11 as well? |
No.
|
I was building in VS 2022 v17.3.0 command prompt.
|
Seems that copy & paste of formatter.js file from
|
And it actually formats.
The start-up speed is amazing! Not it can be used as a pre-commit hook actually. |
@PhilippSalvisberg If not, is there anything I can/should do to make native image work with UTF-8 files on Windows? |
https://github.com/Trivadis/plsql-formatter-settings/blob/sqlcl-22.2.1/standalone/src/main/resources/format.js is a symbolic link. Should work under Windows. But not per default. See https://github.com/git-for-windows/git/wiki/Symbolic-Links for more information. I've run
Yes. It should work out-of-the box. |
Hi @PhilippSalvisberg
I have followed your instructions for building native image but when running it on Windows 11 platform I face some issues,
I run the command from windows CMD.
See the clean_package.log file for full log.
The error is:
It could be due to a mix of windows style
\
and linux/mac style/
path delimiters in the path as mentioned hereDo you have any suggestion on how to solve this?
The text was updated successfully, but these errors were encountered: