Bug 756258 - cannot build qemu with "--static" configure option
cannot build qemu with "--static" configure option
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Justin M. Forbes
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-11-22 22:58 EST by Mr-4
Modified: 2013-01-09 06:57 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-11-23 06:35:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mr-4 2011-11-22 22:58:21 EST
Description of problem:
Any attempt to build qemu with the "--static" configure option fails. I get an error, similar to this one:

/usr/bin/ld: cannot find -lssl3

It seems to be caused by pkg-config - for details see http://permalink.gmane.org/gmane.linux.mandrake.cooker.devel/313068

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. ./configure --target-list="x86_64-softmmu arm-softmmu x86_64-linux-user arm-linux-user armeb-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --static
2. make V=1
Actual results:
gcc -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing  -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -I/home/gogo/rpmbuild/BUILD/qemu-kvm-0.15.1/libcacard -I/usr/include/nss3 -I/usr/include/nspr4      -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -I qapi-generated -O2 -g  -Wl,--warn-common -m64 -static -g  -o qemu-ga qemu-ga.o qga/guest-agent-command-state.o qga/guest-agent-commands.o qemu-tool.o qemu-error.o error.o osdep.o oslib-posix.o qemu-thread-posix.o trace.o cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o async.o nbd.o block.o aio.o aes.o qemu-config.o qemu-progress.o qemu-sockets.o posix-aio-compat.o compatfd.o block/raw.o block/cow.o block/qcow.o block/vdi.o block/vmdk.o block/cloop.o block/dmg.o block/bochs.o block/vpc.o block/vvfat.o block/qcow2.o block/qcow2-refcount.o block/qcow2-cluster.o block/qcow2-snapshot.o block/qcow2-cache.o block/qed.o block/qed-gencb.o block/qed-l2-cache.o block/qed-table.o block/qed-cluster.o block/qed-check.o block/parallels.o block/nbd.o block/blkdebug.o block/sheepdog.o block/blkverify.o block/raw-posix.o qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o qjson.o json-lexer.o json-streamer.o json-parser.o qerror.o qapi/qapi-visit-core.o qapi/qmp-input-visitor.o qapi/qmp-output-visitor.o qapi/qapi-dealloc-visitor.o qapi/qmp-registry.o qapi/qmp-dispatch.o qemu-timer-common.o qapi-generated/qga-qapi-visit.o qapi-generated/qga-qapi-types.o qapi-generated/qga-qmp-marshal.o -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl   -lrt -pthread  -lusbredirparser   -lz -lglib-2.0   
/usr/bin/ld: cannot find -lssl3
collect2: ld returned 1 exit status
make: *** [qemu-ga] Error 1

Expected results:
make to pass without errors

Additional info:
Currently there is no way I could build QEMU-[arch]-static executable - at least not without reverting to some hideous hacks! The -static version if QEMU is very useful in environments where dynamic linking is not possible (chroot for a different arch for example), thus enabling qemu to compile/build statically is important.
Comment 1 Daniel Berrange 2011-11-23 06:35:57 EST
The error shows you are missing the libssl3 library, which is not a QEMU bug. In addition the Fedora tracker is not the place to report problems with re-compiling QEMU yourself, rather for usage of provided Fedora QEMU RPMs. If you have problems compiling QEMU, it is best to take questions to the upstream QEMU mailing list where they can provide developer support.

Note You need to log in before you can comment on or make changes to this bug.