Cemu: Linux - Illegal instruction error
I’ve compiled Cemu
on Fedora 36 (and 37) according to the (gcc) instructions in the BUILD.md
guide.
When I execute the binary I receive the following error:
[leif.liddy@black cemu]$ ./Cemu
Illegal instruction (core dumped)
I’m still rockin a i7-3770K
which is pretty dated at this point. Going to upgrade when the Zen4 chips are released at the end of the month --but I figured this could help someone out who might be running into the same issue.
I believe this error is related age of this chip and the instruction sets it supports as the same Cemu
binary runs fine on my laptop with a more modern processor. I figured there must be a flag I can pass to cmake that enables all instruction subsets supported by my CPU. But I’m not sure how to do that…
Here are pertinent details:
GDB
(gdb) run
Starting program: /home/leif.liddy/programs/cemu/Cemu
....
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGILL, Illegal instruction.
0x00000000004e3451 in _GLOBAL__sub_I_rangeStore_ppcRanges ()
(gdb) bt
#0 0x00000000004e3451 in _GLOBAL__sub_I_rangeStore_ppcRanges ()
#1 0x00007ffff5df667e in call_init (env=<optimized out>, argv=0x7fffffffde68, argc=1) at ../csu/libc-start.c:145
#2 __libc_start_main_impl (main=0x4de400 <main>, argc=1, argv=0x7fffffffde68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde58) at ../csu/libc-start.c:368
#3 0x0000000000546a25 in _start ()
(gdb) display/i $pc
1: x/i $pc
=> 0x4e3451 <_GLOBAL__sub_I_rangeStore_ppcRanges+689>: vinserti128 $0x1,%xmm1,%ymm0,%ymm0
coredump
Storage: /var/lib/systemd/coredump/core.Cemu.1000.9d2fb048c3fe43919b2d12c9f3665568.510047.1662087909000000.zst (present)
Disk Size: 1012.6K
Message: Process 510047 (Cemu) of user 1000 dumped core.
Module /home/leif.liddy/programs/cemu/Cemu with build-id fe1ce8460a2cfd71d3239abab780d504b252fbe9
Stack trace of thread 510047:
#0 0x00000000004e3451 n/a (/home/leif.liddy/programs/cemu/Cemu + 0xe3451)
#1 0x00007f26292a167e __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2367e)
#2 0x0000000000546a25 n/a (/home/leif.liddy/programs/cemu/Cemu + 0x146a25)
ELF object binary architecture: AMD x86-64I be
cpu info
model name : Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts md_clear flush_l1d
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (10 by maintainers)
PR #80 seems to have introduced an
-mavx2
flag in filesrc/Cafe/CMakeLists.txt
which means the target CPU must have AVX2 extensions. Try removing it and recompile from a clean directory.