-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Document how to cross-compile #5
Comments
What kind of documentation do you want? Currently it's just about passing |
I'd expect instructions to include:
|
If you tell me where you want this documentation and an example, I can write something. |
Having just gone through that, here's what I ended up doing:
The thing which caused me problems is that I had installed the Of course, the packages might be named differently depending on the distribution. |
There's a nice guide about cross-compilation here: I've followed it and I'm now trying to use it to build an aarch64 flatpak using an x86_64 laptop. But I get a weird error when building the first module in the manifest:
Is this something related to binfmt? (as @aleixpol mentioned above) I'm on Fedora 34 Silverblue and I'm running flatpak-builder within a fedora 34 container, where I installed qemu-user-static. |
I've just tried building Lollypop and I get an error while building the first module:
What I'm doing wrong? |
Your system can't execute aarch64 executables, from the likes of it. Note that this issue is about documenting cross-compilation, not helping folks out with their own problems. You might want to reach out to your distribution's help forums instead. |
This has become relevant again now that i386 is EOL and you need to use cross-compile Sdk extensions to build 32bit binaries. |
@nanonyme This issue was about using |
Here's another idea how to handle this. Create an SDK extension
Install the extension.
Update binfmt_misc.
Build your app with Flatpak Builder's |
@bochecha Thank you for writing this! Take me long time to understand how to build flatpak for arm. |
Hi, I used to be called @bochecha but due to $reasons I had to create this new account and abandon that old one because the Github support couldn't just give me back my old account... You're welcome, I'm glad that documentation I wrote a long time ago could still be useful after all these years 😄 I welcome the idea of moving it to the Flatpak docs 👍 |
@mbridon Thank you again!
Yesterday I was able to download and install using flatpak, but today no. Can you verify it from your side? |
I just installed runtime/org.gnome.Sdk/arm/3.36 on my x86_64 machine 🤷 it only complained about this:
|
I try to do the same on my local and the gitgub action (CI), both work for me on Saturday, but yesterday and today not: sudo apt update
sudo apt install -y flatpak flatpak-builder qemu-system-arm qemu-user-static
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install -y flathub org.gnome.Sdk/${{ matrix.arch }}/42 flathub org.gnome.Platform/${{ matrix.arch }}/42 The matrix.arch are: matrix:
include:
- type: x64
arch: x86_64
- type: arm64
arch: aarch64 It not found the aarch64. Looking for matches…
error: Nothing matches org.gnome.Sdk in remote flathub
Error: Process completed with exit code 1. It it succeeded on Saturday in both (local computer and github action), I think it not a problem on my side. and If it is, I am not sure what I am doing wrong. Thank you for your response. |
Can you try with aarch64? |
Same result as arm 🤷 |
Thank you for trying! |
The checksum here can leak if `flatpak_dir_remote_load_cached_summary()` returns false at least once. Spotted by asan while running gnome-software: ``` Direct leak of 2925 byte(s) in 45 object(s) allocated from: #0 0x7f44774ba6af in __interceptor_malloc (/lib64/libasan.so.8+0xba6af) flatpak#1 0x7f44764c941a in g_malloc ../../source/glib/glib/gmem.c:130 flatpak#2 0x7f445bc860e7 in ostree_checksum_from_bytes src/libostree/ostree-core.c:1599 flatpak#3 0x7f445bdbea82 in flatpak_dir_remote_fetch_indexed_summary /opt/gnome/source/flatpak/common/flatpak-dir.c:12563 flatpak#4 0x7f445bd9932e in flatpak_remote_state_ensure_subsummary /opt/gnome/source/flatpak/common/flatpak-dir.c:577 flatpak#5 0x7f445bdbfd42 in _flatpak_dir_get_remote_state /opt/gnome/source/flatpak/common/flatpak-dir.c:12872 flatpak#6 0x7f445bdc006c in flatpak_dir_get_remote_state_optional /opt/gnome/source/flatpak/common/flatpak-dir.c:12953 flatpak#7 0x7f445be07886 in flatpak_transaction_ensure_remote_state /opt/gnome/source/flatpak/common/flatpak-transaction.c:2057 flatpak#8 0x7f445be095c7 in flatpak_transaction_add_ref /opt/gnome/source/flatpak/common/flatpak-transaction.c:2732 flatpak#9 0x7f445be09c37 in flatpak_transaction_add_update /opt/gnome/source/flatpak/common/flatpak-transaction.c:2940 flatpak#10 0x7f445bdd202c in flatpak_installation_list_installed_refs_for_update /opt/gnome/source/flatpak/common/flatpak-installation.c:1103 flatpak#11 0x7f445bf07824 in gs_flatpak_add_updates ../../source/gnome-software/plugins/flatpak/gs-flatpak.c:2082 flatpak#12 0x7f445bf2e2b9 in gs_plugin_add_updates ../../source/gnome-software/plugins/flatpak/gs-plugin-flatpak.c:484 flatpak#13 0x7f44770533b2 in gs_plugin_loader_call_vfunc ../../source/gnome-software/lib/gs-plugin-loader.c:620 flatpak#14 0x7f447705430f in gs_plugin_loader_run_results ../../source/gnome-software/lib/gs-plugin-loader.c:748 flatpak#15 0x7f447706cb03 in gs_plugin_loader_process_thread_cb ../../source/gnome-software/lib/gs-plugin-loader.c:3110 #16 0x7f44769967ed in g_task_thread_pool_thread ../../source/glib/gio/gtask.c:1531 flatpak#17 0x7f447650e760 in g_thread_pool_thread_proxy ../../source/glib/glib/gthreadpool.c:350 flatpak#18 0x7f447650dd02 in g_thread_proxy ../../source/glib/glib/gthread.c:831 ``` Signed-off-by: Philip Withnall <[email protected]>
The checksum here can leak if `flatpak_dir_remote_load_cached_summary()` returns false at least once. Spotted by asan while running gnome-software: ``` Direct leak of 2925 byte(s) in 45 object(s) allocated from: #0 0x7f44774ba6af in __interceptor_malloc (/lib64/libasan.so.8+0xba6af) flatpak#1 0x7f44764c941a in g_malloc ../../source/glib/glib/gmem.c:130 flatpak#2 0x7f445bc860e7 in ostree_checksum_from_bytes src/libostree/ostree-core.c:1599 flatpak#3 0x7f445bdbea82 in flatpak_dir_remote_fetch_indexed_summary /opt/gnome/source/flatpak/common/flatpak-dir.c:12563 flatpak#4 0x7f445bd9932e in flatpak_remote_state_ensure_subsummary /opt/gnome/source/flatpak/common/flatpak-dir.c:577 flatpak#5 0x7f445bdbfd42 in _flatpak_dir_get_remote_state /opt/gnome/source/flatpak/common/flatpak-dir.c:12872 flatpak#6 0x7f445bdc006c in flatpak_dir_get_remote_state_optional /opt/gnome/source/flatpak/common/flatpak-dir.c:12953 flatpak#7 0x7f445be07886 in flatpak_transaction_ensure_remote_state /opt/gnome/source/flatpak/common/flatpak-transaction.c:2057 flatpak#8 0x7f445be095c7 in flatpak_transaction_add_ref /opt/gnome/source/flatpak/common/flatpak-transaction.c:2732 flatpak#9 0x7f445be09c37 in flatpak_transaction_add_update /opt/gnome/source/flatpak/common/flatpak-transaction.c:2940 flatpak#10 0x7f445bdd202c in flatpak_installation_list_installed_refs_for_update /opt/gnome/source/flatpak/common/flatpak-installation.c:1103 flatpak#11 0x7f445bf07824 in gs_flatpak_add_updates ../../source/gnome-software/plugins/flatpak/gs-flatpak.c:2082 flatpak#12 0x7f445bf2e2b9 in gs_plugin_add_updates ../../source/gnome-software/plugins/flatpak/gs-plugin-flatpak.c:484 flatpak#13 0x7f44770533b2 in gs_plugin_loader_call_vfunc ../../source/gnome-software/lib/gs-plugin-loader.c:620 flatpak#14 0x7f447705430f in gs_plugin_loader_run_results ../../source/gnome-software/lib/gs-plugin-loader.c:748 flatpak#15 0x7f447706cb03 in gs_plugin_loader_process_thread_cb ../../source/gnome-software/lib/gs-plugin-loader.c:3110 #16 0x7f44769967ed in g_task_thread_pool_thread ../../source/glib/gio/gtask.c:1531 flatpak#17 0x7f447650e760 in g_thread_pool_thread_proxy ../../source/glib/glib/gthreadpool.c:350 flatpak#18 0x7f447650dd02 in g_thread_proxy ../../source/glib/glib/gthread.c:831 ``` Signed-off-by: Philip Withnall <[email protected]>
The checksum here can leak if `flatpak_dir_remote_load_cached_summary()` returns false at least once. Spotted by asan while running gnome-software: ``` Direct leak of 2925 byte(s) in 45 object(s) allocated from: #0 0x7f44774ba6af in __interceptor_malloc (/lib64/libasan.so.8+0xba6af) #1 0x7f44764c941a in g_malloc ../../source/glib/glib/gmem.c:130 #2 0x7f445bc860e7 in ostree_checksum_from_bytes src/libostree/ostree-core.c:1599 #3 0x7f445bdbea82 in flatpak_dir_remote_fetch_indexed_summary /opt/gnome/source/flatpak/common/flatpak-dir.c:12563 #4 0x7f445bd9932e in flatpak_remote_state_ensure_subsummary /opt/gnome/source/flatpak/common/flatpak-dir.c:577 #5 0x7f445bdbfd42 in _flatpak_dir_get_remote_state /opt/gnome/source/flatpak/common/flatpak-dir.c:12872 #6 0x7f445bdc006c in flatpak_dir_get_remote_state_optional /opt/gnome/source/flatpak/common/flatpak-dir.c:12953 #7 0x7f445be07886 in flatpak_transaction_ensure_remote_state /opt/gnome/source/flatpak/common/flatpak-transaction.c:2057 #8 0x7f445be095c7 in flatpak_transaction_add_ref /opt/gnome/source/flatpak/common/flatpak-transaction.c:2732 #9 0x7f445be09c37 in flatpak_transaction_add_update /opt/gnome/source/flatpak/common/flatpak-transaction.c:2940 #10 0x7f445bdd202c in flatpak_installation_list_installed_refs_for_update /opt/gnome/source/flatpak/common/flatpak-installation.c:1103 #11 0x7f445bf07824 in gs_flatpak_add_updates ../../source/gnome-software/plugins/flatpak/gs-flatpak.c:2082 #12 0x7f445bf2e2b9 in gs_plugin_add_updates ../../source/gnome-software/plugins/flatpak/gs-plugin-flatpak.c:484 #13 0x7f44770533b2 in gs_plugin_loader_call_vfunc ../../source/gnome-software/lib/gs-plugin-loader.c:620 #14 0x7f447705430f in gs_plugin_loader_run_results ../../source/gnome-software/lib/gs-plugin-loader.c:748 #15 0x7f447706cb03 in gs_plugin_loader_process_thread_cb ../../source/gnome-software/lib/gs-plugin-loader.c:3110 #16 0x7f44769967ed in g_task_thread_pool_thread ../../source/glib/gio/gtask.c:1531 #17 0x7f447650e760 in g_thread_pool_thread_proxy ../../source/glib/glib/gthreadpool.c:350 #18 0x7f447650dd02 in g_thread_proxy ../../source/glib/glib/gthread.c:831 ``` Signed-off-by: Philip Withnall <[email protected]>
The checksum here can leak if `flatpak_dir_remote_load_cached_summary()` returns false at least once. Spotted by asan while running gnome-software: ``` Direct leak of 2925 byte(s) in 45 object(s) allocated from: #0 0x7f44774ba6af in __interceptor_malloc (/lib64/libasan.so.8+0xba6af) #1 0x7f44764c941a in g_malloc ../../source/glib/glib/gmem.c:130 flatpak#2 0x7f445bc860e7 in ostree_checksum_from_bytes src/libostree/ostree-core.c:1599 flatpak#3 0x7f445bdbea82 in flatpak_dir_remote_fetch_indexed_summary /opt/gnome/source/flatpak/common/flatpak-dir.c:12563 flatpak#4 0x7f445bd9932e in flatpak_remote_state_ensure_subsummary /opt/gnome/source/flatpak/common/flatpak-dir.c:577 flatpak#5 0x7f445bdbfd42 in _flatpak_dir_get_remote_state /opt/gnome/source/flatpak/common/flatpak-dir.c:12872 flatpak#6 0x7f445bdc006c in flatpak_dir_get_remote_state_optional /opt/gnome/source/flatpak/common/flatpak-dir.c:12953 flatpak#7 0x7f445be07886 in flatpak_transaction_ensure_remote_state /opt/gnome/source/flatpak/common/flatpak-transaction.c:2057 flatpak#8 0x7f445be095c7 in flatpak_transaction_add_ref /opt/gnome/source/flatpak/common/flatpak-transaction.c:2732 flatpak#9 0x7f445be09c37 in flatpak_transaction_add_update /opt/gnome/source/flatpak/common/flatpak-transaction.c:2940 flatpak#10 0x7f445bdd202c in flatpak_installation_list_installed_refs_for_update /opt/gnome/source/flatpak/common/flatpak-installation.c:1103 flatpak#11 0x7f445bf07824 in gs_flatpak_add_updates ../../source/gnome-software/plugins/flatpak/gs-flatpak.c:2082 flatpak#12 0x7f445bf2e2b9 in gs_plugin_add_updates ../../source/gnome-software/plugins/flatpak/gs-plugin-flatpak.c:484 flatpak#13 0x7f44770533b2 in gs_plugin_loader_call_vfunc ../../source/gnome-software/lib/gs-plugin-loader.c:620 flatpak#14 0x7f447705430f in gs_plugin_loader_run_results ../../source/gnome-software/lib/gs-plugin-loader.c:748 flatpak#15 0x7f447706cb03 in gs_plugin_loader_process_thread_cb ../../source/gnome-software/lib/gs-plugin-loader.c:3110 #16 0x7f44769967ed in g_task_thread_pool_thread ../../source/glib/gio/gtask.c:1531 flatpak#17 0x7f447650e760 in g_thread_pool_thread_proxy ../../source/glib/glib/gthreadpool.c:350 flatpak#18 0x7f447650dd02 in g_thread_proxy ../../source/glib/glib/gthread.c:831 ``` Signed-off-by: Philip Withnall <[email protected]> (cherry picked from commit ce4bb3d)
Add MIT license to code and generated code Closes flatpak#5 See merge request alexl/variant-schema-compiler!12
From @hadess on May 5, 2016 17:25
When we have, in the near future, support for ARM in the Freedesktop and GNOME SDK, it would be good to document how to cross compile for one to the other, if only x86-64 to i686 to start with, and x86-64 to ARM afterwards.
Copied from original issue: alexlarsson/xdg-app#155
The text was updated successfully, but these errors were encountered: