cannot build qemu with "--static" configure option
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?
Quoted 4 lines · Mr Dash Four
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
Quoted 7 lines
Quoted 5 lines
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...
Quoted 9 lines · Mr Dash Four
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
Quoted 5 lines
Quoted 5 lines
./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
Quoted 7 lines
Quoted 2 lines
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!
Quoted 4 lines
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
Quoted 4 lines
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!
Quoted 8 lines · Mr Dash Four
Quoted 6 lines
Quoted 4 lines
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
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
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.
Quoted 9 lines · Mr Dash Four
Quoted 1 line
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
Quoted 3 lines · Paolo Bonzini
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
Quoted 7 lines
Quoted 3 lines
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.
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
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?!
Quoted 2 lines · Mr Dash Four
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
Quoted 2 lines
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?
Quoted 1 line
(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?
Quoted 7 lines · Mr Dash Four
Quoted 2 lines
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]
Quoted 2 lines
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.
Quoted 2 lines
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
Quoted 2 lines
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!
Quoted 5 lines · Mr Dash Four
Quoted 2 lines
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?
Quoted 3 lines
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
Quoted 1 line
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
Quoted 10 lines
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-redirto 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
Quoted 7 lines · Mr Dash Four
Quoted 7 lines
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
Quoted 5 lines
Quoted 4 lines
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.
Quoted 1 line
/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
Quoted 2 lines
Do you have a static libgthread-2.0? (ie
/usr/lib/libgthread-2.0.aor 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*.aSo, 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
Quoted 1 line
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.
Quoted 22 lines
Quoted 2 lines
Do you have a static libgthread-2.0? (ie
/usr/lib/libgthread-2.0.aor 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
Quoted 1 line
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
Quoted 10 lines
Quoted 1 line
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.
Quoted 11 lines · Mr Dash Four
Quoted 10 lines
Quoted 1 line
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.aThat 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
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
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
Quoted 6 lines
Quoted 1 line
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
Quoted 6 lines
Quoted 1 line
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.
Quoted 8 lines
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 toglib_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
Quoted 6 lines
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
Quoted 16 lines
/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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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 toglib_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-xenecho "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-werrorecho "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}" installchmod -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 8086100epxe_link ne2k_pci rtl8029pxe_link pcnet pcnet32pxe_link rtl8139 rtl8139pxe_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?
Quoted 1 line
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)!
Quoted 1 line
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 ../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 -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?
Quoted 2 lines
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
Quoted 2 lines
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!
Quoted 3 lines
Quoted 2 lines
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
...
Quoted 7 lines
usb net redir yes OpenGL support no libiscsi support nobuild 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?
configure +2 -2
@@ -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
Quoted 11 lines · Max Filippov
configure +0
-0@@ -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
Quoted 2 lines · Mr Dash Four
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]
Quoted 2 lines
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
Quoted 2 lines
Quoted 2 lines
$ 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
Quoted 7 lines
Quoted 4 lines
/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 toglib_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?
Quoted 1 line
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?
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
/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 toglib_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!):
...
Quoted 1 line
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.
Quoted 2 lines
Quoted 1 line
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
Quoted 5 lines · Max Filippov
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
/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 toglib_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'...
Quoted 7 lines
Quoted 2 lines
Quoted 1 line
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!):
...
Quoted 1 line
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
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
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?
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
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.
Signature · 2 lines
Thanks. -- Max
Quoted 7 lines
Quoted 3 lines
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?
Quoted 7 lines · Mr Dash Four
Quoted 6 lines
Quoted 3 lines
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
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Mr Dash Four
Quoted 6 lines
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
Quoted 17 lines
Quoted 6 lines
Quoted 5 lines
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.
Quoted 1 line
/usr/bin/ld: cannot find -lgthread-2.0Do you have a static libgthread-2.0? (ie
/usr/lib/libgthread-2.0.aor equivalent). If not you need to install it. Similarly you'll need a static libglib-2.0.-- PMM
Quoted 2 lines
Likely Debian is not packaging systemtap scripts.
True, though I have no idea what the purpose of these files is.
Quoted 1 line
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.
Quoted 9 lines · Alon Levy
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Mr Dash Four
Quoted 6 lines
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
Quoted 4 lines
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