On 14 March 2017 at 16:51, Sameeh Jubran <[email protected]> wrote: > Hi all, > > I am trying to compile qemu-ga for Windows statically using the following > commands: > > ./configure --disable-docs --target-list=x86_64-softmmu > --cross-prefix=x86_64-w64-mingw32- --static --enable-guest-agent-msi > --with-vss-sdk=/path/to/VSSSDK72 > > make -j8 qemu-ga > > > And I keep getting this error: > > /home/sameeh/Builds/q/stubs/error-printf.c:7: undefined reference to > `__imp_g_test_config_vars' > collect2: error: ld returned 1 exit status > Makefile:444: recipe for target 'qemu-ga.exe' failed > make: *** [qemu-ga.exe] Error 1
My guess is that maybe some dependent library's pkg-config configuration for static builds is broken. We run into this from time to time, because most libraries don't get used in static builds very often and so getting the config wrong (forgetting to explicitly say that your library depends on some other library) is a bug that tends to not get found quickly. (For dynamic builds dependent libraries are implicitly pulled in.) You could try to see if you can find which library actually defines the missing symbol and whether supplying that -lwhatever on the command line causes the build to complete. Giving us the linker command line for the qemu-ga.exe would also be useful info (if you pass make V=1 it will print command lines). thanks -- PMM
