Michael
Michael

Reputation: 2940

Cross-compiling static QEMU for Windows

I've been trying to compile a static QEMU executable for Windows on a Debian box, and ran into some problems. (I'm using this guide as a reference.)

When I compile without the static flag everything works but when I compile using the static flag I get the following error during the call to configure:

ERROR: zlib check failed
       Make sure to have the zlib libs and headers installed.

This is the command line:

WORK=/media/Work/qemu
cd $WORK/build/w32
(export PKG_CONFIG_PATH=$WORK/install/w32/lib/pkgconfig ; 
export PKG_CONFIG_PREFIX=$WORK/install/w32 ;
#export BASH_X=-x ;
bash $BASH_X ../../qemu.git/configure --target-list="i386-softmmu" \
--cross-prefix=i686-w64-mingw32- \
--extra-ldflags="-L$WORK/install/w32/lib" \
--extra-cflags="-I$WORK/install/w32/include" \
--static \
)

Upvotes: 2

Views: 2343

Answers (1)

pavo kristiani
pavo kristiani

Reputation: 35

You can disable the zlib test using the command line input

./configure --disable-zlib-test

Zlib will be needed to build qemu, but it will not test for the library during configure. If the library is available in the proper location during build process, you can try the above command to proceed.

Upvotes: 2

Related Questions