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

loongarch64 need glibc2.36 #1588

Open
FULaBUla opened this issue Jan 15, 2024 · 29 comments
Open

loongarch64 need glibc2.36 #1588

FULaBUla opened this issue Jan 15, 2024 · 29 comments

Comments

@FULaBUla
Copy link

FULaBUla commented Jan 15, 2024

with jna 5.13, i can use it in any linux platform with glibc2.28. but when i try to use loongarch platform with KylinOS v10 (glibc 2.28), it will tell me i need glibc2.36 but this system just support 2.28. In KylinOS v10 (glibc 2.28) for arm, i don't have this problem.

龙芯的 so 在银河麒麟v10 上跑的时候提示我 glibc 版本要求 2.36,但是银河麒麟用的是 2.28,这个是怎么适配的?没法用呀

@FULaBUla
Copy link
Author

@Panxuefeng-loongson

@matthiasblaesing
Copy link
Member

If anybody can point me to a mainstream linux distribution that supports loongarch64, I'm willing to have look. Currently I can't even access hosts of the gcc build farm, so at this point the next update of the native libraries will most probably loose support for loongarch64.

@Panxuefeng-loongson
Copy link
Contributor

with jna 5.13, i can use it in any linux platform with glibc2.28. but when i try to use loongarch platform with KylinOS v10 (glibc 2.28), it will tell me i need glibc2.36 but this system just support 2.28. In KylinOS v10 (glibc 2.28) for arm, i don't have this problem.

龙芯的 so 在银河麒麟v10 上跑的时候提示我 glibc 版本要求 2.36,但是银河麒麟用的是 2.28,这个是怎么适配的?没法用呀

I'm very sorry for not replying to you promptly, We have internally maintained JAR packages suitable for your working environment: http://maven.loongnix.cn/loongarchabi1/maven/net/java/dev/jna/jna/

@Panxuefeng-loongson
Copy link
Contributor

If anybody can point me to a mainstream linux distribution that supports loongarch64, I'm willing to have look. Currently I can't even access hosts of the gcc build farm, so at this point the next update of the native libraries will most probably loose support for loongarch64.

Oops, this is our mistake. I will get back to you as soon as possible to ensure that the JNA JAR package can be released properly.

@Panxuefeng-loongson
Copy link
Contributor

with jna 5.13, i can use it in any linux platform with glibc2.28. but when i try to use loongarch platform with KylinOS v10 (glibc 2.28), it will tell me i need glibc2.36 but this system just support 2.28. In KylinOS v10 (glibc 2.28) for arm, i don't have this problem.
龙芯的 so 在银河麒麟v10 上跑的时候提示我 glibc 版本要求 2.36,但是银河麒麟用的是 2.28,这个是怎么适配的?没法用呀

I'm very sorry for not replying to you promptly, We have internally maintained JAR packages suitable for your working environment: http://maven.loongnix.cn/loongarchabi1/maven/net/java/dev/jna/jna/

FYI: This URL contains some common architecture-related JAR files on the LoongArch platform. Feel free to download them if you need.

@CodeyHunter
Copy link

with jna 5.13, i can use it in any linux platform with glibc2.28. but when i try to use loongarch platform with KylinOS v10 (glibc 2.28), it will tell me i need glibc2.36 but this system just support 2.28. In KylinOS v10 (glibc 2.28) for arm, i don't have this problem.
龙芯的 so 在银河麒麟v10 上跑的时候提示我 glibc 版本要求 2.36,但是银河麒麟用的是 2.28,这个是怎么适配的?没法用呀

I'm very sorry for not replying to you promptly, We have internally maintained JAR packages suitable for your working environment: http://maven.loongnix.cn/loongarchabi1/maven/net/java/dev/jna/jna/

FYI: This URL contains some common architecture-related JAR files on the LoongArch platform. Feel free to download them if you need.

Hi , can you provide 5.14.0 version in loongarch platform .

@Panxuefeng-loongson
Copy link
Contributor

with jna 5.13, i can use it in any linux platform with glibc2.28. but when i try to use loongarch platform with KylinOS v10 (glibc 2.28), it will tell me i need glibc2.36 but this system just support 2.28. In KylinOS v10 (glibc 2.28) for arm, i don't have this problem.
龙芯的 so 在银河麒麟v10 上跑的时候提示我 glibc 版本要求 2.36,但是银河麒麟用的是 2.28,这个是怎么适配的?没法用呀

I'm very sorry for not replying to you promptly, We have internally maintained JAR packages suitable for your working environment: http://maven.loongnix.cn/loongarchabi1/maven/net/java/dev/jna/jna/

FYI: This URL contains some common architecture-related JAR files on the LoongArch platform. Feel free to download them if you need.

Hi , can you provide 5.14.0 version in loongarch platform .

Certainly, but the JNA 5.14.0 version that is compatible with glibc 2.28 has not yet been uploaded to the Loongson Maven repo. So, you can contact me via email at: panxuefeng@loongson.cn.

@Panxuefeng-loongson
Copy link
Contributor

If anybody can point me to a mainstream linux distribution that supports loongarch64, I'm willing to have look. Currently I can't even access hosts of the gcc build farm, so at this point the next update of the native libraries will most probably loose support for loongarch64.

The machine with the IP address 111.207.111.194 on the GCC build farm is currently accessible. We are actively working on adapting to Debian, and there may be a Debian distribution available later this year.

@FULaBUla
Copy link
Author

FULaBUla commented Feb 1, 2024

If anybody can point me to a mainstream linux distribution that supports loongarch64, I'm willing to have look. Currently I can't even access hosts of the gcc build farm, so at this point the next update of the native libraries will most probably loose support for loongarch64.

maybe you can try UOS or KylinOS V10 SP3. we are using KylinOS V10 SP3 now for our server.

@matthiasblaesing
Copy link
Member

@Panxuefeng-loongson

The machine with the IP address 111.207.111.194 on the GCC build farm is currently accessible.

Thanks for checking. Seems the problem might be the network I see roundtrip times in the range of 400ms and I get ssh timeouts. I see that from my private account (routed via sprintlink) and my vserver (routed via level3) with me localized in germany.

We are actively working on adapting to Debian, and there may be a Debian distribution available later this year.

That would be great. Having a debian stable build for loongarch would be a great help!

@FULaBUla

Thank you for the pointers, but I hit a hard language barrier, are there pages available in english?

@FULaBUla
Copy link
Author

FULaBUla commented Feb 2, 2024

@Panxuefeng-loongson

The machine with the IP address 111.207.111.194 on the GCC build farm is currently accessible.

Thanks for checking. Seems the problem might be the network I see roundtrip times in the range of 400ms and I get ssh timeouts. I see that from my private account (routed via sprintlink) and my vserver (routed via level3) with me localized in germany.

We are actively working on adapting to Debian, and there may be a Debian distribution available later this year.

That would be great. Having a debian stable build for loongarch would be a great help!

@FULaBUla

Thank you for the pointers, but I hit a hard language barrier, are there pages available in english?

@matthiasblaesing
KylinOS:please use torrent file to download. There are 3 files in this zip file. one is for arm64, the other is for amd64 and the other is for loongarch64. you can distinguish them by file name.
Kylin-Server-V10-SP3-General-Release-2303.zip

UOS:please try this url https://cdimage-download.chinauos.com/server/1060/uos-server-20-1060-loongarch64.iso?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDY4NDgwOTksImZpbGVfbmFtZSI6InNlcnZlci8xMDYwL3Vvcy1zZXJ2ZXItMjAtMTA2MC1sb29uZ2FyY2g2NC5pc28ifQ.4qO_t82kxm2zdd7HWhw6gtaLY5rhIv_lEfqSHOSQ_0o or https://cdimage-download.chinauos.com/server/1060/uos-server-20-1060-loongarch64.iso.

And this is UOS download page https://www.chinauos.com/resource/download-server, you can try visit it by using Microsoft Edge Translation.
image, you can download any image for your platform by click blue button '镜像下载'[image download] then click '下载'(download) to start download.
image

@matthiasblaesing
Copy link
Member

@FULaBUla thanks again. Download of Kylin works. The next problem is running it. I was naive and tough that it should not be that hard to run a live system in qemu. I was naive and thought that qemu would provide a virtual GPU/VGA and that would be automatically be picked up. This works great on amd64, but utterly fails with the kylin image.

@FULaBUla
Copy link
Author

FULaBUla commented Feb 18, 2024

@FULaBUla thanks again. Download of Kylin works. The next problem is running it. I was naive and tough that it should not be that hard to run a live system in qemu. I was naive and thought that qemu would provide a virtual GPU/VGA and that would be automatically be picked up. This works great on amd64, but utterly fails with the kylin image.

I just use vmware to install and run KylinOS for arm64. If you use KylinOS for loongson with qemu, i think you need to install loongson for qemu first.
https://blog.csdn.net/longji/article/details/132724349
https://zhuanlan.zhihu.com/p/626169693
https://blog.csdn.net/mxcai2005/article/details/129631722
https://github.com/sunhaiyong1978/CLFS-for-LoongArch/blob/main/Qemu_For_LoongArch64.md

Or maybe you need to upgrade your qemu version to 8.2
https://www.ithome.com/0/740/750.htm

@matthiasblaesing
Copy link
Member

sigh it would be great if the resources would be in english (yes I know, that I can as google/deepl/whatever to translate). I'll see where this leads me....

@matthiasblaesing
Copy link
Member

I was finally able to get Kylin working and learned, that the gcc provided by is is missing defines for the floating point ABI. The build fails with "unsupported LoongArch floating-point ABI". The error is raised in native/libffi/src/loongarch64/ffitarget.h, where __loongarch64 is defined, but neither __longarch_soft_float, __longarch_single_float nor __longarch_single_double.

So the mess continues. It would be really great if one of the mainstream linux distributions would be supported or the users would be prepared to be on a moving target and update to current library versions....

@jinteng123
Copy link

jinteng123 commented Mar 8, 2024

"I encountered the same issue, and after replacing the JAR file, this error occurred."

Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'hs':
libhs.so: cannot open shared object file: No such file or directory
libhs.so: cannot open shared object file: No such file or directory
Native library (linux-loongarch64/libhs.so) not found in resource path ([file:/home/jar/lib/, file:/home/jar/lib/ST4-4.1.jar,

@Panxuefeng-loongson
Copy link
Contributor

"I encountered the same issue, and after replacing the JAR file, this error occurred."

Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'hs': libhs.so: cannot open shared object file: No such file or directory libhs.so: cannot open shared object file: No such file or directory Native library (linux-loongarch64/libhs.so) not found in resource path ([file:/home/jar/lib/, file:/home/jar/lib/ST4-4.1.jar,

Please contact me by email: panxuefeng@loongson.cn. I'll follow up this question.

@matthiasblaesing
Copy link
Member

@Panxuefeng-loongson I rebuild the native libraries as a reaction to the bugfix for #1586. All linux binaries were rebuild, but the loongarch one. For that binary I'm unable to create a sane build environment. At some point I hope that there will be either a Debian or Ubuntu based chroot available, but that is not the case (the debian port exists, but is not debootstrappable).

At this point this is not that bad. The new library revision is binary compatible, so support for loongarch64 is still there, but degraded.

Would you be able and willing to provide a build of the native part of JNA for loongarch64 based on current master (6486c90)?

@Panxuefeng-loongson
Copy link
Contributor

@matthiasblaesing I'm deeply sorry for not responding promptly. I'm more than willing to provide any assistance. Would you like me to build the binary locally and then provide it to you?

@matthiasblaesing
Copy link
Member

@Panxuefeng-loongson yes your interpretation is correct. Please build from current master and provide the resulting linux-loongarch64.jar. Thank you!

@Panxuefeng-loongson
Copy link
Contributor

@matthiasblaesing Before moving forward, let me provide some context on the current state of LoongArch. We define two environments based on whether the Linux kernel LoongArch port has been accepted by the Linux community: before and after the acceptance of the Linux kernel LoongArch port. We refer to the environment before acceptance as ABI 1.0, and after acceptance as ABI 2.0. There may be compatibility issues between binaries built under ABI 1.0 and those under ABI 2.0.

In order to ensure the orderly development of LoongArch port within the community, I intend to build JNA based on the ABI 2.0 environment. For users on ABI 1.0, we have built binaries and hosted them here: jna

@matthiasblaesing
Copy link
Member

In order to ensure the orderly development of LoongArch port within the community, I intend to build JNA based on the ABI 2.0 environment. For users on ABI 1.0, we have built binaries and hosted them here: jna

Yes that sounds good to me.

@Panxuefeng-loongson
Copy link
Contributor

@matthiasblaesing I have already sent it to you via email.

@FULaBUla
Copy link
Author

@matthiasblaesing Before moving forward, let me provide some context on the current state of LoongArch. We define two environments based on whether the Linux kernel LoongArch port has been accepted by the Linux community: before and after the acceptance of the Linux kernel LoongArch port. We refer to the environment before acceptance as ABI 1.0, and after acceptance as ABI 2.0. There may be compatibility issues between binaries built under ABI 1.0 and those under ABI 2.0.

In order to ensure the orderly development of LoongArch port within the community, I intend to build JNA based on the ABI 2.0 environment. For users on ABI 1.0, we have built binaries and hosted them here: jna

@Panxuefeng-loongson If i use KylinOS v10 (glibc 2.28),so need i use ABI 1.0 version from your repository?the ABI 2.0 version doesn't support glibc 2.28, Is that right? When will you publish version 5.14.0 to your repository for ABI 1.0 user? Can the ABI 1.0 version be released simultaneously with the official version?

@FULaBUla
Copy link
Author

I was finally able to get Kylin working and learned, that the gcc provided by is is missing defines for the floating point ABI. The build fails with "unsupported LoongArch floating-point ABI". The error is raised in native/libffi/src/loongarch64/ffitarget.h, where __loongarch64 is defined, but neither __longarch_soft_float, __longarch_single_float nor __longarch_single_double.

So the mess continues. It would be really great if one of the mainstream linux distributions would be supported or the users would be prepared to be on a moving target and update to current library versions....

I'm sorry about the problems. I think maybe only the loongson staff can help you solve the problem to automate the packaging release.

@Panxuefeng-loongson
Copy link
Contributor

Panxuefeng-loongson commented Mar 15, 2024

ABI 1.0 version be released simultaneously with the official version?

I'll release it as soon as possible, but before that, I can give you a trial version. Please leave your email, and I will contact you.

@FULaBUla
Copy link
Author

FULaBUla commented May 29, 2024

ABI 1.0 version be released simultaneously with the official version?

I'll release it as soon as possible, but before that, I can give you a trial version. Please leave your email, and I will contact you.

I prefer to try to use the official release version, 5.14.0 has been released for half a year now, when will your ABI 1.0 version be released? @Panxuefeng-loongson

@yunhai2009
Copy link

with jna 5.13, i can use it in any linux platform with glibc2.28. but when i try to use loongarch platform with KylinOS v10 (glibc 2.28), it will tell me i need glibc2.36 but this system just support 2.28. In KylinOS v10 (glibc 2.28) for arm, i don't have this problem.

龙芯的 so 在银河麒麟v10 上跑的时候提示我 glibc 版本要求 2.36,但是银河麒麟用的是 2.28,这个是怎么适配的?没法用呀

@FULaBUla 解决了吗?

@Panxuefeng-loongson
Copy link
Contributor

with jna 5.13, i can use it in any linux platform with glibc2.28. but when i try to use loongarch platform with KylinOS v10 (glibc 2.28), it will tell me i need glibc2.36 but this system just support 2.28. In KylinOS v10 (glibc 2.28) for arm, i don't have this problem.
龙芯的 so 在银河麒麟v10 上跑的时候提示我 glibc 版本要求 2.36,但是银河麒麟用的是 2.28,这个是怎么适配的?没法用呀

@FULaBUla 解决了吗?

Try downloading from here: https://maven.loongnix.cn/loongarchabi1/maven/net/java/dev/jna/jna/

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

No branches or pull requests

6 participants