Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 368439 - app-emulation/kqemu doesn't build against 2.6.39 kernel
Summary: app-emulation/kqemu doesn't build against 2.6.39 kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-23 09:58 UTC by Ian Abbott
Modified: 2012-01-21 20:23 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log for app-emulation/kqemu-1.4.0pre1-r1 against 2.6.39-gentoo (build.log,6.19 KB, text/plain)
2011-05-23 10:10 UTC, Ian Abbott
Details
Patch for kqemu-1.4.0_pre1 (kqemu-1.4.0_pre1-remove-smp_lock.patch,490 bytes, patch)
2011-05-23 10:32 UTC, Ian Abbott
Details | Diff
Patch for the =app-emulation/kqemu-1.4.0_pre1-r1 ebuild to get the remove_smp_lock.patch applied. (kqemu-1.4.0_pre1-r1.patch,379 bytes, patch)
2011-09-25 22:30 UTC, Ch_E
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Abbott 2011-05-23 09:58:38 UTC
The <linux/smp_lock.h> header file was removed in the 2.6.39 kernel and no version of app-emulation/kqemu that is currently in portage builds against this kernel because the header is #include'd by kqemu-linux.c.

Reproducible: Always

Steps to Reproduce:
1. emerge =sys-kernel/gentoo-sources-2.6.39
2. build the kernel in /usr/src/linux-2.6.39-gentoo
3. ln -sf linux-2.6.39-gentoo /usr/src/linux
4. emerge -1 app-emulation/kqemu



It should be easy to patch. The linux/smp_lock.h header is only needed for the lock_kernel() and unlock_kernel() calls, and those calls are conditionally compiled in only for kernel versions prior to 2.6.10 (at least for kqemu-1.4.0pre1).

I don't think 'emerge --info' output is useful for this bug (and would be confusing until I reboot into the 2.6.39 kernel!).
Comment 1 Ian Abbott 2011-05-23 10:10:32 UTC
Created attachment 274377 [details]
Build log for app-emulation/kqemu-1.4.0pre1-r1 against 2.6.39-gentoo
Comment 2 Ian Abbott 2011-05-23 10:13:34 UTC
Note that kqemu-1.3.0_pre11 still uses the 'ioctl' file operation which no longer exists in the 2.6.39 kernel, so it's probably not worth trying to support this version of kqemu for new kernels.
Comment 3 Ian Abbott 2011-05-23 10:32:40 UTC
Created attachment 274381 [details, diff]
Patch for kqemu-1.4.0_pre1

This patch conditionally compiles the #include <linux/smp_lock.h> line so it only gets included for kernels prior to 2.6.10. This matches the conditional compilation for the lock_kernel() and unlock_kernel() calls.

When this patch is included by a modified app-emulation/kqemu-1.4.0_pre1-r1 ebuild, it compiles fine for a 2.6.39 kernel.
Comment 4 Emmanuel Rosa 2011-05-31 00:55:04 UTC
Just tried the patch with an overlay ebuild and it worked.
Comment 5 Leho Kraav (:macmaN @lkraav) 2011-08-19 08:30:40 UTC
confirmed working
Comment 6 Dominique Michel 2011-08-22 15:53:16 UTC
The patch work fine here on ~amd64 and gentoo-sources-2.6.39-r1
Comment 7 Germax 2011-08-25 12:42:02 UTC
it works now
thx for patch
Comment 8 Ch_E 2011-09-25 22:30:05 UTC
Created attachment 287741 [details, diff]
Patch for the =app-emulation/kqemu-1.4.0_pre1-r1 ebuild to get the remove_smp_lock.patch applied.
Comment 9 Ch_E 2011-09-25 22:35:28 UTC
Can't this bug be closed??

I don't exactly know the rules but with the remove_smp_lock patch and the patched ebuild =app-emulation/kqemu-1.4.0_pre1-r1 complies fine for me (using =sys-devel/gcc-4.6.1-r1).

So why isn't a new ebuild released, named kqemu-1.4.0_pre1-r2.ebuild or so??
Comment 10 Ch_E 2011-09-25 22:36:40 UTC
Can't this bug be closed??

I don't exactly know the rules but with the remove_smp_lock patch and the patched ebuild =app-emulation/kqemu-1.4.0_pre1-r1 complies fine for me (using =sys-devel/gcc-4.6.1-r1).

So why isn't a new ebuild released, named kqemu-1.4.0_pre1-r2.ebuild or so??
Comment 11 Ian Abbott 2011-09-26 09:54:53 UTC
Probably no need to even bump the revision to -r2 since there's no need to force a rebuild if it's already built successfully.
Comment 12 Daniel Nelson 2011-11-19 19:18:23 UTC
I can confirm that this patch works fine under gentoo-sources-3.0.6 on i386. I added it in an overlay, emerged kqemu and qemu, and all went well.
Comment 13 Florian Berger 2011-12-16 07:33:34 UTC
kqemu patch and ebuild patch work fine with ck-sources-3.0.4 on i686.

Please include this in the Portage tree.
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2012-01-21 20:23:05 UTC
Sorru for so late reply.
I've changed kernel version constraint up to 2.6.39 in the patch.

Pushed fix as:

> 21 Jan 2012; Sergei Trofimovich <slyfox@gentoo.org>
> +files/kqemu-1.4.0_pre1-remove-smp_lock.patch, kqemu-1.4.0_pre1-r1.ebuild:
> Fixed build falure against linux-2.6.39+. Bug #368439 by Ian Abbott and patch
> by Ch E.

Thanks guys!