Community meeting on IRC 21st December 2023

Here’s a non-standard community meeting reply. This is due to the fact that reply ended up being too long for the meeting. Let’s edit & comment this and finally create a PR to the docs.sailfishos.org. We’ll use this post a reference during the meeting.

There are multiple aspects involved. There are some issues that we’re seeing also in the next Platform SDK release. First, you do not want to install cross-{armv7hl,aarch64}-{gcc,binutils,as,glibc} to the target as those should be installed to the tooling. Secondly, it’s not easy to understand how these cross-packages are intended to work – thanks from the request to formalizing this. Sorry that it took a while to realize what you were trying to do and what’s wrong – at least we think that we understood the issue now. It’s not also easy to understand how SDK chroot, tooling, and target work together. Hopefully this sheds a bit of light to that. The cross packages are already available and hopefully this will unlock your work. Let’s open the hood a bit.

First thing is that we revert (or commented out) following lines from the rust spec. This is something we missed previously – apologies. We’ll create a PR to the rust spec that makes this optional to OBS. In addition to this, there were some project config changes around the time frame that you mention which in combination broke this or that’s what we believe.

Next let’s verify that you have your tooling in a good shape. You need to install the spec lines that you removed to the tooling.

/srv/mer/toolings/SailfishOS-latest-public/mer-tooling-chroot 
ssu ar jolla-aarch64 https://releases.jolla.com/releases/4.5.0.18/jolla/aarch64 
ssu ar jolla-armv7hl https://releases.jolla.com/releases/4.5.0.18/jolla/armv7hl 
zypper ref 

# aarch64 
zypper in cross-aarch64-gcc cross-aarch64-binutils cross-aarch64-as cross-aarch64-glibc cross-aarch64-glibc-devel cross-aarch64-glibc-headers cross-aarch64-kernel-headers 

# armv7hl 
zypper in cross-armv7hl-gcc cross-armv7hl-binutils cross-armv7hl-as cross-armv7hl-glibc cross-armv7hl-glibc-devel cross-armv7hl-glibc-headers cross-armv7hl-kernel-headers 

exit 

Now we’re back in the SDK chroot. Let’s install i486 counterparts to the SDK itself. At least glibc-common, glibc-devel, and glibc-headers. The mb2 build installs build requirements (BuildRequires from spec) to the target so no need to worry about the build target.

sudo zypper ref 
sudo zypper in glibc-common glibc-devel glibc-headers  

If build fails with an odd error and objdump -T <lib-name> in the target shows that symbols are there, it is good to check that tooling and SDK have right packages.

Instruction for building dumb packages can be found here

With mb2 it would be for example like:

mb2 –s ../rust.spec build

Hope this helps! Merry Christmas!

7 Likes