Comment 3 for bug 2029431

Revision history for this message
Michael Cook (mcook3102) wrote (last edit ):

I am ultimately looking for instructions on how to create a static qemu build to emulate RaspPi 3 on bullseye. Based on the work here https://github.com/lukechilds/dockerpi which runs ok for QEMU <=6.x.x for RaspPi 2,3.

I've noticed, libslirp0 should have the library file. (https://salsa.debian.org/qemu-team/libslirp/-/blob/master/debian/control#L13).

Including libslirp0 ubuntu package before building qemu doesn't seem to resolve the error...

From https://www.qemu.org/docs/master/devel/build-system.html - configuring qemu to produce statically linked executable for ARM target with slirp.

```
configure --static --disable-gio --enable-slirp --target-list=arm-softmmu,aarch64-softmmu
```
...
#0 332.4 [1990/3099] Linking target qemu-system-arm
#0 332.4 FAILED: qemu-system-arm
#0 332.4 c++ -m64 -mcx16 @qemu-system-arm.rsp
#0 332.4 /usr/bin/ld: cannot find -lslirp: No such file or directory
#0 332.4 collect2: error: ld returned 1 exit status
...
ERROR: failed to solve: process "/bin/sh -c ../qemu-${QEMU_VERSION}/configure --static --disable-gio --enable-slirp --target-list=arm-softmmu,aarch64-softmmu" did not complete successfully: exit code: 1
```

As original post implies, --enable-slirp=git (or system) are not supported any longer despite qemu and slirp documentation mentioning it. (https://gitlab.freedesktop.org/slirp/libslirp#building)