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

Updated the code related to LoongArch and added the necessary so files. #1135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tianxu1997
Copy link

When I tried to build the Eclipse platform on the LoongArch platform, I found that the relevant code was too outdated. Therefore, I made some modifications, including modifying the code and compiling the necessary so files.
If this is appropriate, I will submit modifications to other submodules of the Eclipse platform (eclipse.platform.ui, equinox, etc.) in the next few days.

@akurtakov
Copy link
Member

Unfortunately, we can not accept the binaries submitted as they will get out of sync with java parts whenever the next change is. What is needed is getting longarch builder in the EF infrastructure which the project can use to rebuild native parts whenever needed.

@tianxu1997
Copy link
Author

Unfortunately, we can not accept the binaries submitted as they will get out of sync with java parts whenever the next change is. What is needed is getting longarch builder in the EF infrastructure which the project can use to rebuild native parts whenever needed.

Thanks for your reply!

Could you tell me in which form I can provide the loongarch builder to EF? Is it acceptable to use methods other than physical machines (such as qemu)?

Thanks again :)

@laeubi
Copy link
Contributor

laeubi commented Mar 22, 2024

Should these natives not already be build automatically? @HannesWell ?

@tianxu1997 I think the best is to look how it is done for other platforms and check if cross compile is possible.

@tianxu1997
Copy link
Author

Should these natives not already be build automatically? @HannesWell ?

@tianxu1997 I think the best is to look how it is done for other platforms and check if cross compile is possible.

thank you!
I tried but didn't found any evidence of cross-compilation, maybe I missed something?
FYI, here is the link of ci workflow https://ci.eclipse.org/releng/view/SWT%20Natives/job/gtk_linux_aarch64/131/console

@akurtakov
Copy link
Member

@fredg02 should be able to answer the question about providing a machine.

@fredg02
Copy link
Contributor

fredg02 commented Mar 22, 2024

Unfortunately, I need to quote the first paragraphs of https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4276#note_1752405:

thank you for your willingness to support the SWT project. Your generosity and eagerness to contribute are greatly appreciated.
However, we must decline the offer to connect external machines to our production systems. As much as we value community contributions, the security of our projects and infrastructure is our top priority. Connecting an external machine, regardless of intent, poses significant security risks. This situation would not be very different from connecting a USB stick found in a coffee shop to a company laptop—a practice fraught with potential security vulnerabilities.

@fredg02
Copy link
Contributor

fredg02 commented Mar 22, 2024

Cross-compiling or using QEMU is probably best.

@laeubi
Copy link
Contributor

laeubi commented Mar 22, 2024

@tianxu1997 there is no cross compiling yet I'm aware of it.... but you can look what maschine / architectures we have and then see if any of them suitable for crosscompiling/QEMU

@akurtakov
Copy link
Member

What about having such machine (if sponsored by someone)? While cross compiling may work for producing binaries, what should we do to at least smoke test the builds (https://ci.eclipse.org/releng/job/SmokeTests/).

@laeubi
Copy link
Contributor

laeubi commented Mar 22, 2024

@akurtakov what confuses me is that according to this we modified it last week:

https://github.com/eclipse-platform/eclipse.platform.swt/tree/master/binaries/org.eclipse.swt.gtk.linux.loongarch64

so is it actually not shipped / build / used / tested / ...?

@HannesWell
Copy link
Member

so is it actually not shipped / build / used / tested / ...?

Exactly. Just the project exists in git at the moment.

What about having such machine (if sponsored by someone)? While cross compiling may work for producing binaries, what should we do to at least smoke test the builds (https://ci.eclipse.org/releng/job/SmokeTests/).

Agree on that. We should do that like it is currently done for Windows on Arm in #1045.

I also want to create a link to #175 (comment) since this would not be necessary, if we would use the FFM-API for the native access.

@tianxu1997
Copy link
Author

Cross-compiling or using QEMU is probably best.

Great, I'll try QEMU, thanks for your reply:)

@tianxu1997
Copy link
Author

What about having such machine (if sponsored by someone)? While cross compiling may work for producing binaries, what should we do to at least smoke test the builds (https://ci.eclipse.org/releng/job/SmokeTests/).

Sorry about this, I'm not sure if we can provide such machine yet

@tianxu1997
Copy link
Author

Cross-compiling or using QEMU is probably best.

I try to build LoongArch64 binaries on X86 using cross-compilation.

Toolchain url: https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/download/8.0/loongarch64-clfs-8.0-cross-tools-gcc-full.tar.xz , and this link is on this page: https://github.com/sunhaiyong1978/CLFS-for-LoongArch

After preparing the cross-compilation toolchain, I specify the values of MODEL, SWT_JAVA_HOME, and CC to compile LoongArch64 binaries on x86. And it works.

Is this solution acceptable? @akurtakov @fredg02 @HannesWell @laeubi

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

Successfully merging this pull request may close these issues.

None yet

5 participants