Skip to content
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

On Linux, the native library cannot be loaded if the path contains non ASCII characters #691

Closed
Glavo opened this issue Oct 30, 2021 · 2 comments

Comments

@Glavo
Copy link
Contributor

Glavo commented Oct 30, 2021

Version

3.3.0 (nightly)

Platform

Linux x64, Linux arm64, Linux arm32

JDK

Any

Module

LWJGL Core

Bug description

On Linux, the native library cannot be loaded if the path contains non ASCII characters. The reason is that in the Linux library, ASCII is used to encode the path:

handle = dlopen(stack.ASCII(name), RTLD_LAZY | RTLD_LOCAL);

I think the problem can be solved by changing it to

handle = dlopen(stack.UTF8(name), RTLD_LAZY | RTLD_LOCAL); 

I don't know why there is no such thing here. Is there any special reason?

Stacktrace or crash log output

No response

@Glavo
Copy link
Contributor Author

Glavo commented Oct 30, 2021

This caused https://github.com/huanghongxun/HMCL/issues/1141, we have to bypass this problem by creating temporary soft links as workaround.

@Spasi Spasi closed this as completed in a10f862 Oct 30, 2021
@Spasi
Copy link
Member

Spasi commented Oct 30, 2021

Thank you @Glavo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants