Missing symbols since 1.0.14rc1
I had a couple of users report that alsa-driver-1.0.14rc2 and alsa-driver-1.0.14rc3 would no longer load due to missing symbols. I am able to reproduce this on a RedHat Enterprise Linux 4 update 4 kernel (2.6.9-42.0.0.0.1.EL) after modifying ./alsa-driver/include/adriver.h to not typedef gfp_t (Redhat pulled that typedef in starting with 4U3).
The error when loading snd.ko is:
snd: Unknown symbol sound_class1
FATAL: Error inserting snd (<path to module>): Unknown symbol in module, or unknown parameter (see dmesg).
dmesg reports the same thing.
This worked fine in 1.0.14rc1. I'm looking through the change logs to see what may have broken it.
Signature · 1 line
Tobin Davis <[email protected]>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Wed, 07 Mar 2007 15:09:34 -0800,
Quoted 6 lines · Tobin Davis
I had a couple of users report that alsa-driver-1.0.14rc2 and alsa-driver-1.0.14rc3 would no longer load due to missing symbols. I am able to reproduce this on a RedHat Enterprise Linux 4 update 4 kernel (2.6.9-42.0.0.0.1.EL) after modifying ./alsa-driver /include/adriver.h to not typedef
gfp_t(Redhat pulled that typedef in starting with 4U3).
Oh that RH kernel... Since I personally never used RH kernels, it's hard to debug. Could you check whether it has any RH-specific defines or such so that we can add another ifdef, e.g. #ifdef CONFIG_REDHAT_KERNEL or so...?
Quoted 10 lines
The error when loading snd.ko is:
snd: Unknown symbol
sound_class1
FATAL: Error inserting snd (<path to module>): Unknown symbol in module, or unknown parameter (see dmesg).dmesg reports the same thing.
This worked fine in 1.0.14rc1. I'm looking through the change logs to see what may have broken it.
Looks like a typo during conversion. Simply replace from sound_class1 to sound_class in alsa-driver/acore/sound.c.
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 9 lines · Takashi Iwai
At Wed, 07 Mar 2007 15:09:34 -0800,
Quoted 6 lines · Tobin Davis
I had a couple of users report that alsa-driver-1.0.14rc2 and alsa-driver-1.0.14rc3 would no longer load due to missing symbols. I am able to reproduce this on a RedHat Enterprise Linux 4 update 4 kernel (2.6.9-42.0.0.0.1.EL) after modifying ./alsa-driver /include/adriver.h to not typedef
gfp_t(Redhat pulled that typedef in starting with 4U3).
Quoted 4 lines
Oh that RH kernel... Since I personally never used RH kernels, it's hard to debug. Could you check whether it has any RH-specific defines or such so that we can add another ifdef, e.g. #ifdef
CONFIG_REDHAT_KERNELor so...?
No, nothing that I can find. That of course would be too easy.
Quoted 7 lines
Quoted 7 lines
The error when loading snd.ko is:
snd: Unknown symbol
sound_class1
FATAL: Error inserting snd (<path to module>): Unknown symbol in module, or unknown parameter (see dmesg).
Quoted 8 lines
Quoted 4 lines
dmesg reports the same thing.
This worked fine in 1.0.14rc1. I'm looking through the change logs to see what may have broken it.
Looks like a typo during conversion. Simply replace from
sound_class1tosound_classinalsa-driver/acore/sound.c.
The change took place in the "reflect 'struct device *' changes from 2.6, add SND_AC97_BUS kernel dependancy" patch from Dec 15. Patch ID 3208:965d76adda57.
The patch you just added, while correcting the typo, now creates a compiler error:
CC [M] /usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.o
/usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c:72: error:
conflicting types for 'sound_class'
/usr/src/alsa/alsa-driver-1.0.14rc2/include/sound/core.h:198:
error: previous declaration of 'sound_class' was here
/usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c:72: error:
conflicting types for 'sound_class'
/usr/src/alsa/alsa-driver-1.0.14rc2/include/sound/core.h:198:
error: previous declaration of 'sound_class' was here
/usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c: In function
`snd_open':
/usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c:171: warning:
assignment discards qualifiers from pointer target type
/usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c:176: warning:
assignment discards qualifiers from pointer target type
make[4]: *** [/usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.o]
Error 1And I'm not sure if it will break other distributions or not. There is always the off chance that this is also a Redhat backporting issue, rare as it seams. :)
I'm looking it over now and will let you know what I find.
Signature · 8 lines
Tobin Davis <[email protected]> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Thu, 08 Mar 2007 08:14:45 -0800,
Quoted 11 lines · Tobin Davis
Quoted 9 lines · Takashi Iwai
At Wed, 07 Mar 2007 15:09:34 -0800,
Quoted 6 lines · Tobin Davis
I had a couple of users report that alsa-driver-1.0.14rc2 and alsa-driver-1.0.14rc3 would no longer load due to missing symbols. I am able to reproduce this on a RedHat Enterprise Linux 4 update 4 kernel (2.6.9-42.0.0.0.1.EL) after modifying ./alsa-driver /include/adriver.h to not typedef
gfp_t(Redhat pulled that typedef in starting with 4U3).
Quoted 6 lines
Quoted 4 lines
Oh that RH kernel... Since I personally never used RH kernels, it's hard to debug. Could you check whether it has any RH-specific defines or such so that we can add another ifdef, e.g. #ifdef
CONFIG_REDHAT_KERNELor so...?No, nothing that I can find. That of course would be too easy.
Grmble...
Quoted 40 lines
Quoted 6 lines
Quoted 6 lines
The error when loading snd.ko is:
snd: Unknown symbol
sound_class1
FATAL: Error inserting snd (<path to module>): Unknown symbol in module, or unknown parameter (see dmesg).Quoted 8 lines
Quoted 4 lines
dmesg reports the same thing.
This worked fine in 1.0.14rc1. I'm looking through the change logs to see what may have broken it.
Looks like a typo during conversion. Simply replace from
sound_class1tosound_classinalsa-driver/acore/sound.c.The change took place in the "reflect 'struct device *' changes from 2.6, add
SND_AC97_BUSkernel dependancy" patch from Dec 15. Patch ID 3208:965d76adda57.The patch you just added, while correcting the typo, now creates a compiler error:
CC [M] /usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.o /usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c:72: error: conflicting types for 'sound_class' /usr/src/alsa/alsa-driver-1.0.14rc2/include/sound/core.h:198: error: previous declaration of 'sound_class' was here /usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c:72: error: conflicting types for 'sound_class' /usr/src/alsa/alsa-driver-1.0.14rc2/include/sound/core.h:198: error: previous declaration of 'sound_class' was here /usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c: In function `snd_open': /usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c:171: warning: assignment discards qualifiers from pointer target type /usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.c:176: warning: assignment discards qualifiers from pointer target type make[4]: *** [/usr/src/alsa/alsa-driver-1.0.14rc2/acore/sound.o] Error 1
Quoted 3 lines
And I'm not sure if it will break other distributions or not. There is always the off chance that this is also a Redhat backporting issue, rare as it seams. :)
OK, that's a mess. How about the patch (over patch) below?
thanks,
Takashi
acore/sound.patch +14 -24
@@ -1,5 +1,5 @@ ---- ../alsa-kernel/core/sound.c 2006-12-14 15:41:34.000000000 +0100 -+++ sound.c 2006-12-15 14:08:46.000000000 +0100 +--- ../alsa-kernel/core/sound.c 2007-02-13 14:53:03.000000000 +0100 ++++ sound.c 2007-03-08 17:21:01.000000000 +0100 @@ -41,6 +41,9 @@ EXPORT_SYMBOL(snd_major);
@@ -21,20 +21,9 @@ MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); /* this one holds the actual max. card number currently available. -@@ -61,6 +68,10 @@ - static struct snd_minor *snd_minors[SNDRV_OS_MINORS]; - static DEFINE_MUTEX(sound_mutex); - -+#ifdef CONFIG_SND_HAVE_CLASS_SIMPLE -+extern struct class_simple *sound_class; -+#endif -+ - #ifdef CONFIG_KMOD - - /** -@@ -170,7 +181,9 @@ - - static struct file_operations snd_fops = +@@ -170,7 +177,9 @@ + + static const struct file_operations snd_fops = { +#ifndef LINUX_2_2 .owner = THIS_MODULE,
@@ -42,7 +31,7 @@ .open = snd_open }; -@@ -242,7 +255,11 @@ +@@ -242,7 +251,11 @@ struct snd_minor *preg; snd_assert(name, return -EINVAL);
@@ -54,7 +43,7 @@ if (preg == NULL) return -ENOMEM; preg->type = type; -@@ -250,6 +267,9 @@ +@@ -250,6 +263,9 @@ preg->device = dev; preg->f_ops = f_ops; preg->private_data = private_data;
@@ -64,7 +53,7 @@ mutex_lock(&sound_mutex); #ifdef CONFIG_SND_DYNAMIC_MINORS minor = snd_find_free_minor(); -@@ -264,10 +284,25 @@ +@@ -264,10 +280,26 @@ return minor; } snd_minors[minor] = preg;
@@ -79,7 +68,8 @@ if (preg->dev) dev_set_drvdata(preg->dev, private_data); +#elif defined(CONFIG_SND_HAVE_CLASS_SIMPLE) -+ class_simple_device_add(sound_class, MKDEV(major, minor), device, name); ++ class_simple_device_add((struct class_simple *)sound_class, ++ MKDEV(major, minor), device, name); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 2) + preg->dev = (struct device *)class_device_create(sound_class, NULL, + MKDEV(major, minor),
@@ -90,7 +80,7 @@ mutex_unlock(&sound_mutex); return 0; -@@ -307,6 +342,9 @@ +@@ -307,6 +339,9 @@ int snd_unregister_device(int type, struct snd_card *card, int dev) { int minor;
@@ -100,7 +90,7 @@ mutex_lock(&sound_mutex); minor = find_snd_minor(type, card, dev); -@@ -315,7 +353,20 @@ +@@ -315,7 +350,20 @@ return -EINVAL; }
@@ -121,7 +111,7 @@ kfree(snd_minors[minor]); snd_minors[minor] = NULL; -@@ -328,16 +379,28 @@ +@@ -328,16 +376,28 @@ int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev, struct device_attribute *attr) {
@@ -151,7 +141,7 @@ } EXPORT_SYMBOL(snd_add_device_sysfs_file); -@@ -423,32 +486,81 @@ +@@ -423,32 +483,81 @@ * INIT PART */
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV