summary refs log tree commit diff stats
path: root/gitlab/issues/target_missing/host_riscv/accel_missing/2041.toml
blob: c4437749e0c7abb8322923da29a2780d944026d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
id = 2041
title = "RISC-V KVM build error with Alpine Linux"
state = "closed"
created_at = "2023-12-18T15:48:26.424Z"
closed_at = "2023-12-26T14:14:36.030Z"
labels = ["Stable::to backport", "host: riscv", "hostos: Linux", "workflow::Patch available"]
url = "https://gitlab.com/qemu-project/qemu/-/issues/2041"
host-os = "Alpine linux edge"
host-arch = "riscv64"
qemu-version = "8.1.3"
guest-os = "n/a"
guest-arch = "n/a"
description = """Native build of qemu fails on alpine linux riscv64."""
reproduce = """1. install alpine on riscv or set up a container with qemu-riscv64
2. build qemu 8.1.3 from source
3."""
additional = """```
kvm.c:(.text+0xc50): undefined reference to `strerrorname_np'                                       
/usr/lib/gcc/riscv64-alpine-linux-musl/13.2.1/../../../../riscv64-alpine-linux-musl/bin/ld: libqemu-riscv64-softmmu.fa.p/target_riscv_kvm.c.o: in function `.L0 ':                                           
kvm.c:(.text+0xcda): undefined reference to `strerrorname_np'
/usr/lib/gcc/riscv64-alpine-linux-musl/13.2.1/../../../../riscv64-alpine-linux-musl/bin/ld: libqemu-riscv64-softmmu.fa.p/target_riscv_kvm.c.o: in function `.L111':                                          
kvm.c:(.text+0xd02): undefined reference to `strerrorname_np'  
```

The `strerrorname_np` is a GNU specific non-portable function (that what _np stands for). This is the only place where it is use in the entire qemu codebase:
```
$ rg strerrorname_np
target/riscv/kvm/kvm-cpu.c
837:                             strerrorname_np(errno));
899:                     strerrorname_np(errno));
909:                     strerrorname_np(errno));
932:                         strerrorname_np(errno));
```

Seems like other places uses `strerror(errno)`."""