Summary: | alsa-driver-1.0.9b / ipw2200 / software suspend 2 changes definition of 'create_workqueue' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | dynamotwain |
Component: | [OLD] GCC Porting | Assignee: | Henrik Brix Andersen <henrik> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | andy-gentoo_bugzilla, sound, ybhagwat |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Completely untested patch |
Description
dynamotwain
2005-08-05 14:32:22 UTC
I just checked on my other Gentoo install... It compiles fine for me in gcc-3.4.3-20050110-r2 I am using the hda-intel codec and have the same problem. I have been able to track this down to the definition of the __create_workqueue function and the two macros create_workqueue and create_singlethread_workqueue in the kernel's include/linux/workqueue.h In the sys-kernel/gentoo-sources, __create_workqueue requires two parameters. The two macros require one parameter and supply the second to __create_workqueue. In sys-kernel/suspend2-sources, __create_workqueue requires three parameters. The two macros require two parameters and supply the third to __create_workqueue. The two alsa drivers in the suspend2-sources provide both parameters to the macros. The drivers in media-sound/alsa-driver do not. This is what causes the error message. As near as I can figure from reading the kernel source, the correct call for create_workqueue in the hda-codec looks like this: create_workqueue("hda_codec", 0); -- Mik Well, then... Unless I want to patch alsa-kernel myself or goto plain vanilla sources, I guess I'll have to wait for 2.6.13 to come out for working audio on my laptop. Same problem with net-wireless/ipw2200-1.0.6-r1, sys-devel/gcc-3.4.4-r1 and sys-kernel/suspend2-sources-2.6.12-r5 >>> md5 src_uri ;-) ipw2200-1.0.6.tgz * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.12-suspend2-r5acpi-2.1.9.9 * Checking for suitable kernel configuration options >>> Unpacking source... >>> Unpacking ipw2200-1.0.6.tgz to /var/tmp/portage/ipw2200-1.0.6-r1/work * Applying ipw2200-1.0.6-hwcrypt-wpa-fix4.patch ... [ ok ] * Applying ipw2200-1.0.6-suspend2.patch ... [ ok ] >>> Source unpacked. * * You may safely ignore any errors from compilation that contain * warnings about undefined references to the ieee80211 subsystem. * * Preparing ipw2200 module mkdir -p /var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/tmp/.tmp_versions cp /usr/include/*.mod /var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/tmp/.tmp_versions cp: cannot stat `/usr/include/*.mod': No such file or directory make: [modules] Error 1 (ignored) make -C /usr/src/linux M=/var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6 MODVERDIR=/var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/tmp/.tmp_versions modules make[1]: Entering directory `/usr/src/linux-2.6.12-suspend2-r5' CC [M] /var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/ipw2200.o /var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/ipw2200.c:10258:45: macro "create_workqueue" requires 2 arguments, but only 1 given /var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/ipw2200.c: In function `ipw_setup_deferred_work': /var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/ipw2200.c:10258: error: `create_workqueue' undeclared (first use in this function) /var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/ipw2200.c:10258: error: (Each undeclared identifier is reported only once /var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/ipw2200.c:10258: error: for each function it appears in.) make[2]: *** [/var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6/ipw2200.o] Error 1 make[1]: *** [_module_/var/tmp/portage/ipw2200-1.0.6-r1/work/ipw2200-1.0.6] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.12-suspend2-r5' make: *** [modules] Error 2 !!! ERROR: net-wireless/ipw2200-1.0.6-r1 failed. !!! Function linux-mod_src_compile, Line 460, Exitcode 2 !!! Unable to make KSRC=/usr/src/linux KSRC_OUTPUT=/usr/src/linux IEEE80211_INC=/usr/include all. !!! If you need support, post the topmost build error, NOT this status message. Hi, Also a problem with GCC-3.4.4-r1 and alsa-driver-1.0.9b, but rather different one. alsa-driver-1.0.9b compiles/installs OK, only later 'alsasound' can't load the modules, below are the logs from 'dmesg': ...BEGIN... snd_page_alloc: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be '2.6.12-gentoo-r10 preempt K7 gcc-3.3' snd: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be '2.6.12-gentoo-r10 preempt K7 gcc-3.3' snd_timer: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be '2.6.12-gentoo-r10 preempt K7 gcc-3.3' snd_pcm: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be '2.6.12-gentoo-r10 preempt K7 gcc-3.3' snd_ac97_codec: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be '2.6.12-gentoo-r10 preempt K7 gcc-3.3' snd_seq_device: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be '2.6.12-gentoo-r10 preempt K7 gcc-3.3' snd_rawmidi: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be '2.6.12-gentoo-r10 preempt K7 gcc-3.3' snd_ens1371: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be '2.6.12-gentoo-r10 preempt K7 gcc-3.3' ...END... As i have an older GCC-3.3.5 too (emerging 3.3.6 now), compiled alsa-driver with it, and all works now w/o any other changes. NOTE: my kernel-2.6.12-r10 is also compiled with 3.3.5 IIRC. PS: same kind of problem with "nvidia-kernel" module, OK with GCC-3.3.5. Thanks. Rumen (In reply to comment #5) > snd_page_alloc: version magic '2.6.12-gentoo-r10 preempt K7 gcc-3.4' should be > '2.6.12-gentoo-r10 preempt K7 gcc-3.3' Your kernel is compiled with gcc-3.3.x and you tried to install a module compiled with gcc 3.4.y. > As i have an older GCC-3.3.5 too (emerging 3.3.6 now), compiled alsa-driver with > it, and all works now w/o any other changes. > NOTE: my kernel-2.6.12-r10 is also compiled with 3.3.5 IIRC. > PS: same kind of problem with "nvidia-kernel" module, OK with GCC-3.3.5. > Thanks. Rumen The kernel keeps track of which major-version of GCC was used to compile it, and expects all modules to be compiled by the same major-version. I don't know the exact reason, but I believe it is a safety thing. GCC has a habbit of changing the way things work between major versions... 3.4 has pentium-m cpu tuning, whereas 3.3 did not, register arguments might be passed in a different order, etc. If you wish, recompile your kernel with GCC 3.4... then all your modules should compile fine with it... if not, there's another bug involved. If you don't want to do a kernel recompile, you can use gcc-config to switch between gcc 3.3 and 3.4 before and after compiling modules, as they are installed in different slots. [I've renamed the bug, since it's been confirmed that swsusp2 is the problem, not gcc.] Created attachment 71813 [details, diff]
Completely untested patch
This change of arguments was removed in >=sys-kernel/suspend2-sources-2.6.13 of
which -r4 was just marked stable on x86.
If you really want to use the external alsa-driver with
<=suspend2-sources-2.6.13 you can try this patch...
Closing as WONTFIX. *** Bug 112768 has been marked as a duplicate of this bug. *** *** Bug 113130 has been marked as a duplicate of this bug. *** |