Compile Errors in OpenJDK 11 with Non-English Characters in Compilation Path
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Thu Nov 23 14:30:30 UTC 2023
Congratulations! You get to test drive the recently updated build
instructions for Windows locale requirements! :-)
Please see
https://github.com/openjdk/jdk/blob/master/doc/building.md#locale-requirements
In particular, I believe you need to set your system locale.
Please report back if that solves the problem or not.
/Magnus
On 2023-11-23 03:51, last last wrote:
> Hi all,
>
> I tried to build a OpenJDK11 fastdebug with paths that include Chinese
> characters,my build path is "/home/kylin/图片/jdk11u-dev",but i saw some
> error as followings:
>
> Exception in thread "main" java.nio.file.InvalidPathException:
> Malformed input or input contains unmappable characters:
> /home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.tmp
> at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)
> at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
> at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
> at java.base/java.nio.file.Path.of(Path.java:147)
> at java.base/java.nio.file.Paths.get(Paths.java:69)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
> make[3]: *** [ToolsLangtools.gmk:40:
> /home/kylin/图片/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch]
> Error 1
> make[2]: *** [make/Main.gmk:73: buildtools-langtools] Error 2
> make[2]: *** Waiting for unfinished jobs....
> Exception in thread "main" java.nio.file.InvalidPathException:
> Malformed input or input contains unmappable characters:
> /home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch.tmp
> at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)
> at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
> at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
> at java.base/java.nio.file.Path.of(Path.java:147)
> at java.base/java.nio.file.Paths.get(Paths.java:69)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
> make[3]: *** [gensrc/GensrcJvmti.gmk:45:
> /home/kylin/图片/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch]
> Error 1
> make[3]: *** Waiting for unfinished jobs....
> Exception in thread "main" java.nio.file.InvalidPathException:
> Malformed input or input contains unmappable characters:
> /home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch.tmp
> at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)
> at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
> at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
> at java.base/java.nio.file.Path.of(Path.java:147)
> at java.base/java.nio.file.Paths.get(Paths.java:69)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
> make[3]: *** [gensrc/GensrcJfr.gmk:43:
> /home/kylin/图片/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch]
> Error 1
> make[2]: *** [make/Main.gmk:265: hotspot-server-gensrc] Error 2
>
> ERROR: Build failed for target 'images' in configuration
> 'linux-aarch64-normal-server-fastdebug' (exit code 2)
>
> === Output from failing command(s) repeated here ===
> * For target
> buildtools_langtools_tools_classes__the.BUILD_TOOLS_LANGTOOLS_batch:
> Exception in thread "main" java.nio.file.InvalidPathException:
> Malformed input or input contains unmappable characters:
> /home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.tmp
> at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)
> at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
> at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
> at java.base/java.nio.file.Path.of(Path.java:147)
> at java.base/java.nio.file.Paths.get(Paths.java:69)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
> * For target
> hotspot_variant-server_buildtools_tools_classes__the.BUILD_JFR_TOOLS_batch:
> Exception in thread "main" java.nio.file.InvalidPathException:
> Malformed input or input contains unmappable characters:
> /home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch.tmp
> at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)
> at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
> at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
> at java.base/java.nio.file.Path.of(Path.java:147)
> at java.base/java.nio.file.Paths.get(Paths.java:69)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
> * For target
> hotspot_variant-server_tools_jvmti__the.BUILD_JVMTI_TOOLS_batch:
> Exception in thread "main" java.nio.file.InvalidPathException:
> Malformed input or input contains unmappable characters:
> /home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch.tmp
> at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)
> at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
> at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
> at java.base/java.nio.file.Path.of(Path.java:147)
> at java.base/java.nio.file.Paths.get(Paths.java:69)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)
> at
> jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
>
> * All command lines available in
> /home/kylin/图片/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/make-support/failure-logs.
>
> ----------
> This error only arises when the compilation path contains Chinese
> characters. There is no such problem with the compilation path in
> English. The testing environment is Ubuntu 20.04.
> I also tested having the compilation path include German and French
> characters, and encountered the same compilation issues.
>
> Is this considered an issue? If it is, can it be added to the Java Bug
> System?
More information about the build-dev
mailing list