On 16 January 2015 at 11:54, lux-integ <[email protected]> wrote: > Dear qemuers, > > I am new to this list. I am trying to compile qemu-2.2.0 statically > My System has these: > GCC-4.8.1, linux-3.10.61. I configure qemu-2.2.0 with the following > switches:-
The static build is only really supported for use with the linux-user and bsd-user targets. It might build the softmmu emulators, but we don't guarantee it (or that it will work once compiled), and it definitely isn't tested with all the random extra library options. Often the library dependencies themselves don't support static linking. (glibc in particular is not very happy with being statically linked.) That said, below are some tips that may point you in the right direction if you're sufficiently comfortable with prodding about in configure and build systems to try to fix things up yourself... > #------------- for SDL-1.2.15 > --- with the latter two switches the configure script reports > [ cannot find SDL please install SDL-devel ] although all the libraries > and binaries for SDL are installed. This usually means you have the dev package for the dynamic library but not the static library. Sometimes it means that the dependency's pkg-config information is broken for static compilation. Best bet to find out what's going on is to look at what commands configure is running to test for presence of the library, and see what they do. > #------------- for libssh2-1.4.1 > > building with the "--enable-libssh2" switch yields > /opt/qemu/lib/libssh2.a(mac.o): In function `mac_method_hmac_sha1_hash': > mac.c:(.text+0x272): undefined reference to `gcry_md_open' > mac.c:(.text+0x289): undefined reference to `gcry_md_setkey' > mac.c:(.text+0x29b): undefined reference to `gcry_md_write' > mac.c:(.text+0x2ab): undefined reference to `gcry_md_write' > mac.c:(.text+0x2ba): undefined reference to `gcry_md_get_algo' > mac.c:(.text+0x2c1): undefined reference to `gcry_md_get_algo_dlen' > mac.c:(.text+0x2cf): undefined reference to `gcry_md_read' > mac.c:(.text+0x2e6): undefined reference to `gcry_md_close' > mac.c:(.text+0x315): undefined reference to `gcry_md_write' > /opt/qemu/lib/libssh2.a(crypt.o): In function `crypt_dtor': > crypt.c:(.text+0x1e): undefined reference to `gcry_cipher_close' > collect2: error: ld returned 1 exit status This looks like it means "the ssh2 library depends on some other library, but its pkg-config information is broken for static compilation and doesn't list the dependent library". (For dynamic linking the dynamic linker will pull in dependencies of dependencies, but for static linking they all need to be listed on the link command line.) Fix the ssh2 pkg info or fudge it. thanks -- PMM
