1

Ubuntu 22.10 (amd64) cannot execute any x32 binaries on my freshly installed computer (x32: x32-ABI, see https://en.wikipedia.org/wiki/X32_ABI). Example program helloworld.c:

#include <stdio.h>                                                                                                                                                                                                                                                                          
int main(argv) { printf("Hello World.\n"); }

The resulting binary fails as follows (also if the binary was produced on older Ubuntu versions):

# gcc-12 -mx32 -o helloworld helloworld.c
# ./helloworld
-bash: ./helloworld: cannot execute binary file: Exec format error

If I try the resulting binary on 22.04 or any older Ubuntu version, it works as expected. My foreign architectures look fine:

# dpkg --print-foreign-architectures
i386

Is there a relevant change from 22.04 to 22.10?

Sven
  • 179
  • The official update info. https://ubuntu.com/blog/whats-new-in-ubuntu-desktop-22-10-kinetic-kudu – David Oct 25 '22 at 07:04
  • @David Thanks. But I can't find any mentions of x32? Do you mean any linked reference? – Sven Oct 25 '22 at 07:25
  • Which means no one on this site most likely knows. I suggest you file a bug report. https://ubuntu.com/blog/the-keys-to-successful-bug-reporting – David Oct 25 '22 at 07:27

1 Answers1

1

I experimented with different kernel versions and checked their /boot/config-... files. Ubuntu has removed the kernel option CONFIG_X86_X32 in the 5.19 kernel of Ubuntu 22.10 (the mainline kernel ppa shows the same for versions 5.17, 5.18, 6.0). Hence, x32 binaries cannot be run from 5.17 on and Ubuntu 22.10 has a 5.19 kernel. That is a pity.

I filed a bug on launchpad against the kernel package: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1994516

Unfortunately, this bug is marked as "Won't Fix". So, we will switch our compute cluster to another Linux distribution.

Sven
  • 179
  • If I'm not mistaken, there are no kernel packages for 6.0 in Ubuntu yet so there is nothing worth reporting here for "6.0". The latest kernel as you indicated is 5.19, and nothing has 6.0 kernels yet. Your question for 'alternative kernels' is not an answer, though, and was removed because the rest of your answer is in fact an answer. – Thomas Ward Oct 31 '22 at 17:50