Compiling produces an executable non-usable on AMD64
Describe the bug making the source, produces a "./amiberry" executable which, executed on AMD cpu, does exit immediatly without no further information.
To Reproduce Steps to reproduce the behavior:
make clean
make PLATFORM=x86-64
Expected behavior Running "./amiberry" having amiberry executed.
Screenshots No execution, no screenshot (N/A)
Desktop (please complete the following information):
- OS: [e.g. iOS] Linux Mint 20.3
System: Kernel: 5.15.0-33-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 5.2.7
wm: muffin dm: LightDM Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal
Machine: Type: Laptop System: Micro-Star product: Modern 15 A5M v: REV:1.0 serial: <filter>
Chassis: type: 10 serial: <filter>
Mobo: Micro-Star model: MS-155L v: REV:1.0 serial: <filter>
UEFI: American Megatrends LLC. v: E155LAMS.108 date: 07/28/2021
Battery: ID-1: BAT1 charge: 36.3 Wh condition: 48.3/52.4 Wh (92%) volts: 11.6/11.4
model: MSI BIF0_9 serial: N/A status: Discharging
CPU: Topology: 8-Core model: AMD Ryzen 7 5700U with Radeon Graphics bits: 64 type: MT MCP
arch: Zen rev: 1 L2 cache: 4096 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 57490
Speed: 1397 MHz min/max: 1400/1800 MHz Core speeds (MHz): 1: 1489 2: 1413 3: 1397
4: 1397 5: 1397 6: 1397 7: 1397 8: 1397 9: 1484 10: 1397 11: 2060 12: 1879 13: 1802
14: 1520 15: 1397 16: 1397
Graphics: Device-1: AMD vendor: Micro-Star MSI driver: amdgpu v: kernel bus ID: 04:00.0
chip ID: 1002:164c
Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati unloaded: fbdev,modesetting,vesa
resolution: 1920x1080~60Hz
OpenGL: renderer: AMD RENOIR (DRM 3.42.0 5.15.0-33-generic LLVM 12.0.0)
v: 4.6 Mesa 21.2.6 direct render: Yes
Audio: Device-1: AMD driver: snd_hda_intel v: kernel bus ID: 04:00.1 chip ID: 1002:1637
Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Micro-Star MSI
driver: snd_rn_pci_acp3x v: kernel bus ID: 04:00.5 chip ID: 1022:15e2
Device-3: AMD Family 17h HD Audio vendor: Micro-Star MSI driver: snd_hda_intel
v: kernel bus ID: 04:00.6 chip ID: 1022:15e3
Sound Server: ALSA v: k5.15.0-33-generic
Network: Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus ID: 01:00.0
chip ID: 8086:2723
IF: wlp1s0 state: up mac: <filter>
IF-ID-1: docker0 state: down mac: <filter>
IF-ID-2: docker_gwbridge state: up speed: 10000 Mbps duplex: unknown mac: <filter>
IF-ID-3: veth181e5af state: up speed: 10000 Mbps duplex: full mac: <filter>
Drives: Local Storage: total: 535.67 GiB used: 376.14 GiB (70.2%)
ID-1: /dev/nvme0n1 vendor: Micron model: 2210 MTFDHBA512QFD size: 476.94 GiB
speed: 31.6 Gb/s lanes: 4 serial: <filter>
ID-2: /dev/sda type: USB vendor: SanDisk model: Cruzer Fit size: 58.73 GiB
serial: <filter>
Partition: ID-1: / size: 467.96 GiB used: 337.58 GiB (72.1%) fs: ext4 dev: /dev/nvme0n1p2
Sensors: System Temperatures: cpu: 47.0 C mobo: N/A gpu: amdgpu temp: 42 C
Fan Speeds (RPM): N/A
Repos: Active apt repos in: /etc/apt/sources.list
1: deb [arch=amd64] https: //repo.fortinet.com/repo/ubuntu/ /bionic multiverse
Active apt repos in: /etc/apt/sources.list.d/github-cli.list
1: deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https: //cli.github.com/packages stable main
Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
1: deb [arch=amd64] https: //dl.google.com/linux/chrome/deb/ stable main
Active apt repos in: /etc/apt/sources.list.d/microsoft-prod.list
1: deb [arch=amd64,arm64,armhf] https: //packages.microsoft.com/ubuntu/20.04/prod focal main
Active apt repos in: /etc/apt/sources.list.d/nodesource.list
1: deb [signed-by=/usr/share/keyrings/nodesource.gpg] https: //deb.nodesource.com/node_16.x focal main
2: deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https: //deb.nodesource.com/node_16.x focal main
Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
1: deb http: //packages.linuxmint.com una main upstream import backport #id:linuxmint_main
2: deb http: //archive.ubuntu.com/ubuntu focal main restricted universe multiverse
3: deb http: //archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
4: deb http: //archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
6: deb http: //archive.canonical.com/ubuntu/ focal partner
Active apt repos in: /etc/apt/sources.list.d/opera-stable.list
1: deb https: //deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
Active apt repos in: /etc/apt/sources.list.d/signal-xenial.list
1: deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https: //updates.signal.org/desktop/apt xenial main
Active apt repos in: /etc/apt/sources.list.d/slack.list
1: deb https: //packagecloud.io/slacktechnologies/slack/debian/ jessie main
Active apt repos in: /etc/apt/sources.list.d/teams.list
1: deb [arch=amd64] https: //packages.microsoft.com/repos/ms-teams stable main
Active apt repos in: /etc/apt/sources.list.d/teamviewer.list
1: deb https: //linux.teamviewer.com/deb stable main
Active apt repos in: /etc/apt/sources.list.d/vscode.list
1: deb [arch=amd64,arm64,armhf] http: //packages.microsoft.com/repos/code stable main
Info: Processes: 407 Uptime: 1h 03m Memory: 62.18 GiB used: 2.36 GiB (3.8%) Init: systemd
v: 245 runlevel: 5 Compilers: gcc: 10.3.0 alt: 10/9 Client: Unknown python3.8 client
inxi: 3.0.38
I've only been able to test this on Intel CPUs (though it should not matter) and on Debian, Ubuntu and Manjaro Linux distros, so far. Including an Ubuntu instance under WSL2, on Windows 10/11.
Theoretically it should work on all the other ones as well, but reality sometimes disagrees. :)
Do you have the possibility to test on another distro, temporarily? Just to see if that makes a difference. I'll see if I can set up a Linux Mint test environment as well, one of these days.
I have another machine with the same Linux Mint, but with an Intel CPU, there it goes smooth.
Here is the "strace" on the AMD machine: strace.stderr.txt.zip
@sblendorio Does the pre-compiled binary behave the same way also?
@sblendorio Does the pre-compiled binary behave the same way also? You can get that from the Releases page: https://github.com/midwan/amiberry/releases
Note: Sorry, just realized there isn't one for x86 in the 5.2 release (there will be in the next one)
@sblendorio In the meantime, try with the binary below? This was compiled on my WSL2 Ubuntu 22.04 distro, and it runs normally under that (on an intel i9): amiberry_x86-64.zip
Unfortunately I got different GLIBC version:
sblendorio@sblendorio-laptop:~/Downloads$ ./amiberry
./amiberry: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./amiberry)
./amiberry: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./amiberry)
./amiberry: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./amiberry)
./amiberry: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by ./amiberry)
sblendorio@sblendorio-laptop:~/Downloads$
@sblendorio
Could you try a debug build, and see if you get any more details while trying to run the binary?
You can add -DDEBUG=1 in the make parameters, to enable the DEBUG flag. Alternatively, you can edit the Makefile and uncomment it there also.
Make sure you do a make clean first, to remove any pre-existing objects!
This has been stale for quite a while now, and nobody else has been able to recreate it (to my knowledge). Therefore, I'm closing it for now. Feel free to provide more details if you get them.