Summary: | app-emulation/spice-0.8.2 provides a bad pkg-config file | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marek Bartosiewicz <marek.bartosiewicz> |
Component: | [OLD] Unspecified | Assignee: | Tiziano Müller (RETIRED) <dev-zero> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 4glitch, aklhfex, brot+gentoo, camalot, jaak, marienz, mattsch, maxtaager, qemu+disabled, shiningarcanine |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
hack around the bogus include path
spice-0.8.2.ebuild spice-deps.patch |
Description
Marek Bartosiewicz
2011-08-12 12:39:12 UTC
"Error" is defined in error.h in the root of the qemu src tree. qapi-types-core.h tries to include this using '#include "error.h"', but because there is a -I/usr/include/alsa on the compiler commandline it ends up including /usr/include/alsa/error.h instead, at least that is what happens in a manual build with --enable-spice and -save-temps in CFLAGS. I have not yet figured out where -I/usr/include/alsa comes from (the alsa check in qemu itself really should not be adding this, as alsaaudio.c quite sensibly includes <alsa/asoundlib.h> instead of just asoundlib.h). I think the right fix will involve not getting -I/usr/include/alsa included. Ok, this is slightly less simple than I thought. It slips in through: $ pkg-config --cflags spice-protocol spice-server -I/usr/include/spice-server -I/usr/include/pixman-1 -I/usr/include/alsa -I/usr/include/spice-1 And it's in there because spice-server.pc has "alsa" in its "Requires:" (presumably correct), and alsa.pc has: # -I${includedir}/alsa below is just for backward compatibility # (it was set so mistakely in the older version) Cflags: -I${includedir} -I${includedir}/alsa So I think the correct fix would involve getting alsa to drop that backwards compatibility hack (likely a good idea anyway, as there are files like conf.h and global.h in there), but for now the workaround for qemu-kvm might need to be stuffing a -I. into the compiler flags somewhere early (manually hacking this in gets me past the failure). Created attachment 283123 [details, diff]
hack around the bogus include path
The attached hack at least gets it to compile. A better solution may exist, though. Use at your own risk.
Fix is in spice, upstream: http://cgit.freedesktop.org/spice/spice/commit/?h=0.8&id=54c660470a5aea19f799c5574cc0d4a707696712 Applying this in spice-0.8.2 and eautoreconf'ing fix this for me. Yes, that is a better fix (and not just because it is in some upstream already). CC-ing the spice maintainer hoping he'll apply it :) *** Bug 379073 has been marked as a duplicate of this bug. *** *** Bug 379871 has been marked as a duplicate of this bug. *** Upstream tagged spice-0.9.1 and spice-protocol-0.9.0 ten days ago. I just bumped the ebuilds in a local overlay, with a minor change to the spice-protocol ebuild to remove a patch that was being applied because of this issue. Things compiled without a problem. I might not have time to do proper testing to verify that everything is working properly. Would someone else be able to verify that there are no runtime issues introduced by doing this? Created attachment 285733 [details] spice-0.8.2.ebuild (In reply to comment #4) > Fix is in spice, upstream: > http://cgit.freedesktop.org/spice/spice/commit/?h=0.8&id=54c660470a5aea19f799c5574cc0d4a707696712 > > Applying this in spice-0.8.2 and eautoreconf'ing fix this for me. Same here. Here's an ebuild for this... Created attachment 285735 [details, diff]
spice-deps.patch
...and the patch.
*** Bug 383293 has been marked as a duplicate of this bug. *** Fixed in 0.8.2-r1. Sorry for the delay, thanks for the help. 0.9.* will be added soon, but p.masked since it is the unstable development tree of spice. |