id = 2510 title = "Cross compiling tools / qemu-img results in \"ninja: no work to do\"" state = "closed" created_at = "2024-08-17T09:13:19.318Z" closed_at = "2024-08-19T05:56:22.707Z" labels = [] url = "https://gitlab.com/qemu-project/qemu/-/issues/2510" host-os = "Fedora 40 (build container, in Docker)" host-arch = "n/a" qemu-version = "ecdfa31beb1f7616091bedba79dfdf9ee525ed9d" guest-os = "n/a" guest-arch = "n/a" description = """I have the following Dockerfile setting up a cross-compile environment for QEMU. I am trying to build qemu-img.exe only at the moment ``` FROM fedora as builder RUN --mount=type=cache,target=/var/cache \\ dnf -v install --assumeyes strace gcc make mingw64-gcc mingw64-binutils python-setuptools meson mingw64-glib2-static mingw64-glib2 diffutils FROM builder as qemu-builder WORKDIR /src/qemu #assuming qemu source tree is already available at /src/qemu RUN RUN ./configure --cross-prefix=x86_64-w64-mingw32- --target-list='' --static RUN make V=1 tools ``` With either `make tools` or `make qemu-img.exe` I get ``` #10 0.265 changing dir to build for make "tools"... #10 0.267 make[1]: Entering directory '/src/qemu/build' #10 0.330 ninja: no work to do. #10 0.331 { \\ #10 0.331 echo 'ninja-targets = \\'; \\ #10 0.331 /usr/bin/ninja -t targets all | sed 's/:.*//; $!s/$/ \\\\/'; \\ #10 0.331 echo 'build-files = \\'; \\ #10 0.331 /usr/bin/ninja -t query build.ninja | sed -n '1,/^ input:/d; /^ outputs:/q; s/$/ \\\\/p'; \\ #10 0.331 } > Makefile.ninja.tmp && mv Makefile.ninja.tmp Makefile.ninja #10 0.363 /src/qemu/build/pyvenv/bin/meson introspect --targets --tests --benchmarks | /src/qemu/build/pyvenv/bin/python3 -B scripts/mtest2make.py > Makefile.mtest #10 0.634 make[1]: Nothing to be done for 'tools'. #10 0.634 make[1]: Leaving directory '/src/qemu/build' #10 DONE 0.6s ``` Following the info in `make help`, I tried `make qemu-img.o` which resulted in ``` cc -c -o qemu-img.o qemu-img.c qemu-img.c:25:10: fatal error: qemu/osdep.h: No such file or directory 25 | #include "qemu/osdep.h" | ^~~~~~~~~~~~~~ ```""" reproduce = "n/a" additional = """"""