Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232390 - =media-video/qc-usb-0.6.6 fails to compile with kernel 2.6.26
Summary: =media-video/qc-usb-0.6.6 fails to compile with kernel 2.6.26
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-20 00:05 UTC by Christohper Harrington
Modified: 2008-10-23 21:42 UTC (History)
2 users (show)

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


Attachments
Temporary fix for qc-usb and 2.6.26 (qc-usb_kernel-2.6.26.patch,689 bytes, patch)
2008-07-20 22:44 UTC, Kevin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christohper Harrington 2008-07-20 00:05:26 UTC
Can't compile this package with kernel 2.6.26-gentoo. Just recompiled kernel 2.6.25-gentoo-r6 and compile succeeds.

Relevant kernel configs
<*> Video For Linux
[*]   Enable Video For Linux API 1 (DEPRECATED)
-*-   Enable Video For Linux API 1 compatible Layer

[*] Enable unused/obsolete exported symbols

Can attach whole .config at request.


Reproducible: Always

Steps to Reproduce:
0. emerge -C '<sys-kernel/gentoo-sources-2.6.26'
1. emerge =sys-kernel/gentoo-sources-2.6.26
2. configure, build, and install kernel
3. reboot (or fancy people could just kexec I guess)
4. emerge =media-video/qc-usb-0.6.6

Actual Results:  
5. "* ERROR: media-video/qc-usb-0.6.6 failed."

Expected Results:  
5. ">>> media-video/qc-usb-0.6.6 merged."

chariot qc-usb # emerge --info
Portage 2.2_rc1 (default/linux/x86/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo i686)
=================================================================
System uname: Linux-2.6.26-gentoo-i686-Intel-R-_Core-TM-2_Duo_CPU_E8200_@_2.66GHz-with-glibc2.0
Timestamp of tree: Thu, 17 Jul 2008 16:18:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r6, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.62-r1
sys-devel/automake:  1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://lug.mtu.edu/gentoo/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://172.18.251.187/gentoo-portage"
USE="apache2 bzip2 cdparanoia cli crypt ctype curl ffmpeg flac ftp gd gnutls ldap mp4 mysql mysqli ogg ogg123 pcre php posix postgres samba session simplexml socks5 speex sse sse2 sse3 ssl syslog truetype unicode urandom v4l v4l2 vorbis x264 x86 xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authz_host dir mime" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


chariot qc-usb # tail -30 /var/tmp/portage/media-video/qc-usb-0.6.6/temp/build.log 
/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-driver.c:1869: warning: assignment from incompatible pointer type
  i686-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/.qc-formats.o.d  -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2   -fno-stack-protector -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2  -march=i686 -mtune=core2 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign   -DNOKERNEL -DHAVE_UTSRELEASE_H=1  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(qc_formats)"  -D"KBUILD_MODNAME=KBUILD_STR(quickcam)" -c -o /var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-formats.o /var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb6.6/qc-vv6410.c
-0.6.6/qc-formats.c
  i686-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/.qc-mjpeg.o.d  -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2   -fno-stack-protector -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2  -march=i686 -mtune=core2 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign   -DNOKERNEL -DHAVE_UTSRELEASE_H=1  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(qc_mjpeg)"  -D"KBUILD_MODNAME=KBUILD_STR(quickcam)" -c -o /var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-mjpeg.o /var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-mjpeg.c
  i686-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/.qc-memory.o.d  -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2   -fno-stack-protector -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2  -march=i686 -mtune=core2 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign   -DNOKERNEL -DHAVE_UTSRELEASE_H=1  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(qc_memory)"  -D"KBUILD_MODNAME=KBUILD_STR(quickcam)" -c -o /var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-memory.o /var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-memory.c
(cat /dev/null;   echo kernel//var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/quickcam.ko;) > /var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/modules.order
/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-memory.c: In function 'qc_mm_rvmalloc':
/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-memory.c:207: error: implicit declaration of function 'mem_map_reserve'
/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-memory.c: In function 'qc_mm_rvfree':
/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-memory.c:225: error: implicit declaration of function 'mem_map_unreserve'
make[2]: *** [/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6/qc-memory.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/var/tmp/portage/media-video/qc-usb-0.6.6/work/qc-usb-0.6.6] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.26-gentoo'
make: *** [quickcam.ko] Error 2
 * 
 * ERROR: media-video/qc-usb-0.6.6 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3115:  Called linux-mod_src_compile
 *             environment, line 2387:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" 						CC=\"$(get-KERNEL_CC)\" 						LDFLAGS=\"$(get_abi_LDFLAGS)\" 						${BUILD_FIXES} 						${BUILD_PARAMS} 						${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS=  LINUX_DIR=/usr/src/linux OUTPUT_DIR=/lib/modules/2.6.26-gentoo/build all
[snip]
Comment 1 Kevin 2008-07-20 22:42:37 UTC
I used the following patch and tested momentarily on stickam.  This seems to work for the brief period that I tested it and may NOT be the best fix at all.  Someone who knows wtf happened with mem_map_(un)reserve in 2.6.26 could probably suggest the proper fix, but this still worked.

--- qc-memory.c 2006-11-04 07:34:32.000000000 -0600
+++ qc-memory.c 2008-07-20 17:01:13.000000000 -0500
@@ -81,12 +81,15 @@
 #define pte_offset(pmd,adr)    pte_offset_map(pmd,adr) /* Emulation for a kernel using the new rmap-vm */
 #endif                                                 /* Fix by Michele Balistreri <brain87@gmx.net> */

+
+#if LINUX_VERSION_CODE>=KERNEL_VERSION(2,5,3) &&  LINUX_VERSION_CODE<KERNEL_VERSION(2,6,26)
 #ifndef SetPageReserved
 #define SetPageReserved(p)     mem_map_reserve(p)
 #endif
 #ifndef ClearPageReserved
 #define ClearPageReserved(p)   mem_map_unreserve(p)
 #endif
+#endif
 /* }}} */

 /* {{{ [fold] kvirt_to_pa(): obtain physical address from virtual address obtained by vmalloc() */

- Extract the contents of qc-usb-0.6.6.tar.gz somewhere temp.
- Enter the directory qc-usb-0.6.6
- Put the patch above into a text file (qc-usb.patch)
- Apply the patch (patch -p0 < qc-usb.patch)
- cd ../
- compress the source (tar cvzf qc-usb-0.6.6.tar.gz qc-usb-0.6.6)
- copy the source to distfiles (cp qc-usb-0.6.6.tar.gz /usr/portage.distfiles)
- re-digest the source (ebuild /usr/portage/media-video/qc-usb/qc-usb-0.6.6.ebuild digest)
- emerge qc-usb
- Profit?
Comment 2 Kevin 2008-07-20 22:44:40 UTC
Created attachment 160964 [details, diff]
Temporary fix for qc-usb and 2.6.26

See my comments in the bug replies
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-10-23 21:42:31 UTC
Got some patches from the following bugs so I wrote a 0.6.6-r1 which includes patches for 2.6.26 and 2.6.27. Sorry for the delay.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491754
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/268134