Compile Errors in OpenJDK 11 with Non-English Characters in Compilation Path

last last sakyosang at gmail.com
Fri Nov 24 07:41:34 UTC 2023


I am currently facing the same error when build paths include Chinese
characters ,after setting the environment variable "export
LC_ALL=zh_CN.UTF-8" .The testing environment is also Ubuntu 2004.
The system locale settings are as follows: LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8
I'm wondering if there are any other system configurations that could help
resolve this problem. Your insights would be greatly appreciated.

Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com> 于2023年11月23日周四 22:30写道:

> 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?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20231124/bbb3c9fc/attachment-0001.htm>


More information about the build-dev mailing list