* [Qemu-devel] cannot build qemu with "--static" configure option
@ 2011-11-23 12:58 Mr Dash Four
2011-11-23 14:10 ` Paolo Bonzini
2011-11-23 14:18 ` Peter Maydell
0 siblings, 2 replies; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 12:58 UTC (permalink / raw)
To: qemu-devel
I am trying to build a static version of the qemu-[arch] executables to
be used in chrooted environment for the target arch (which is different
from the host). My configure is:
./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
then "make V=1". It fails with the following error:
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
It would indicate a missing libssl3, but the library, as far as I can
see, is there! When I try building this without the "--static" option
all is well - the build succeeds without any hitches. What could be the
problem with this, what am I missing?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 12:58 [Qemu-devel] cannot build qemu with "--static" configure option Mr Dash Four
@ 2011-11-23 14:10 ` Paolo Bonzini
2011-11-23 14:15 ` Mr Dash Four
2011-11-23 14:18 ` Peter Maydell
1 sibling, 1 reply; 43+ messages in thread
From: Paolo Bonzini @ 2011-11-23 14:10 UTC (permalink / raw)
To: qemu-devel
On 11/23/2011 01:58 PM, Mr Dash Four wrote:
> It would indicate a missing libssl3, but the library, as far as I can
> see, is there! When I try building this without the "--static" option
> all is well - the build succeeds without any hitches. What could be the
> problem with this, what am I missing?
Perhaps you lack a static version of the library.
Paolo
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 14:10 ` Paolo Bonzini
@ 2011-11-23 14:15 ` Mr Dash Four
2011-11-23 15:24 ` Paolo Bonzini
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 14:15 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
>> It would indicate a missing libssl3, but the library, as far as I can
>> see, is there! When I try building this without the "--static" option
>> all is well - the build succeeds without any hitches. What could be the
>> problem with this, what am I missing?
>
> Perhaps you lack a static version of the library.
What do you mean by that? The *.la files? I wasn't aware that there are
any...
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 12:58 [Qemu-devel] cannot build qemu with "--static" configure option Mr Dash Four
2011-11-23 14:10 ` Paolo Bonzini
@ 2011-11-23 14:18 ` Peter Maydell
2011-11-23 14:39 ` Mr Dash Four
1 sibling, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 14:18 UTC (permalink / raw)
To: Mr Dash Four; +Cc: qemu-devel
On 23 November 2011 12:58, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
> I am trying to build a static version of the qemu-[arch] executables to be
> used in chrooted environment for the target arch (which is different from
> the host). My configure is:
>
> ./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
>
> then "make V=1". It fails with the following error:
You're trying to build the -softmmu targets with --static here too
(which means we try to compile a bunch of things that were never intended
to be run as static executables that way).
You're probably better off doing two separate configure and build
runs, one with just the -linux-user targets and --static, and the other
with just the -softmmu targets (and no --static).
Having said that, building arm-softmmu with --static works for me:
which version of QEMU are you trying to build? (we might have fixed
this in the 1.0 release candidate, so that's worth testing.)
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 14:18 ` Peter Maydell
@ 2011-11-23 14:39 ` Mr Dash Four
0 siblings, 0 replies; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 14:39 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
>> ./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
>>
>> then "make V=1". It fails with the following error:
>>
>
> You're trying to build the -softmmu targets with --static here too
> (which means we try to compile a bunch of things that were never intended
> to be run as static executables that way).
>
I see, noted!
> You're probably better off doing two separate configure and build
> runs, one with just the -linux-user targets and --static, and the other
> with just the -softmmu targets (and no --static).
>
In other words:
1. ./configure --target-list="x86_64-linux-user arm-linux-user
armeb-linux-user" --disable-kvm --disable-strip --disable-xen
--disable-spice --disable-werror --static && make V=1
2. ./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 && make V=1
> Having said that, building arm-softmmu with --static works for me:
> which version of QEMU are you trying to build? (we might have fixed
> this in the 1.0 release candidate, so that's worth testing.)
>
OK, this is the problem I am facing: I have quad core machine with
Fedora Core on it. I am using debootstrap (Fedora's own package!) to
build chrooted environment for arm using binfmt_misc's unique
capabilities to point to a statically-built qemu-arm to be used when
debootstrap executes various arm-based binaries in the chrooted environment.
Now, in *all* Fedora-supplied QEMU packages there are no
statically-built executables, just qemu-[arch] and qemu-[arch]-system -
both of which are dynamically linked. That is of no use to me whatsoever
because when deboostrap chroots to the arm-based root the libraries qemu
needs in order to run won't be there!
So, what I am trying to do is build static qemu - "qemu-arm-static",
which is "self-contained" and by placing it in my arm-based chroot and
configuring binfmt_misc (via /proc/sys) to point to it, this would allow
debootstrap to do its work without problems.
It is worth noting that Debian have such statically-linked qemu package
already (the package is called qemu-user-static if I am not mistaken),
but when I use Debian's own qemu-arm-static for my host arch - x86_64, I
get a very weird errors during debootstrap, so I am trying to build a
"native" (i.e. Fedora-based) qemu static to see if I get the same error
in order to isolate the problem.
I have tried to build/implement this by tweaking the source rpm (the
.spec file in particular) which comes with the latest QEMU version
distributed by Fedora (0.15-2 if I am not mistaken), but there are so
many ugly hacks in there, that I soon abandoned this idea and thought it
would be easier if I just unpack the source archive, apply the
Fedora-supplied patches and manually execute my custom ./configure and
then "make" so that I end up with qem-arm-static (or similarly-named
executable file) and use this instead.
The problem I am having, as evident from my initial post, is that ld is
going mad about "missing" libraries, even though the build succeeds if I
remove the "--static" option. I will try what you have suggested to see
if it works, but I wanted to know whether I am doing something
fundamentally wrong here... I appreciate your input Peter!
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 14:15 ` Mr Dash Four
@ 2011-11-23 15:24 ` Paolo Bonzini
2011-11-23 15:41 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Paolo Bonzini @ 2011-11-23 15:24 UTC (permalink / raw)
To: Mr Dash Four; +Cc: qemu-devel
On 11/23/2011 03:15 PM, Mr Dash Four wrote:
>>> It would indicate a missing libssl3, but the library, as far as I can
>>> see, is there! When I try building this without the "--static" option
>>> all is well - the build succeeds without any hitches. What could be the
>>> problem with this, what am I missing?
>>
>> Perhaps you lack a static version of the library.
> What do you mean by that? The *.la files? I wasn't aware that there are
> any...
I mean lib*.a files. They are needed if you specify static, by definition.
Paolo
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 15:24 ` Paolo Bonzini
@ 2011-11-23 15:41 ` Mr Dash Four
2011-11-23 18:00 ` Paolo Bonzini
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 15:41 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
>>> Perhaps you lack a static version of the library.
>> What do you mean by that? The *.la files? I wasn't aware that there are
>> any...
>
> I mean lib*.a files. They are needed if you specify static, by
> definition.
Hmm, this opens a huge Pandora's box for me - in my own distribution
(Fedora) the "nss" package (which I have installed) provides
/usr/lib64/libssl3.so, but not libssl3.a. "nss-devel" (which I also have
installed) provides all the relevant /include files (headers and the
like), but there is no libssl3.a there either! There is no package
called "nss-devel-static" distributed by Fedora and the only ".a" files
produced by compiling the nss source are libcrmf.a libnssb.a and
libnssckfw.a - no libssl3.a at all. So, where do I get this?
Also, assuming libssl3 is not the only one, ld will probably complain
that there are other ".a" files missing from various other packages
which are probably not present in my host machine. If that is the case,
this is an absolute nightmare to have to deal with! Where do I get these
files? Thanks for your input Paolo.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 15:41 ` Mr Dash Four
@ 2011-11-23 18:00 ` Paolo Bonzini
2011-11-23 18:28 ` Peter Maydell
2011-11-23 18:34 ` Mr Dash Four
0 siblings, 2 replies; 43+ messages in thread
From: Paolo Bonzini @ 2011-11-23 18:00 UTC (permalink / raw)
To: Mr Dash Four; +Cc: qemu-devel
On 11/23/2011 04:41 PM, Mr Dash Four wrote:
>>
> Hmm, this opens a huge Pandora's box for me - in my own distribution
> (Fedora) the "nss" package (which I have installed) provides
> /usr/lib64/libssl3.so, but not libssl3.a. "nss-devel" (which I also have
> installed) provides all the relevant /include files (headers and the
> like), but there is no libssl3.a there either! There is no package
> called "nss-devel-static" distributed by Fedora and the only ".a" files
> produced by compiling the nss source are libcrmf.a libnssb.a and
> libnssckfw.a - no libssl3.a at all. So, where do I get this?
You don't. Fedora does not package static libraries. Just don't use
the option on Linux, it makes (a little) sense only on Windows to get a
monolithic, redistributable qemu.exe.
Paolo
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 18:00 ` Paolo Bonzini
@ 2011-11-23 18:28 ` Peter Maydell
2011-11-23 18:33 ` Mr Dash Four
2011-11-23 18:34 ` Mr Dash Four
1 sibling, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 18:28 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Mr Dash Four, qemu-devel
On 23 November 2011 18:00, Paolo Bonzini <pbonzini@redhat.com> wrote:
> You don't. Fedora does not package static libraries. Just don't use the
> option on Linux, it makes (a little) sense only on Windows to get a
> monolithic, redistributable qemu.exe.
It's also important for building linux-user targets so you can
put them in chroots. Luckily linux-user doesn't link against
quite so much of the world as the whole-system qemu binary...
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 18:28 ` Peter Maydell
@ 2011-11-23 18:33 ` Mr Dash Four
2011-11-23 18:36 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 18:33 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, qemu-devel
>> You don't. Fedora does not package static libraries. Just don't use the
>> option on Linux, it makes (a little) sense only on Windows to get a
>> monolithic, redistributable qemu.exe.
>
> It's also important for building linux-user targets so you can
> put them in chroots. Luckily linux-user doesn't link against
> quite so much of the world as the whole-system qemu binary...
My thoughts exactly! Without having static qemu built I simply can't use it for the purpose I stated in my previous post. FYI Peter, I just tried to build qemu with only the -user targets - unsuccessfully - exactly the same error as before -lssl3 cannot be found.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 18:00 ` Paolo Bonzini
2011-11-23 18:28 ` Peter Maydell
@ 2011-11-23 18:34 ` Mr Dash Four
1 sibling, 0 replies; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 18:34 UTC (permalink / raw)
To: qemu-devel
>> >> So, where do I get this?
> >
> > You don't. Fedora does not package static libraries. Just don't use
> > the option on Linux, it makes (a little) sense only on Windows to get a
> > monolithic, redistributable qemu.exe.
So, what you are suggesting above is that qemu-[arch]-static cannot be build on Linux? I mean, you can't be serious, really?!
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 18:33 ` Mr Dash Four
@ 2011-11-23 18:36 ` Peter Maydell
2011-11-23 18:42 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 18:36 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Paolo Bonzini, qemu-devel
On 23 November 2011 18:33, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
> FYI Peter, I just tried to build qemu with only the -user targets -
> unsuccessfully - exactly the same error as before -lssl3 cannot be found.
Can you retry this with one of the 1.0 release candidates
or current head-of-git, please?
(when I do a static build it doesn't try to link against ssl3.)
thanks
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 18:36 ` Peter Maydell
@ 2011-11-23 18:42 ` Mr Dash Four
2011-11-23 18:47 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 18:42 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, qemu-devel
> Can you retry this with one of the 1.0 release candidates
> or current head-of-git, please?
OK, I'll try with 1.0-rc3, but before that just a quick query - I use the Fedora source rpm as a basis and do "rpmbuild -bp qemu.spec" to prepare the source. This, according to the said .spec file, applies the following patches (by Fedora, not me):
Patch01: 0001-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch
Patch02: 0002-char-Add-a-QemuChrHandlers-struct-to-initialise-char.patch
Patch03: 0003-iohandlers-Add-enable-disable_write_fd_handler-funct.patch
Patch04: 0004-char-Add-framework-for-a-write-unblocked-callback.patch
Patch05: 0005-char-Update-send_all-to-handle-nonblocking-chardev-w.patch
Patch06: 0006-char-Equip-the-unix-tcp-backend-to-handle-nonblockin.patch
Patch07: 0007-char-Throttle-when-host-connection-is-down.patch
Patch08: 0008-virtio-console-Enable-port-throttling-when-chardev-i.patch
Patch09: 0009-spice-qemu-char.c-add-throttling.patch
Patch10: 0010-spice-qemu-char.c-remove-intermediate-buffer.patch
Patch11: 0011-usb-redir-Add-flow-control-support.patch
Patch12: 0012-spice-add-worker-wrapper-functions.patch
Patch13: 0013-spice-add-qemu_spice_display_init_common.patch
Patch14: 0014-spice-qxl-move-worker-wrappers.patch
Patch15: 0015-qxl-fix-surface-tracking-locking.patch
Patch16: 0016-qxl-add-io_port_to_string.patch
Patch17: 0017-qxl-error-handling-fixes-and-cleanups.patch
Patch18: 0018-qxl-make-qxl_guest_bug-take-variable-arguments.patch
Patch19: 0019-qxl-only-disallow-specific-io-s-in-vga-mode.patch
Patch20: 0020-qxl-async-io-support-using-new-spice-api.patch
Patch21: 0021-qxl-add-QXL_IO_FLUSH_-SURFACES-RELEASE-for-guest-S3-.patch
Patch22: 0022-qxl-bump-pci-rev.patch
Patch23: 0023-virtio-serial-bus-replay-guest_open-on-migration.patch
Patch24: 0024-qemu-char-make-qemu_chr_event-public.patch
Patch25: 0025-spice-qemu-char-Generate-chardev-open-close-events.patch
Patch26: 0026-usb-redir-Call-qemu_chr_guest_open-close.patch
Patch27: 0027-usb-redir-Device-disconnect-re-connect-robustness-fi.patch
Patch28: 0028-usb-redir-Don-t-try-to-write-to-the-chardev-after-a-.patch
I am almost certain that the majority of these will fail with the new source, so I'll try to build without those. Is that OK?
> (when I do a static build it doesn't try to link against ssl3.)
Interesting. I'll do a "vanilla" build (with no patches applied) and see how it goes, unless you have something else in mind?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 18:42 ` Mr Dash Four
@ 2011-11-23 18:47 ` Peter Maydell
2011-11-23 19:02 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 18:47 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Paolo Bonzini, qemu-devel
On 23 November 2011 18:42, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
>> Can you retry this with one of the 1.0 release candidates
>> or current head-of-git, please?
> OK, I'll try with 1.0-rc3, but before that just a quick query - I use the
> Fedora source rpm as a basis and do "rpmbuild -bp qemu.spec" to prepare
> the source. This, according to the said .spec file, applies the following
> patches (by Fedora, not me):
[skip long list]
> I am almost certain that the majority of these will fail with the new source,
> so I'll try to build without those. Is that OK?
I expect so. I have no idea what the Fedora patches are but if upstream's
sources don't work without needing extra patches that's what we care about.
> Interesting. I'll do a "vanilla" build (with no patches applied) and see
> how it goes, unless you have something else in mind?
Sonuds like a good plan.
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 18:47 ` Peter Maydell
@ 2011-11-23 19:02 ` Mr Dash Four
2011-11-23 19:16 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 19:02 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, qemu-devel
> Sonuds like a good plan.
Nope, same error as before:
/usr/bin/ld: cannot find -lssl3
collect2: ld returned 1 exit status
The source was unpacked, I disabled all the patches in that .spec file, ran "rpmbuild -bp qemu.spec", then manually went to that directory (BUILD/qemu-1.0-rc3) and typed "./configure --target-list="x86_64-linux-user arm-linux-user armeb-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --static", followed by "make V=1".
I get exactly the same result if I just unpack the source and run ./configure & then make (not going through the rpmbuild source "preparation"), so something is definitely amiss!
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:02 ` Mr Dash Four
@ 2011-11-23 19:16 ` Peter Maydell
2011-11-23 19:22 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 19:16 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Paolo Bonzini, qemu-devel
On 23 November 2011 19:02, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
>
>> Sonuds like a good plan.
> Nope, same error as before:
> /usr/bin/ld: cannot find -lssl3
> collect2: ld returned 1 exit status
Which binary are we trying to link when we fail?
> I get exactly the same result if I just unpack the source and run ./configure &
> then make (not going through the rpmbuild source "preparation"), so something is
> definitely amiss!
OK. We don't explicitly try to link with ssl3 ourselves, so this only
ever ends up in LDFLAGS because of some other library that has claimed
it needs it as a dependency via pkg-config. Try adding
--disable-sdl --disable-vnc --disable-bluez --disable-check-utests
--disable-smartcard --disable-usb-redir
to your configure argument. That turns off a lot of stuff that's irrelevant
for linux-user and which might be pulling in this library. If that works
then you can identify which particular switch is needed by process of
elimination.
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:16 ` Peter Maydell
@ 2011-11-23 19:22 ` Mr Dash Four
2011-11-23 19:33 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 19:22 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, qemu-devel
> Which binary are we trying to link when we fail?
This is where it all fails:
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/mr-4/qemu-1.0-rc3/libcacard -I/usr/include/nss3 -I/usr/include/nspr4 -I../linux-headers -I.. -I/home/mr-4/qemu-1.0-rc3/target-i386 -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/mr-4/qemu-1.0-rc3/linux-user/x86_64 -I/home/mr-4/qemu-1.0-rc3/linux-user -O2 -g -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld -Wl,-T,/home/mr-4/qemu-1.0-rc3/x86_64.ld -o qemu-x86_64 ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-ru
ntime.o ../libuser/trace.o ../libuser/trace/control.o ../libuser/trace/default.o cpu-exec.o cpu-uname.o cpuid.o disas.o elfload.o exec.o fpu/softfloat.o gdbstub.o helper.o ioport-user.o linuxload.o main.o mmap.o op_helper.o osdep.o oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lrt -pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lusbredirparser -lm
/usr/bin/ld: cannot find -lssl3
collect2: ld returned 1 exit status
make[1]: *** [qemu-x86_64] Error 1
make[1]: Leaving directory `/home/mr-4/qemu-1.0-rc3/x86_64-linux-user'
make: *** [subdir-x86_64-linux-user] Error 2
> OK. We don't explicitly try to link with ssl3 ourselves, so this only
> ever ends up in LDFLAGS because of some other library that has claimed
> it needs it as a dependency via pkg-config. Try adding
> --disable-sdl --disable-vnc --disable-bluez --disable-check-utests
> --disable-smartcard --disable-usb-redir
>
> to your configure argument. That turns off a lot of stuff that's irrelevant
> for linux-user and which might be pulling in this library. If that works
> then you can identify which particular switch is needed by process of
> elimination.
Different error this time:
./configure --target-list="x86_64-linux-user arm-linux-user armeb-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --static --disable-sdl --disable-vnc --disable-bluez --disable-check-utests --disable-smartcard --disable-usb-redir
make V=1
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../linux-headers -I.. -I/home/mr-4/qemu-1.0-rc3/target-i386 -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/mr-4/qemu-1.0-rc3/linux-user/x86_64 -I/home/mr-4/qemu-1.0-rc3/linux-user -O2 -g -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld -Wl,-T,/home/mr-4/qemu-1.0-rc3/x86_64.ld -o qemu-x86_64 ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-runtime.o ../libuser/trace.o ../libuser/trace/control.o ../libuser/trace/default.
o cpu-exec.o cpu-uname.o cpuid.o disas.o elfload.o exec.o fpu/softfloat.o gdbstub.o helper.o ioport-user.o linuxload.o main.o mmap.o op_helper.o osdep.o oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt -pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lusbredirparser -lm
/usr/bin/ld: cannot find -lgthread-2.0
collect2: ld returned 1 exit status
make[1]: *** [qemu-x86_64] Error 1
make[1]: Leaving directory `/home/mr-4/qemu-1.0-rc3/x86_64-linux-user'
make: *** [subdir-x86_64-linux-user] Error 2
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:22 ` Mr Dash Four
@ 2011-11-23 19:33 ` Peter Maydell
2011-11-23 19:50 ` Mr Dash Four
2011-11-24 12:26 ` Alon Levy
0 siblings, 2 replies; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 19:33 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Paolo Bonzini, qemu-devel
On 23 November 2011 19:22, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
>
>> OK. We don't explicitly try to link with ssl3 ourselves, so this only
>> ever ends up in LDFLAGS because of some other library that has claimed
>> it needs it as a dependency via pkg-config. Try adding
>> --disable-sdl --disable-vnc --disable-bluez --disable-check-utests
>> --disable-smartcard --disable-usb-redir
>>
>> to your configure argument. That turns off a lot of stuff that's irrelevant
>> for linux-user and which might be pulling in this library. If that works
>> then you can identify which particular switch is needed by process of
>> elimination.
> Different error this time:
Good, we've got rid of the ssl3 link attempt.
> /usr/bin/ld: cannot find -lgthread-2.0
Do you have a static libgthread-2.0? (ie /usr/lib/libgthread-2.0.a or
equivalent). If not you need to install it. Similarly you'll need
a static libglib-2.0.
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:33 ` Peter Maydell
@ 2011-11-23 19:50 ` Mr Dash Four
2011-11-23 19:53 ` Max Filippov
2011-11-24 12:26 ` Alon Levy
1 sibling, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 19:50 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, qemu-devel
> Do you have a static libgthread-2.0? (ie /usr/lib/libgthread-2.0.a or
> equivalent).
Nope, this is what I have:
/usr/lib64/libgthread.so
/usr/lib64/libgthread-2.0.so
/usr/lib64/libgthread-1.2.so.0
/usr/lib64/libgthread-1.2.so.0.0.10
*but*, just downloaded the source rpm and looked at the .spec file. It contains the following few lines in the %build section:
%configure --disable-static
[...]
## Unpackaged files
# info
%{__rm} -rf %{buildroot}%{_infodir}
# .la fies... die die die.
%{__rm} -rf %{buildroot}%{_libdir}/lib*.la
# despite use of --disable-static, delete static libs that get built anyway
%{__rm} -rf %{buildroot}%{_libdir}/lib*.a
So, somebody at Fedora doesn't like static (.a) files very much, it seems. I could easily correct this, enable static building and have these installed, I think.
If not you need to install it. Similarly you'll need
> a static libglib-2.0.
Here, things are a bit easier - even though I do have the glib2-devel and glib2 packages installed, looking at the source rpm there is a separate package called glib2-static, so I'll just install it and get on with it.
I presume after doing all this I need to rerun the stripped-down version of ./configure again, right? If so, I'll do just that and let you know how it goes.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:50 ` Mr Dash Four
@ 2011-11-23 19:53 ` Max Filippov
2011-11-23 19:57 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Max Filippov @ 2011-11-23 19:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Mr Dash Four, Paolo Bonzini
> > Do you have a static libgthread-2.0? (ie /usr/lib/libgthread-2.0.a or
> > equivalent).
> Nope, this is what I have:
>
> /usr/lib64/libgthread.so
> /usr/lib64/libgthread-2.0.so
> /usr/lib64/libgthread-1.2.so.0
> /usr/lib64/libgthread-1.2.so.0.0.10
>
> *but*, just downloaded the source rpm and looked at the .spec file. It contains the following few lines in the %build section:
>
> %configure --disable-static
> [...]
> ## Unpackaged files
> # info
> %{__rm} -rf %{buildroot}%{_infodir}
> # .la fies... die die die.
> %{__rm} -rf %{buildroot}%{_libdir}/lib*.la
> # despite use of --disable-static, delete static libs that get built anyway
> %{__rm} -rf %{buildroot}%{_libdir}/lib*.a
>
>
> So, somebody at Fedora doesn't like static (.a) files very much, it seems. I could easily correct this, enable static building and have these installed, I think.
There's glib2-static in Fedora:
$ rpm -ql glib2-static
/usr/lib64/libgio-2.0.a
/usr/lib64/libglib-2.0.a
/usr/lib64/libgmodule-2.0.a
/usr/lib64/libgobject-2.0.a
/usr/lib64/libgthread-2.0.a
Thanks.
-- Max
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:53 ` Max Filippov
@ 2011-11-23 19:57 ` Mr Dash Four
2011-11-23 19:59 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 19:57 UTC (permalink / raw)
To: Max Filippov; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
>> So, somebody at Fedora doesn't like static (.a) files very much, it seems. I could easily correct this, enable static building and have these installed, I think.
>
> There's glib2-static in Fedora:
>
> $ rpm -ql glib2-static
> /usr/lib64/libgio-2.0.a
> /usr/lib64/libglib-2.0.a
> /usr/lib64/libgmodule-2.0.a
> /usr/lib64/libgobject-2.0.a
> /usr/lib64/libgthread-2.0.a
That is what I just wrote in my previous post, didn't I? The "die die die" comments were related to the glib package, not the glib2! Just open glib.spec and see it for yourself.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:57 ` Mr Dash Four
@ 2011-11-23 19:59 ` Peter Maydell
2011-11-23 20:08 ` Max Filippov
2011-11-23 20:13 ` Mr Dash Four
0 siblings, 2 replies; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 19:59 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Max Filippov, qemu-devel, Paolo Bonzini
On 23 November 2011 19:57, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
>>> So, somebody at Fedora doesn't like static (.a) files very much, it seems. I could easily correct this, enable static building and have these installed, I think.
>>
>> There's glib2-static in Fedora:
>>
>> $ rpm -ql glib2-static
>> /usr/lib64/libgio-2.0.a
>> /usr/lib64/libglib-2.0.a
>> /usr/lib64/libgmodule-2.0.a
>> /usr/lib64/libgobject-2.0.a
>> /usr/lib64/libgthread-2.0.a
> That is what I just wrote in my previous post, didn't I? The "die die die" comments were related to the glib package, not the glib2! Just open glib.spec and see it for yourself.
However it looks from Max's list of libraries like the glib2-static package
contains all the static libraries qemu wants here [both libglib-2.0 and
libgthread-2.0]so so you don't need to build anything yourself, just install
that, right?
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:59 ` Peter Maydell
@ 2011-11-23 20:08 ` Max Filippov
2011-11-23 20:18 ` Max Filippov
2011-11-23 20:27 ` Mr Dash Four
2011-11-23 20:13 ` Mr Dash Four
1 sibling, 2 replies; 43+ messages in thread
From: Max Filippov @ 2011-11-23 20:08 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, Mr Dash Four, qemu-devel
> >>> So, somebody at Fedora doesn't like static (.a) files very much, it seems. I could easily correct this, enable static building and have these installed, I think.
> >>
> >> There's glib2-static in Fedora:
> >>
> >> $ rpm -ql glib2-static
> >> /usr/lib64/libgio-2.0.a
> >> /usr/lib64/libglib-2.0.a
> >> /usr/lib64/libgmodule-2.0.a
> >> /usr/lib64/libgobject-2.0.a
> >> /usr/lib64/libgthread-2.0.a
> > That is what I just wrote in my previous post, didn't I? The "die die die" comments were related to the glib package, not the glib2! Just open glib.spec and see it for yourself.
>
> However it looks from Max's list of libraries like the glib2-static package
> contains all the static libraries qemu wants here [both libglib-2.0 and
> libgthread-2.0]so so you don't need to build anything yourself, just install
> that, right?
It fails some other way ):
$ make V=1
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../linux-headers -I.. -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/target-i386 -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user/x86_64 -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user -O2 -g -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld -Wl,-T,/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/x86_64.ld -o qemu-x86_64 ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-runtime.o ../libuser/trace.o ../libuser/trace/control.o ../libuser/trace/default.o cpu-exec.o cpu-uname.o cpuid.o disas.o elfload.o exec.o fpu/softfloat.o gdbstub.o helper.o ioport-user.o linuxload.o main.o mmap.o op_helper.o osdep.o oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt -pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lm
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x7c): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd0): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x128): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x17c): undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x1d8): undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x230): undefined reference to `glib_mem__free_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x274): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x2cc): undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gslice.o):(.note.stapsdt+0x24): undefined reference to `glib_slice__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gslice.o):(.note.stapsdt+0x70): undefined reference to `glib_slice__free_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x24): undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x70): undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0xbc): undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x108): undefined reference to `glib_quark__new_semaphore'
Thanks.
-- Max
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:59 ` Peter Maydell
2011-11-23 20:08 ` Max Filippov
@ 2011-11-23 20:13 ` Mr Dash Four
1 sibling, 0 replies; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 20:13 UTC (permalink / raw)
To: Peter Maydell; +Cc: Max Filippov, qemu-devel, Paolo Bonzini
>> That is what I just wrote in my previous post, didn't I? The "die die die" comments were related to the glib package, not the glib2! Just open glib.spec and see it for yourself.
>
> However it looks from Max's list of libraries like the glib2-static package
> contains all the static libraries qemu wants here [both libglib-2.0 and
> libgthread-2.0]so so you don't need to build anything yourself, just install
> that, right?
That's what I am doing now, *but* the strange thing is, I now get build failure because of two *new* unpackaged files:
%{_datadir}/systemtap/tapset/glib.stp
%{_datadir}/systemtap/tapset/gobject.stp
I presume these are destined to be in the -devel package so I'll include them there myself. Max is right though - indeed the -static package covers both libglib-2.0 and libgthread-2.0, so I am just compiling the source rm at present and will update the devel and static packages when it is done. Will let you know how it goes.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 20:08 ` Max Filippov
@ 2011-11-23 20:18 ` Max Filippov
2011-11-23 20:28 ` Mr Dash Four
2011-11-23 23:02 ` Mr Dash Four
2011-11-23 20:27 ` Mr Dash Four
1 sibling, 2 replies; 43+ messages in thread
From: Max Filippov @ 2011-11-23 20:18 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, Mr Dash Four, qemu-devel
> It fails some other way ):
>
> $ make V=1
> 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../linux-headers -I.. -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/target-i386 -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user/x86_64 -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user -O2 -g -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld -Wl,-T,/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/x86_64.ld -o qemu-x86_64 ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-runtime.o ../libuser/trace.o ../libuser/trace/control.o ../libuser/trace/default.o cpu-exec.o cpu-uname.o cpuid.o disas.o elfload.o exec.o fpu/softfloat.o gdbstub.o helper.o ioport-user.o linuxload.o main.o mmap.o op_helper.o osdep.o oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt -pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lm
>
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24): undefined reference to `glib_mem__alloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x7c): undefined reference to `glib_mem__alloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd0): undefined reference to `glib_mem__alloc_semaphore'
...
It appears to be glib2 issue: https://bugzilla.gnome.org/show_bug.cgi?id=654078
In the latest F15 it's not fixed. Mr-4, probably you will not escape re-compiling, if not even patching glib2.
Thanks.
-- Max
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 20:08 ` Max Filippov
2011-11-23 20:18 ` Max Filippov
@ 2011-11-23 20:27 ` Mr Dash Four
2011-11-23 20:39 ` Mr Dash Four
2011-11-23 22:13 ` Peter Maydell
1 sibling, 2 replies; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 20:27 UTC (permalink / raw)
To: Max Filippov; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
> It fails some other way ):
>
> $ make V=1
> 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../linux-headers -I.. -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/target-i386 -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user/x86_64 -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user -O2 -g -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld -Wl,-T,/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/x86_64.ld -o qemu-x86_64 ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-runtime.o ../libu
ser/trace.o ../libuser/trace/control.o ../libuser/trace/default.o cpu-exec.o cpu-uname.o cpuid.o disas.o elfload.o exec.o fpu/softfloat.o gdbstub.o helper.o ioport-user.o linuxload.o main.o mmap.o op_helper.o osdep.o oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt -pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lm
>
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24): undefined reference to `glib_mem__alloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x7c): undefined reference to `glib_mem__alloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd0): undefined reference to `glib_mem__alloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x128): undefined reference to `glib_mem__alloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x17c): undefined reference to `glib_mem__realloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x1d8): undefined reference to `glib_mem__realloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x230): undefined reference to `glib_mem__free_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x274): undefined reference to `glib_mem__alloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x2cc): undefined reference to `glib_mem__realloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gslice.o):(.note.stapsdt+0x24): undefined reference to `glib_slice__alloc_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gslice.o):(.note.stapsdt+0x70): undefined reference to `glib_slice__free_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x24): undefined reference to `glib_quark__new_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x70): undefined reference to `glib_quark__new_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0xbc): undefined reference to `glib_quark__new_semaphore'
> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x108): undefined reference to `glib_quark__new_semaphore'
I don't get that - I get *SUCCESS*!!! I am going to run this through the rpmbuild, so that I get a proper package done.
Peter, I hope you would be able to advice me on the following, if you can please: I have some ugly stuff in my qemu.spec file as follows:
========================================================================================================
%build
# By default we build everything, but allow x86 to build a minimal version
# with only similar arch target support
%if %{with_x86only}
buildarch="i386-softmmu x86_64-softmmu i386-linux-user x86_64-linux-user"
%else
buildarch="i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu \
mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu \
sh4-softmmu sh4eb-softmmu \
i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user \
armeb-linux-user cris-linux-user m68k-linux-user mips-linux-user \
mipsel-linux-user sh4-linux-user sh4eb-linux-user" \
%endif
# --build-id option is used fedora 8 onwards for giving info to the debug packages.
extraldflags="-Wl,--build-id";
buildldflags="VL_LDFLAGS=-Wl,--build-id"
%ifarch s390
# drop -g flag to prevent memory exhaustion by linker
%global optflags %(echo %{optflags} | sed 's/-g//')
sed -i.debug 's/"-g $CFLAGS"/"$CFLAGS"/g' configure
%endif
%ifarch %{ix86} x86_64
# sdl outputs to alsa or pulseaudio depending on system config, but it's broken (#495964)
# alsa works, but causes huge CPU load due to bugs
# oss works, but is very problematic because it grabs exclusive control of the device causing other apps to go haywire
./configure --target-list=x86_64-softmmu \
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \
--audio-drv-list=pa,sdl,alsa,oss \
--disable-strip \
--extra-ldflags="$extraldflags -pie -Wl,-z,relro -Wl,-z,now" \
--extra-cflags="%{optflags} -fPIE -DPIE" \
--enable-spice \
--enable-trace-backend=dtrace \
--disable-werror \
--disable-xen
echo "config-host.mak contents:"
echo "==="
cat config-host.mak
echo "==="
make V=1 -j1 $buildldflags
./scripts/tracetool --dtrace --binary %{_bindir}/qemu-kvm \
--target-arch x86_64 --target-type system --stap \
--probe-prefix qemu.kvm < ./trace-events > qemu-kvm.stp
cp -a x86_64-softmmu/qemu-system-x86_64 qemu-kvm
make clean
%endif
./configure \
--target-list="$buildarch" \
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \
--interp-prefix=%{_prefix}/qemu-%%M \
--audio-drv-list=pa,sdl,alsa,oss \
--disable-kvm \
--disable-strip \
--extra-ldflags="$extraldflags -pie -Wl,-z,relro -Wl,-z,now" \
--extra-cflags="%{optflags} -fPIE -DPIE" \
--disable-xen \
%ifarch %{ix86} x86_64
--enable-spice \
%endif
--enable-trace-backend=dtrace \
--disable-werror
echo "config-host.mak contents:"
echo "==="
cat config-host.mak
echo "==="
make V=1 -j1 $buildldflags
gcc %{SOURCE6} -O2 -g -o ksmctl
%install
rm -rf $RPM_BUILD_ROOT
install -D -p -m 0755 %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/system/ksm.service
install -D -p -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ksm
install -D -p -m 0755 ksmctl $RPM_BUILD_ROOT/lib/systemd/ksmctl
install -D -p -m 0755 %{SOURCE7} $RPM_BUILD_ROOT/lib/systemd/system/ksmtuned.service
install -D -p -m 0755 %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned
install -D -p -m 0644 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
%ifarch %{ix86} x86_64
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
mkdir -p $RPM_BUILD_ROOT%{_bindir}/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
mkdir -p $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset
install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/kvm.modules
install -m 0755 kvm/kvm_stat $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 qemu-kvm $RPM_BUILD_ROOT%{_bindir}/
install -m 0644 qemu-kvm.stp $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/
install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
%endif
make prefix="${RPM_BUILD_ROOT}%{_prefix}" \
bindir="${RPM_BUILD_ROOT}%{_bindir}" \
sharedir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" \
mandir="${RPM_BUILD_ROOT}%{_mandir}" \
docdir="${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" \
datadir="${RPM_BUILD_ROOT}%{_datadir}/%{name}" \
sysconfdir="${RPM_BUILD_ROOT}%{_sysconfdir}" install
chmod -x ${RPM_BUILD_ROOT}%{_mandir}/man1/*
install -D -p -m 0644 -t ${RPM_BUILD_ROOT}%{qemudocdir} Changelog README TODO COPYING COPYING.LIB LICENSE
install -D -p -m 0644 qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl2/qemu.conf
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/pxe*bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/pxe*rom
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gpxe*rom
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/vgabios*bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/bios.bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-ppc
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-sparc32
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-sparc64
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/petalogix*.dtb
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/s390-zipl.rom
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/bamboo.dtb
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/slof.bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/spapr-rtas.bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/ppc_rom.bin
# the pxe gpxe images will be symlinks to the images on
# /usr/share/gpxe, as QEMU doesn't know how to look
# for other paths, yet.
pxe_link() {
ln -s ../gpxe/$2.rom %{buildroot}%{_datadir}/%{name}/pxe-$1.rom
}
pxe_link e1000 8086100e
pxe_link ne2k_pci rtl8029
pxe_link pcnet pcnet32
pxe_link rtl8139 rtl8139
pxe_link virtio virtio-net
ln -s ../vgabios/VGABIOS-lgpl-latest.bin %{buildroot}/%{_datadir}/%{name}/vgabios.bin
ln -s ../vgabios/VGABIOS-lgpl-latest.cirrus.bin %{buildroot}/%{_datadir}/%{name}/vgabios-cirrus.bin
ln -s ../vgabios/VGABIOS-lgpl-latest.qxl.bin %{buildroot}/%{_datadir}/%{name}/vgabios-qxl.bin
ln -s ../vgabios/VGABIOS-lgpl-latest.stdvga.bin %{buildroot}/%{_datadir}/%{name}/vgabios-stdvga.bin
ln -s ../vgabios/VGABIOS-lgpl-latest.vmware.bin %{buildroot}/%{_datadir}/%{name}/vgabios-vmware.bin
ln -s ../seabios/bios.bin %{buildroot}/%{_datadir}/%{name}/bios.bin
mkdir -p $RPM_BUILD_ROOT%{_exec_prefix}/lib/binfmt.d
for i in dummy \
%ifnarch %{ix86} x86_64
qemu-i386 \
%endif
%if !%{with_x86only}
%ifnarch arm
qemu-arm \
%endif
%ifnarch ppc ppc64
qemu-ppc \
%endif
%ifnarch sparc sparc64
qemu-sparc \
%endif
%ifnarch sh4
qemu-sh4 \
%endif
%endif
; do
test $i = dummy && continue
grep /$i:\$ %{SOURCE1} > $RPM_BUILD_ROOT%{_exec_prefix}/lib/binfmt.d/$i.conf
chmod 644 $RPM_BUILD_ROOT%{_exec_prefix}/lib/binfmt.d/$i.conf
done < %{SOURCE1}
# For the qemu-guest-agent subpackage install the systemd
# service and udev rules.
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}
install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
========================================================================================================
The ./configure options are easy to correct (even though I have no idea what the --extra-ldflags and --extra-cflags are for and whether I should keep these), but the rest of the stuff above is way, way over my head. What parts do you think I should keep and should I delete, do you have an idea?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 20:18 ` Max Filippov
@ 2011-11-23 20:28 ` Mr Dash Four
2011-11-23 23:02 ` Mr Dash Four
1 sibling, 0 replies; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 20:28 UTC (permalink / raw)
To: Max Filippov; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
> In the latest F15 it's not fixed. Mr-4, probably you will not escape re-compiling, if not even patching glib2.
Nope, I've just built it successfully (see my previous post)!
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 20:27 ` Mr Dash Four
@ 2011-11-23 20:39 ` Mr Dash Four
2011-11-23 20:51 ` Max Filippov
2011-11-23 22:13 ` Peter Maydell
1 sibling, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 20:39 UTC (permalink / raw)
To: Max Filippov; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
> I don't get that - I get *SUCCESS*!!! I am going to run this through the rpmbuild, so that I get a proper package done.
I am an *idiot*. I just realised that I've ran ./configure the last time without the --static option. My build now fails with:
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../linux-headers -I.. -I/home/mr-4/qemu-1.0-rc3/target-arm -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/mr-4/qemu-1.0-rc3/linux-user/arm -I/home/mr-4/qemu-1.0-rc3/linux-user -O2 -g -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld -Wl,-T,/home/mr-4/qemu-1.0-rc3/x86_64.ld -o qemu-arm ../libdis-user/arm-dis.o ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-runtime.o ../libuser/trace.o ../libuser/trace/control.o ../libu
ser/trace/default.o arm-semi.o cpu-exec.o cpu-uname.o disas.o elfload.o exec.o flatload.o fpu/softfloat.o gdbstub-xml.o gdbstub.o helper.o iwmmxt_helper.o linuxload.o main.o mmap.o neon_helper.o nwfpe/double_cpdo.o nwfpe/extended_cpdo.o nwfpe/fpa11.o nwfpe/fpa11_cpdo.o nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o op_helper.o osdep.o oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt -pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lusbredirparser -lm
/usr/bin/ld: cannot find -lusbredirparser
collect2: ld returned 1 exit status
make[1]: *** [qemu-arm] Error 1
make[1]: Leaving directory `/home/mr-4/qemu-1.0-rc3/arm-linux-user'
make: *** [subdir-arm-linux-user] Error 2
Even though I executed "./configure --target-list="arm-linux-user armeb-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --disable-sdl --disable-vnc --disable-bluez --disable-check-utests --disable-smartcard --disable-usb-redir --static" the -lusbredirparser is still pulled for some reason! Any ideas?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 20:39 ` Mr Dash Four
@ 2011-11-23 20:51 ` Max Filippov
2011-11-23 21:00 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Max Filippov @ 2011-11-23 20:51 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
> Even though I executed "./configure --target-list="arm-linux-user armeb-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --disable-sdl --disable-vnc --disable-bluez --disable-check-utests --disable-smartcard --disable-usb-redir --static" the -lusbredirparser is still pulled for some reason! Any ideas?
>
Did configure reported 'usb net redir' as 'no'?
Could you try configure and build in a clean directory?
Thanks.
-- Max
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 20:51 ` Max Filippov
@ 2011-11-23 21:00 ` Mr Dash Four
2011-11-23 21:40 ` Max Filippov
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 21:00 UTC (permalink / raw)
To: Max Filippov; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
> Did configure reported 'usb net redir' as 'no'?
> Could you try configure and build in a clean directory?
[mr-4@test1 qemu-1.0-rc3]$ ./configure --target-list="arm-linux-user armeb-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --disable-sdl --disable-vnc --disable-bluez --disable-check-utests --disable-smartcard --disable-usb-redir --static
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
binary directory /usr/local/bin
library directory /usr/local/lib
include directory /usr/local/include
config directory /usr/local/etc
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/mr-4/qemu-1.0-rc3
C compiler gcc
Host C compiler gcc
CFLAGS -O2 -g
QEMU_CFLAGS -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
LDFLAGS -Wl,--warn-common -m64 -static -g
make make
install install
python python
smbd /usr/sbin/smbd
host CPU x86_64
host big endian no
target list arm-linux-user armeb-linux-user
tcg debug enabled no
Mon debug enabled no
gprof enabled no
sparse enabled no
strip binaries no
profiler no
static build yes
-Werror enabled no
SDL support no
curses support no
curl support no
check support no
mingw32 support no
Audio drivers oss
Extra audio cards ac97 es1370 sb16 hda
Block whitelist
Mixer emulation no
VNC support no
xen support no
brlapi support no
bluez support no
Documentation yes
NPTL support yes
GUEST_BASE yes
PIE no
vde support no
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support no
TCG interpreter no
fdt support no
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
uuid support no
vhost-net support yes
Trace backend nop
Trace output file trace-<pid>
spice support no
rbd support no
xfsctl support no
nss used no
usb net redir yes
OpenGL support no
libiscsi support no
build guest agent yes
This is utterly bizarre! Why is "usb net redir" set as "yes" I have no idea!
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 21:00 ` Mr Dash Four
@ 2011-11-23 21:40 ` Max Filippov
2011-11-23 22:12 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Max Filippov @ 2011-11-23 21:40 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
> > Did configure reported 'usb net redir' as 'no'?
> > Could you try configure and build in a clean directory?
> [mr-4@test1 qemu-1.0-rc3]$ ./configure --target-list="arm-linux-user armeb-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --disable-sdl --disable-vnc --disable-bluez --disable-check-utests --disable-smartcard --disable-usb-redir --static
...
> usb net redir yes
> OpenGL support no
> libiscsi support no
> build guest agent yes
>
> This is utterly bizarre! Why is "usb net redir" set as "yes" I have no idea!
>
Could you try configure with the following patch?
diff --git a/configure b/configure
index f033438..e5566c8 100755
--- a/configure
+++ b/configure
@@ -759,8 +759,6 @@ for opt do
;;
--enable-opengl) opengl="yes"
;;
- --*dir)
- ;;
--disable-rbd) rbd="no"
;;
--enable-rbd) rbd="yes"
@@ -783,6 +781,8 @@ for opt do
;;
--disable-guest-agent) guest_agent="no"
;;
+ --*dir)
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
Thanks.
-- Max
^ permalink raw reply related [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 21:40 ` Max Filippov
@ 2011-11-23 22:12 ` Peter Maydell
0 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 22:12 UTC (permalink / raw)
To: Max Filippov; +Cc: Paolo Bonzini, Mr Dash Four, qemu-devel
On 23 November 2011 21:40, Max Filippov <jcmvbkbc@gmail.com> wrote:
> --- a/configure
> +++ b/configure
> @@ -759,8 +759,6 @@ for opt do
> ;;
> --enable-opengl) opengl="yes"
> ;;
> - --*dir)
> - ;;
> --disable-rbd) rbd="no"
> ;;
> --enable-rbd) rbd="yes"
Haha, nice catch. Incidentally I think that the proper fix for this
should be to have a case statement that explicitly matches for the
--thingydir options we accept, and drop the wildcard completely.
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 20:27 ` Mr Dash Four
2011-11-23 20:39 ` Mr Dash Four
@ 2011-11-23 22:13 ` Peter Maydell
1 sibling, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 22:13 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Max Filippov, qemu-devel, Paolo Bonzini
On 23 November 2011 20:27, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
> Peter, I hope you would be able to advice me on the following, if you can
> please: I have some ugly stuff in my qemu.spec file as follows:
[delete huge spec file]
> What parts do you think I should keep and should I delete, do you
> have an idea?
Sorry, I don't use RedHat and have no idea about specfiles.
(It's a bit offtopic for qemu-devel really anyway.)
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 20:18 ` Max Filippov
2011-11-23 20:28 ` Mr Dash Four
@ 2011-11-23 23:02 ` Mr Dash Four
2011-11-23 23:15 ` Max Filippov
1 sibling, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 23:02 UTC (permalink / raw)
To: Max Filippov; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
>> $ make V=1
>> 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../linux-headers -I.. -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/target-i386 -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user/x86_64 -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user -O2 -g -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld -Wl,-T,/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/x86_64.ld -o qemu-x86_64 ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-runtime.o ../lib
user/trace.o ../libuser/trace/control.o ../libuser/trace/default.o cpu-exec.o cpu-uname.o cpuid.o disas.o elfload.o exec.o fpu/softfloat.o gdbstub.o helper.o ioport-user.o linuxload.o main.o mmap.o op_helper.o osdep.o oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt -pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lm
>>
>> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24): undefined reference to `glib_mem__alloc_semaphore'
>> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x7c): undefined reference to `glib_mem__alloc_semaphore'
>> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd0): undefined reference to `glib_mem__alloc_semaphore'
> ...
>
> It appears to be glib2 issue: https://bugzilla.gnome.org/show_bug.cgi?id=654078
Spot on, unfortunately! This is what I now have after applying your patch (thank you!):
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../linux-headers -I.. -I/home/gogo/t/qemu-1.0-rc3/target-arm -DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/gogo/t/qemu-1.0-rc3/linux-user/arm -I/home/gogo/t/qemu-1.0-rc3/linux-user -O2 -g -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld -Wl,-T,/home/gogo/t/qemu-1.0-rc3/x86_64.ld -o qemu-arm ../libdis-user/arm-dis.o ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-runtime.o ../libuser/trace.o ../libuser/trace/control.o .
./libuser/trace/default.o arm-semi.o cpu-exec.o cpu-uname.o disas.o elfload.o exec.o flatload.o fpu/softfloat.o gdbstub-xml.o gdbstub.o helper.o iwmmxt_helper.o linuxload.o main.o mmap.o neon_helper.o nwfpe/double_cpdo.o nwfpe/extended_cpdo.o nwfpe/fpa11.o nwfpe/fpa11_cpdo.o nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o op_helper.o osdep.o oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt -pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lm
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x11bc): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x11b0): warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x11c6): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0xefa): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0xf36): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libpthread.a(libpthread.o): In function `sem_open':
(.text+0x75dd): warning: the use of `mktemp' is dangerous, better use `mkstemp'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24): undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x80): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd8): undefined reference to `glib_mem__free_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x11c): undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x178): undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x1d0): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x228): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x27c): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x2d4): undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gslice.o):(.note.stapsdt+0x24): undefined reference to `glib_slice__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gslice.o):(.note.stapsdt+0x70): undefined reference to `glib_slice__free_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x24): undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x70): undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0xbc): undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x108): undefined reference to `glib_quark__new_semaphore'
collect2: ld returned 1 exit status
make[1]: *** [qemu-arm] Error 1
make[1]: Leaving directory `/home/gogo/t/qemu-1.0-rc3/arm-linux-user'
make: *** [subdir-arm-linux-user] Error 2
Is there any solution to this?
> In the latest F15 it's not fixed. Mr-4, probably you will not escape re-compiling, if not even patching glib2.
I am not afraid of doing that as long as it works and helps me out. Should I see/try whether it has been fixed in rawhide?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 23:02 ` Mr Dash Four
@ 2011-11-23 23:15 ` Max Filippov
2011-11-23 23:22 ` Peter Maydell
0 siblings, 1 reply; 43+ messages in thread
From: Max Filippov @ 2011-11-23 23:15 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
> >> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24): undefined reference to `glib_mem__alloc_semaphore'
> >> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x7c): undefined reference to `glib_mem__alloc_semaphore'
> >> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd0): undefined reference to `glib_mem__alloc_semaphore'
> > ...
> >
> > It appears to be glib2 issue: https://bugzilla.gnome.org/show_bug.cgi?id=654078
> Spot on, unfortunately! This is what I now have after applying your patch (thank you!):
...
> Is there any solution to this?
Traditional: it may be fixed in the mainline already, F15 has version 2.28.8, whereas mainline tip is 2.31.2.
However nothing in the git log suggests that.
> > In the latest F15 it's not fixed. Mr-4, probably you will not escape re-compiling, if not even patching glib2.
> I am not afraid of doing that as long as it works and helps me out. Should I see/try whether it has been fixed in rawhide?
Well, patching always helps AFAIK (:
And rawhide -- give it a try if it's easy.
Thanks.
-- Max
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 23:15 ` Max Filippov
@ 2011-11-23 23:22 ` Peter Maydell
2011-11-23 23:33 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Peter Maydell @ 2011-11-23 23:22 UTC (permalink / raw)
To: Max Filippov; +Cc: Paolo Bonzini, Mr Dash Four, qemu-devel
On 23 November 2011 23:15, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> >> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24): undefined reference to `glib_mem__alloc_semaphore'
>> >> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x7c): undefined reference to `glib_mem__alloc_semaphore'
>> >> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd0): undefined reference to `glib_mem__alloc_semaphore'
>> > ...
>> >
>> > It appears to be glib2 issue: https://bugzilla.gnome.org/show_bug.cgi?id=654078
>> Spot on, unfortunately! This is what I now have after applying your patch (thank you!):
> ...
>> Is there any solution to this?
>
> Traditional: it may be fixed in the mainline already, F15 has version 2.28.8, whereas mainline tip is 2.31.2.
> However nothing in the git log suggests that.
FWIW Ubuntu Oneiric has glib2 2.30.0 and doesn't seem to have this problem.
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 23:22 ` Peter Maydell
@ 2011-11-23 23:33 ` Mr Dash Four
2011-11-24 8:48 ` Max Filippov
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-23 23:33 UTC (permalink / raw)
To: Peter Maydell; +Cc: Max Filippov, qemu-devel, Paolo Bonzini
>>> Is there any solution to this?
>> Traditional: it may be fixed in the mainline already, F15 has version 2.28.8, whereas mainline tip is 2.31.2.
>> However nothing in the git log suggests that.
>
> FWIW Ubuntu Oneiric has glib2 2.30.0 and doesn't seem to have this problem.
Just compiled, built and installed the latest glib-2.0 from rawhide (2.31.2-1) - *no* use, the same error is popping up. Dead end?
The bug report Max linked to previously suggests that bug is "CLOSED FIXED". How's that fixed then?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 23:33 ` Mr Dash Four
@ 2011-11-24 8:48 ` Max Filippov
2011-11-24 12:15 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Max Filippov @ 2011-11-24 8:48 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
>>>> Is there any solution to this?
>>> Traditional: it may be fixed in the mainline already, F15 has version 2.28.8, whereas mainline tip is 2.31.2.
>>> However nothing in the git log suggests that.
>>
>> FWIW Ubuntu Oneiric has glib2 2.30.0 and doesn't seem to have this problem.
> Just compiled, built and installed the latest glib-2.0 from rawhide (2.31.2-1) - *no* use, the same error is popping up. Dead end?
>
> The bug report Max linked to previously suggests that bug is "CLOSED FIXED". How's that fixed then?
Debian glib2 package version 2.24.2-1 works for me too. Looks like
Fedora packaging issue.
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-24 8:48 ` Max Filippov
@ 2011-11-24 12:15 ` Mr Dash Four
2011-11-24 12:25 ` Paolo Bonzini
0 siblings, 1 reply; 43+ messages in thread
From: Mr Dash Four @ 2011-11-24 12:15 UTC (permalink / raw)
To: Max Filippov; +Cc: Peter Maydell, qemu-devel, Paolo Bonzini
>> The bug report Max linked to previously suggests that bug is "CLOSED FIXED". How's that fixed then?
>>
>
> Debian glib2 package version 2.24.2-1 works for me too. Looks like
> Fedora packaging issue.
>
So, what do I do? Is there any way I could find what is causing this?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-24 12:15 ` Mr Dash Four
@ 2011-11-24 12:25 ` Paolo Bonzini
2011-11-24 12:45 ` Mr Dash Four
0 siblings, 1 reply; 43+ messages in thread
From: Paolo Bonzini @ 2011-11-24 12:25 UTC (permalink / raw)
To: Mr Dash Four; +Cc: Max Filippov, qemu-devel, Peter Maydell
On 11/24/2011 01:15 PM, Mr Dash Four wrote:
>
>>> The bug report Max linked to previously suggests that bug is "CLOSED
>>> FIXED". How's that fixed then?
>>
>> Debian glib2 package version 2.24.2-1 works for me too. Looks like
>> Fedora packaging issue.
> So, what do I do? Is there any way I could find what is causing this?
Likely Debian is not packaging systemtap scripts.
Open a Fedora bug and link it to the upstream bug. Say in the Fedora
bug that the upstream bug is fixed but you couldn't find a commit that
relates to it.
Paolo
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-23 19:33 ` Peter Maydell
2011-11-23 19:50 ` Mr Dash Four
@ 2011-11-24 12:26 ` Alon Levy
2011-11-24 12:57 ` Peter Maydell
1 sibling, 1 reply; 43+ messages in thread
From: Alon Levy @ 2011-11-24 12:26 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, Mr Dash Four, qemu-devel
On Wed, Nov 23, 2011 at 07:33:48PM +0000, Peter Maydell wrote:
> On 23 November 2011 19:22, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
> >
> >> OK. We don't explicitly try to link with ssl3 ourselves, so this only
> >> ever ends up in LDFLAGS because of some other library that has claimed
> >> it needs it as a dependency via pkg-config. Try adding
> >> --disable-sdl --disable-vnc --disable-bluez --disable-check-utests
> >> --disable-smartcard --disable-usb-redir
Just FYI, It's the --disable-smartcard that fixed this:
smartcard requires nss, and:
$ pkg-config --libs nss
-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
> >>
> >> to your configure argument. That turns off a lot of stuff that's irrelevant
> >> for linux-user and which might be pulling in this library. If that works
> >> then you can identify which particular switch is needed by process of
> >> elimination.
> > Different error this time:
>
> Good, we've got rid of the ssl3 link attempt.
>
> > /usr/bin/ld: cannot find -lgthread-2.0
>
> Do you have a static libgthread-2.0? (ie /usr/lib/libgthread-2.0.a or
> equivalent). If not you need to install it. Similarly you'll need
> a static libglib-2.0.
>
> -- PMM
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-24 12:25 ` Paolo Bonzini
@ 2011-11-24 12:45 ` Mr Dash Four
0 siblings, 0 replies; 43+ messages in thread
From: Mr Dash Four @ 2011-11-24 12:45 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Max Filippov, qemu-devel, Peter Maydell
> Likely Debian is not packaging systemtap scripts.
True, though I have no idea what the purpose of these files is.
> Open a Fedora bug and link it to the upstream bug. Say in the Fedora
> bug that the upstream bug is fixed but you couldn't find a commit that
> relates to it.
Done - https://bugzilla.redhat.com/show_bug.cgi?id=756748
I guess I have to sit and wait to see what happens next.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [Qemu-devel] cannot build qemu with "--static" configure option
2011-11-24 12:26 ` Alon Levy
@ 2011-11-24 12:57 ` Peter Maydell
0 siblings, 0 replies; 43+ messages in thread
From: Peter Maydell @ 2011-11-24 12:57 UTC (permalink / raw)
To: Peter Maydell, Mr Dash Four, Paolo Bonzini, qemu-devel
On 24 November 2011 12:26, Alon Levy <alevy@redhat.com> wrote:
> On Wed, Nov 23, 2011 at 07:33:48PM +0000, Peter Maydell wrote:
>> On 23 November 2011 19:22, Mr Dash Four <mr.dash.four@googlemail.com> wrote:
>> >
>> >> OK. We don't explicitly try to link with ssl3 ourselves, so this only
>> >> ever ends up in LDFLAGS because of some other library that has claimed
>> >> it needs it as a dependency via pkg-config. Try adding
>> >> --disable-sdl --disable-vnc --disable-bluez --disable-check-utests
>> >> --disable-smartcard --disable-usb-redir
>
> Just FYI, It's the --disable-smartcard that fixed this:
> smartcard requires nss, and:
> $ pkg-config --libs nss
> -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
Yeah. You can get this problem on Ubuntu too if you have the
relevant libnns3-dev package installed.
However we won't be using the smartcard stuff if we're building
a linux-user target, right, so maybe we can get the makefile
to skip it or only apply these libraries to the relevant
executables ?
Either that or we should say "we don't have a working nss for
smartcard" if the user said --static (ie improve the smartcard
autodetect configure code).
-- PMM
^ permalink raw reply [flat|nested] 43+ messages in thread
end of thread, other threads:[~2011-11-24 12:57 UTC | newest]
Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 12:58 [Qemu-devel] cannot build qemu with "--static" configure option Mr Dash Four
2011-11-23 14:10 ` Paolo Bonzini
2011-11-23 14:15 ` Mr Dash Four
2011-11-23 15:24 ` Paolo Bonzini
2011-11-23 15:41 ` Mr Dash Four
2011-11-23 18:00 ` Paolo Bonzini
2011-11-23 18:28 ` Peter Maydell
2011-11-23 18:33 ` Mr Dash Four
2011-11-23 18:36 ` Peter Maydell
2011-11-23 18:42 ` Mr Dash Four
2011-11-23 18:47 ` Peter Maydell
2011-11-23 19:02 ` Mr Dash Four
2011-11-23 19:16 ` Peter Maydell
2011-11-23 19:22 ` Mr Dash Four
2011-11-23 19:33 ` Peter Maydell
2011-11-23 19:50 ` Mr Dash Four
2011-11-23 19:53 ` Max Filippov
2011-11-23 19:57 ` Mr Dash Four
2011-11-23 19:59 ` Peter Maydell
2011-11-23 20:08 ` Max Filippov
2011-11-23 20:18 ` Max Filippov
2011-11-23 20:28 ` Mr Dash Four
2011-11-23 23:02 ` Mr Dash Four
2011-11-23 23:15 ` Max Filippov
2011-11-23 23:22 ` Peter Maydell
2011-11-23 23:33 ` Mr Dash Four
2011-11-24 8:48 ` Max Filippov
2011-11-24 12:15 ` Mr Dash Four
2011-11-24 12:25 ` Paolo Bonzini
2011-11-24 12:45 ` Mr Dash Four
2011-11-23 20:27 ` Mr Dash Four
2011-11-23 20:39 ` Mr Dash Four
2011-11-23 20:51 ` Max Filippov
2011-11-23 21:00 ` Mr Dash Four
2011-11-23 21:40 ` Max Filippov
2011-11-23 22:12 ` Peter Maydell
2011-11-23 22:13 ` Peter Maydell
2011-11-23 20:13 ` Mr Dash Four
2011-11-24 12:26 ` Alon Levy
2011-11-24 12:57 ` Peter Maydell
2011-11-23 18:34 ` Mr Dash Four
2011-11-23 14:18 ` Peter Maydell
2011-11-23 14:39 ` Mr Dash Four
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).