Hi,
there's some instruction failure on the tiny Milk-V board. I suppose whatever builder Alpine uses has an instruction that the CPU in the Milk-V doesn't.
You'll encounter like this:
milkv-duo:/etc/etckeeper# clang-16
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang-16
1. Compilation construction
Illegal instruction
It's not related to clang though, as you'll see here:
milkv-duo:~# cmake
Usage
cmake [options] <path-to-source>
[...]
Run 'cmake --help' for more information.
Illegal instruction
The failing instruction looks like this:
[77733.086004] cmake[3462]: unhandled signal 4 code 0x1 at 0x0000002ac83d34c8 in cmake[2ac8299000+940000]
[77733.096046] CPU: 0 PID: 3462 Comm: cmake Tainted: GF O 5.10.4-tag- #1
[77733.104202] epc: 0000002ac83d34c8 ra : 0000002ac83d34c8 sp : 0000003ffff13e20
[77733.111665] gp : 0000002ac8bf77f0 tp : 0000003fde6a1d98 t0 : 00000000422d0000
[77733.119165] t1 : 0000003fde69f8c0 t2 : 0000000000000030 s0 : 0000003fddcdc9d0
[77733.126656] s1 : 0000003fddce3ad0 a0 : 0000003fddcdca18 a1 : 0000000000000005
[77733.134144] a2 : 0000000000000000 a3 : 0000000000000020 a4 : 0000003fddcdca18
[77733.141633] a5 : 0000003fddcdc9d0 a6 : 000000003fffffff a7 : 0000002ac8c0da5c
[77733.149121] s2 : 0000003fddce3b20 s3 : ffffffffffffffff s4 : 0000003fddcdc440
[77733.156609] s5 : 0000000000000011 s6 : 0000003fddcd6070 s7 : 0000003fddcd6538
[77733.164097] s8 : 0000003fddcd60b8 s9 : 0000000000000230 s10: 0000003fde6a1888
[77733.171586] s11: 0000002ad9bca478 t3 : 0000003fde62bd5e t4 : 0000000000000000
[77733.179073] t5 : 0000000000000069 t6 : 0000000061700000
[77733.184590] status: 8000000201804020 badaddr: 000000008330000f cause: 0000000000000002
I looked at the ISA manual but don't understand how to decode it into an instruction.
First time I could have made use of this stuff I learned in school but it's been ~25 years now ;-)
Also, I don't know what I'd have to do afterwards.
I understand I can probably just bootstrap all packages in cross compiling via their sdk, making sure whatever instruction or memory fencing-thing isn't used.
But that'd leave a gap open in upstream. And also, I have no idea how to find out afterwards *what* I needed to exclude.
A footnote is that this is still running a vendor kernel, they're in the progress of upstreaming all their drivers, but i think it's only 20% accepted in upstream, so far.
milkv-duo:~# uname -a
Linux milkv-duo 5.10.4-tag- #1 PREEMPT Tue Oct 24 10:20:29 UTC 2023 riscv64 Linux
Is there anything I can provide to help make this fully supported?
I can put the little thing in a DMZ for remote tinkering or sponsor one...
Best wishes,
Florian