Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127292 - media-video/qc-usb-0.6.3 does not set ARCH for kernel
Summary: media-video/qc-usb-0.6.3 does not set ARCH for kernel
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alastair Tse (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-23 04:47 UTC by Natanael Copa
Modified: 2006-03-31 09:41 UTC (History)
1 user (show)

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


Attachments
qc-usb-0.6.3.ebuild.patch (qc-usb-0.6.3.ebuild.patch,327 bytes, patch)
2006-03-31 07:44 UTC, Natanael Copa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2006-03-23 04:47:56 UTC
I compile my gentoo embedded project. When running on an x86 arch computer it compiles just fine but when I compile on a amd64 arch it fails:

 gcc -Wp,-MD,/var/tmp/portage/qc-usb-0.6.3/work/qc-usb-0.6.3/.qc-hdcs.o.d  -nostdinc -isystem /usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.5/include -D__KERNEL__ -Iinclude  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os     -fomit-frame-pointer  -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks        -Wno-sign-compare -fno-asynchronous-unwind-tables     -DNOKERNEL   -DMODULE -DKBUILD_BASENAME=qc_hdcs -DKBUILD_MODNAME=quickcam -c -o /var/tmp/portage/qc-usb-0.6.3/work/qc-usb-0.6.3/.tmp_qc-hdcs.o /var/tmp/portage/qc-usb-0.6.3/work/qc-usb-0.6.3/qc-hdcs.c
/var/tmp/portage/qc-usb-0.6.3/work/qc-usb-0.6.3/qc-driver.c:1: error: code model `kernel' not supported in the 32 bit mode
make[3]: *** [/var/tmp/portage/qc-usb-0.6.3/work/qc-usb-0.6.3/qc-driver.o] Error 1

hardened kernel # emerge --info
Portage 2.0.54 (uclibc/x86/hardened, gcc-3.4.5, uclibc-0.9.28-r0, 2.6.16-gentoo x86_64)
=================================================================
System uname: 2.6.16-gentoo x86_64 Intel(R) Pentium(R) D CPU 3.00GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-gentoo-linux-uclibc"
CFLAGS="-march=i386 -Os -pipe -fomit-frame-pointer"
CHOST="i386-gentoo-linux-uclibc"


The funny thing is that all other kernel drivers compiles just fine.

I looked at the ebuild and it uses "emake ..." and fails while other kernel drivers uses "linux-mod_src_compile" and they work.

Could it be modified to use linux-mod_src_compile?
Comment 1 Natanael Copa 2006-03-31 07:43:14 UTC
Its enough to pass ARCH="$(tc-arch-kernel)"  to emake.
Comment 2 Natanael Copa 2006-03-31 07:44:06 UTC
Created attachment 83518 [details, diff]
qc-usb-0.6.3.ebuild.patch

The attatched patch fixes the problem. Please commit and close bug.
Comment 3 Simon Stelling (RETIRED) gentoo-dev 2006-03-31 09:24:09 UTC
(In reply to comment #0)
> hardened kernel # emerge --info
> Portage 2.0.54 (uclibc/x86/hardened, gcc-3.4.5, uclibc-0.9.28-r0, 2.6.16-gentoo
> x86_64)
> =================================================================
> System uname: 2.6.16-gentoo x86_64 Intel(R) Pentium(R) D CPU 3.00GHz
> ACCEPT_KEYWORDS="x86"
> AUTOCLEAN="yes"
> CBUILD="i386-gentoo-linux-uclibc"
> CFLAGS="-march=i386 -Os -pipe -fomit-frame-pointer"
> CHOST="i386-gentoo-linux-uclibc"

did you forget to prepend the chroot command with linux32?

I set ABI=${KERNEL_ABI} in the ebuild, should fix it from the multilib part, but it could be that the ARCH is still needed. can't test it since my testing chroot is somehow messed up :/
Comment 4 Natanael Copa 2006-03-31 09:41:30 UTC
(In reply to comment #3)
> did you forget to prepend the chroot command with linux32?

hum.... yes... wasn't even aware of it. This 64 bit thing is brand new. (and I obviously haven't read the doc enough)

Everything else has compiled just fine. I discovered that kernel compiling failed unless ARCH was given to make.

Also all other kernel module packages used linux-mod_src_compile and they just worked.

> I set ABI=${KERNEL_ABI} in the ebuild, should fix it from the multilib part,
> but it could be that the ARCH is still needed. can't test it since my testing
> chroot is somehow messed up :/

the ARCH will not hurt at least.

I just tried with linux32 infront of chroot and no problems at all.

I mark this as invalid.
Thanks!