Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350205 - app-emulation/kqemu-1.3.0_pre11 does not ebuild against gentoo-sources-2.6.36-r5 [on a quite freshly installed system]
Summary: app-emulation/kqemu-1.3.0_pre11 does not ebuild against gentoo-sources-2.6.36...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-31 02:31 UTC by marc paresseux
Modified: 2012-12-04 22:37 UTC (History)
3 users (show)

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


Attachments
Proposed patch for kqemu-1.3.0_pre11 (kqemu-1.3.0_pre11-2.6.36.patch,446 bytes, patch)
2011-01-04 15:56 UTC, Cyprien Nicolas (fulax)
Details | Diff
Improved patch for unlocked_ioctl (kqemu-1.3.0_pre11-unlocked_ioctl.patch,1.59 KB, patch)
2011-05-23 11:16 UTC, Ian Abbott
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description marc paresseux 2010-12-31 02:31:38 UTC
Obviously, the data structure "file_operations" has changed.
The same thing happens, when compiling recent {v >= 173} nvidia-drivers in the same environment.  For the nvidia-drivers, there exists a patch [for nv.c, around line 426], that makes them at least compile.  
There are several tickets {eg. http://bugs.gentoo.org/show_bug.cgi?id=336837}, describing this.

A similar solution could be searched for kqemu.



Reproducible: Always

Steps to Reproduce:
1. emerge --sync  # today
2. emerge gentoo-sources
3. emerge kqemu


Actual Results:  
build.log:
 * Package:    app-emulation/kqemu-1.3.0_pre11
 * Repository: gentoo
 * Maintainer: lu_zero@gentoo.org
 * USE:  elibc_glibc kernel_linux userland_GNU x86
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.36-gentoo-r5+reiser4_xp
>>> Unpacking source...
>>> Unpacking kqemu-1.3.0pre11.tar.gz to /var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work
 * Applying kqemu-1.3.0_pre11-sched_h.patch ...
 [ ok ]
>>> Source unpacked in /var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work
>>> Compiling source in /var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11 ...
Source path       /var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11
C compiler        gcc
Host C compiler   gcc
make              make
host CPU          i386

kernel sources    /usr/src/linux
kbuild type       2.6
make -C common all
make[1]: Entering directory `/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11/common'
gcc -Wall -O2 -Werror -g -D__KERNEL__ -I.. -o genoffsets genoffsets.c
./genoffsets > monitor_def.h
gcc -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -D__ASSEMBLY__ -c -o i386/nexus_asm.o i386/nexus_asm.S
gcc -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -D__ASSEMBLY__ -c -o i386/monitor_asm.o i386/monitor_asm.S
gcc -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -fno-stack-protector    -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o monitor.o monitor.c
gcc -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -fno-stack-protector    -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o monitor-utils.o monitor-utils.c
gcc -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -fno-stack-protector    -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o interp.o interp.c
ld -T i386/monitor.ld -o monitor-image.out i386/nexus_asm.o i386/monitor_asm.o monitor.o monitor-utils.o interp.o
objcopy -O binary monitor-image.out monitor-image.bin
gcc -Wall -O2 -Werror -g -o genmon genmon.c
./genmon < monitor-image.bin > monitor-image.h
gcc -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o kernel.o kernel.c
gcc -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -D__ASSEMBLY__ -c -o i386/kernel_asm.o i386/kernel_asm.S
ld -r -o ../kqemu-mod-i386.o kernel.o i386/kernel_asm.o
make[1]: Leaving directory `/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11/common'
make -C /usr/src/linux M=`pwd` modules
make[1]: Entering directory `/usr/src/linux-2.6.36-gentoo-r5+reiser4_xp'
  CC [M]  /var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11/kqemu-linux.o
/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11/kqemu-linux.c:324: error: unknown field 'ioctl' specified in initializer
/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11/kqemu-linux.c:324: warning: initialization from incompatible pointer type
make[2]: *** [/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11/kqemu-linux.o] Error 1
make[1]: *** [_module_/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.36-gentoo-r5+reiser4_xp'
make: *** [kqemu.ko] Error 2
 * ERROR: app-emulation/kqemu-1.3.0_pre11 failed:
 *   make failed
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 3863:  Called die
 * The specific snippet of code:
 *       make || die "make failed"
 * 
 * If you need support, post the output of 'emerge --info =app-emulation/kqemu-1.3.0_pre11',
 * the complete build log and the output of 'emerge -pqv =app-emulation/kqemu-1.3.0_pre11'.
 * The complete build log is located at '/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/temp/environment'.
 * S: '/var/tmp/portage/app-emulation/kqemu-1.3.0_pre11/work/kqemu-1.3.0pre11'




Environment:
make.conf:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -march=athlon-xp -mtune=athlon-xp -mmmx -msse -mfpmath=sse -m3dnow -pipe"
#CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j2"
COMPRESS="/usr/bin/xz -4e"
COMPRESS_EXT=".xz"
PORTAGE_COMPRESS="/usr/bin/xz"
PORTAGE_COMPRESS_FLAGS="-4e"



GENTOO_MIRRORS="ftp://gentoo.imj.fr/pub/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.switch.ch/mirror/gentoo/"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="hardened pic acpi ipv6 ipv4 devfs-compat X gnutls tls ssl cracklib gtk2 -gtk gnome -hal unicode -kde -qt3 -qt4 -arts neXt alsa ogg vorbis cdr dvdr cdparanoia jpeg2k jpeg png tiff kerberos gpg pcmcia tex dvi t1lib lm_sensors gstreamer tk foomaticdb matrox java java6 cups mbox pdf readline curl sse mmx 3dnow svg lcms gimp cairo sane scanner audiofile Xaw3d lzma bzip2 -gzip zlib lzo usb kqemu xemacs emacs latex -nautilus -gksu -extras mercurial hg -git"

LINGUAS="en de"

ALSA_CARDS="cmipci usb-audio"

VIDEO_CARDS="nvidia acpi cirrus dummy fbdev mga vesa vga"



world:
app-admin/logrotate
app-admin/syslog-ng
app-crypt/gnupg
app-editors/xemacs
app-emulation/kqemu
app-emulation/qemu
app-portage/gentoolkit
app-portage/porthole
app-text/evince
app-text/mpage
app-text/psutils
app-xemacs/auctex
app-xemacs/dired
app-xemacs/os-utils
dev-lang/icc
dev-libs/nspr
dev-tex/tex4ht
dev-util/strace
dev-vcs/bzr
dev-vcs/cvs
dev-vcs/mercurial
gnome-base/gdm
mail-filter/procmail
mail-mta/exim
media-gfx/gimp
media-gfx/jpeg2ps
media-gfx/sane-backends
media-gfx/sane-frontends
media-gfx/xsane
media-libs/libpng
media-sound/alsa-tools
media-sound/alsa-utils
media-sound/alsaplayer
media-video/nvidia-settings
net-analyzer/nmap
net-dns/djbdns
net-firewall/iptables
net-ftp/atftp
net-mail/fetchmail
net-misc/curl
net-misc/dhcp
net-misc/openntpd
sys-apps/hotplug
sys-apps/lm_sensors
sys-apps/memtest86+
sys-apps/sg3_utils
sys-boot/grub
sys-devel/bc
sys-devel/gcc
sys-fs/cryptsetup
sys-fs/dosfstools
sys-fs/reiser4progs
sys-power/acpid
sys-power/athcool
sys-power/cpufreqd
sys-process/bcron
sys-process/lsof
virtual/jdk
www-client/epiphany
www-client/links
www-servers/lighttpd
x11-base/xorg-server
x11-drivers/nvidia-drivers
x11-libs/Xaw3d
x11-libs/libX11
x11-libs/neXtaw
x11-terms/gnome-terminal
x11-terms/xterm
Comment 1 Mike Gilbert gentoo-dev 2010-12-31 10:40:31 UTC
Looks like the "error: unknown field 'ioctl' specified in initializer" problem that has been plaguing out-of-tree modules.
Comment 2 Cyprien Nicolas (fulax) 2011-01-04 15:56:47 UTC
Created attachment 258828 [details, diff]
Proposed patch for kqemu-1.3.0_pre11

Here is a proposition of a patch, same fix as in bug 342161 comment 6
(it replaces .ioctl by .unlocked_ioctl in struct file_operations)

It makes the module compiling, but I have not tested the module yet.
Comment 3 Ian Abbott 2011-05-23 11:16:52 UTC
Created attachment 274387 [details, diff]
Improved patch for unlocked_ioctl

Here's an improved patch to use the unlocked_ioctl file operation, based on kqemu-1.4.0_pre1 sources but with a related fix for 2.6.39 (see bug 368439).

Note that for kernel version 2.6.37 and later, the init_MUTEX patch is also required - /usr/portage/app-emulation/kqemu/files/kqemu-1.4.0_pre1-init_MUTEX.patch
Comment 4 Pacho Ramos gentoo-dev 2012-10-06 15:47:41 UTC
Still valid with 1.4.0_pre1-r1?
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2012-12-04 22:37:52 UTC
kqemu is masked for removal so this will not be fixed.