Skip to contentSkip to conversation

1.0.16rc1 release -- error: ‘system_utsname’ undeclared

DISCUSSION Brad Milne 2 participants 6 messages Jan 24, 2008 1 message not in the archive

lore
Share & tools
lore

Brad Milne

author
#0 lore raw
Quoted 58 lines

From tiwai at suse.de Wed Jan 23 08:31:32 2008
From: tiwai at suse.de (Takashi Iwai)
Date: Wed, 23 Jan 2008 08:31:32 +0100
Subject: [alsa-devel]
=?iso-8859-7?q?1=2E0=2E16rc1_release_--_error=3A_=A1?= =?iso-8859-7?q?system=5Futsname=A2_undeclared?=
In-Reply-To: <s5htzl5t45y.wl%[email protected]>
References: < [email protected]>

    <[email protected]> <s5htzl5t45y.wl%[email protected] >

Message-ID: <s5hsl0pt2uj.wl%[email protected]>

At Wed, 23 Jan 2008 08:03:05 +0100,

Quoted 33 lines · I wrote:

At Wed, 23 Jan 2008 06:25:54 +1100,

Quoted 14 lines · Rick Measham

[1 <multipart/signed (7bit)>]
[1.1 <text/plain; UTF-8 (quoted-printable)>]

Quoted 1 line · Jaroslav Kysela

1.0.16rc1 release is available for download on

Running Kubuntu:

# uname -a
Linux lugtop 2.6.20-16-386 #2 Sun Sep 23 19:47:10 UTC 2007 i686 GNU/Linux

During the make:

Quoted 15 lines

In file included from /usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.c:7:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:
In function ?snd_sndstat_proc_read?:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: ?system_utsname? undeclared (first use in this function) /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: (Each undeclared identifier is reported only once /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: for each function it appears in.)
make[3]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.o] Error 1 make[2]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore] Error 2 make[1]: *** [_module_/usr/src/alsa/alsa-driver-1.0.16rc1] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-386'
make: *** [compile] Error 2

Quoted 1 line

Isn't it fixed on HG version?

Nevermind, I myself can confirm that it's broken. The patch below should fix the problem.

Takashi

diff -r a5f603cb254a configure.in

configure.in Wed Jan 23 08:28:56 2008 +0100 init_utsname="0" · line 2577

Quoted 8 lines
configure.in Wed Jan 23 08:28:56 2008 +0100 renamed from configure.in Tue Jan 22 17:52:34 2008 +0100 +1 -1
@@ -2571,7 +2571,7 @@ init_utsname="0"
 init_utsname="0"
 ac_save_CFLAGS="$CFLAGS"
 ac_save_CC="$CC"
-CFLAGS="$KERNEL_CHECK_CFLAGS -Werror"
+CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration"
 CC=$KCC
 AC_TRY_COMPILE([
 #define __KERNEL__

It doesn't seem that it is fixed in HG or by this patch (though I do get:
patching file configure.in
Hunk #1 succeeded at 1579 with fuzz 2 (offset
-992 lines).
patch unexpectedly ends in middle of line
when patching), I get the exact same error in both. I don't pretend to know a lot about alsa workings, but is this patch in the right area as the error complains about 'system_utsname', not 'init_utsname'?

Brad

#1 lore raw

At Thu, 24 Jan 2008 23:40:55 +1300,

Quoted 66 lines · Brad Milne
Quoted 66 lines

From tiwai at suse.de Wed Jan 23 08:31:32 2008
From: tiwai at suse.de (Takashi Iwai)
Date: Wed, 23 Jan 2008 08:31:32 +0100
Subject: [alsa-devel]
=?iso-8859-7?q?1=2E0=2E16rc1_release_--_error=3A_=A1?= =?iso-8859-7?q?system=5Futsname=A2_undeclared?=
In-Reply-To: <s5htzl5t45y.wl%[email protected]>
References: < [email protected]>

    <[email protected]> <s5htzl5t45y.wl%[email protected] >

Message-ID: <s5hsl0pt2uj.wl%[email protected]>

At Wed, 23 Jan 2008 08:03:05 +0100,

Quoted 33 lines · I wrote:

At Wed, 23 Jan 2008 06:25:54 +1100,

Quoted 14 lines · Rick Measham

[1 <multipart/signed (7bit)>]
[1.1 <text/plain; UTF-8 (quoted-printable)>]

Quoted 1 line · Jaroslav Kysela

1.0.16rc1 release is available for download on

Running Kubuntu:

# uname -a
Linux lugtop 2.6.20-16-386 #2 Sun Sep 23 19:47:10 UTC 2007 i686 GNU/Linux

During the make:

Quoted 15 lines

In file included from /usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.c:7:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:
In function ?snd_sndstat_proc_read?:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: ?system_utsname? undeclared (first use in this function) /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: (Each undeclared identifier is reported only once /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: for each function it appears in.)
make[3]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.o] Error 1 make[2]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore] Error 2 make[1]: *** [_module_/usr/src/alsa/alsa-driver-1.0.16rc1] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-386'
make: *** [compile] Error 2

Quoted 1 line

Isn't it fixed on HG version?

Nevermind, I myself can confirm that it's broken. The patch below should fix the problem.

Takashi

diff -r a5f603cb254a configure.in

configure.in Wed Jan 23 08:28:56 2008 +0100 renamed from configure.in Tue Jan 22 17:52:34 2008 +0100 +1 -1
@@ -2571,7 +2571,7 @@ init_utsname="0"
 init_utsname="0"
 ac_save_CFLAGS="$CFLAGS"
 ac_save_CC="$CC"
-CFLAGS="$KERNEL_CHECK_CFLAGS -Werror"
+CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration"
 CC=$KCC
 AC_TRY_COMPILE([
Quoted 8 lines

configure.in Wed Jan 23 08:28:56 2008 +0100 init_utsname="0" · line 2577

Quoted 1 line
configure.in Wed Jan 23 08:28:56 2008 +0100 renamed from configure.in Tue Jan 22 17:52:34 2008 +0100 +0 -0
 #define __KERNEL__

It doesn't seem that it is fixed in HG or by this patch (though I do get:
patching file configure.in
Hunk #1 succeeded at 1579 with fuzz 2 (offset
-992 lines).
patch unexpectedly ends in middle of line
when patching), I get the exact same error in both.

And did you run hgcompile after that?

Quoted 3 lines

I don't pretend to
know a lot about alsa workings, but is this patch in the right area as the error complains about 'system_utsname', not 'init_utsname'?

It's about both. The configure script didn't check the existence of init_utsname() properly due to compile warnings on older kernels. My patch fixes the configure script but you have to regenerate the configure script itself.

Takashi

author
#2 lore raw
Quoted 78 lines · Takashi Iwai

At Thu, 24 Jan 2008 23:40:55 +1300,

Quoted 66 lines · Brad Milne
Quoted 66 lines

From tiwai at suse.de Wed Jan 23 08:31:32 2008
From: tiwai at suse.de (Takashi Iwai)
Date: Wed, 23 Jan 2008 08:31:32 +0100
Subject: [alsa-devel]
=?iso-8859-7?q?1=2E0=2E16rc1_release_--_error=3A_=A1?= =?iso-8859-7?q?system=5Futsname=A2_undeclared?=
In-Reply-To: <s5htzl5t45y.wl%[email protected]>
References: < [email protected]>

    <[email protected]> <s5htzl5t45y.wl%[email protected] >

Message-ID: <s5hsl0pt2uj.wl%[email protected]>

At Wed, 23 Jan 2008 08:03:05 +0100,

Quoted 33 lines · I wrote:

At Wed, 23 Jan 2008 06:25:54 +1100,

Quoted 14 lines · Rick Measham

[1 <multipart/signed (7bit)>]
[1.1 <text/plain; UTF-8 (quoted-printable)>]

Quoted 1 line · Jaroslav Kysela

1.0.16rc1 release is available for download on

Running Kubuntu:

# uname -a
Linux lugtop 2.6.20-16-386 #2 Sun Sep 23 19:47:10 UTC 2007 i686 GNU/Linux

During the make:

Quoted 15 lines

In file included from /usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.c:7:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:
In function ?snd_sndstat_proc_read?:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: ?system_utsname? undeclared (first use in this function) /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: (Each undeclared identifier is reported only once /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: for each function it appears in.)
make[3]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.o] Error 1 make[2]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore] Error 2 make[1]: *** [_module_/usr/src/alsa/alsa-driver-1.0.16rc1] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-386'
make: *** [compile] Error 2

Quoted 1 line

Isn't it fixed on HG version?

Nevermind, I myself can confirm that it's broken. The patch below should fix the problem.

Takashi

diff -r a5f603cb254a configure.in

configure.in Wed Jan 23 08:28:56 2008 +0100 renamed from configure.in Tue Jan 22 17:52:34 2008 +0100 +1 -1
@@ -2571,7 +2571,7 @@ init_utsname="0"
 init_utsname="0"
 ac_save_CFLAGS="$CFLAGS"
 ac_save_CC="$CC"
-CFLAGS="$KERNEL_CHECK_CFLAGS -Werror"
+CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration"
 CC=$KCC
 AC_TRY_COMPILE([
Quoted 8 lines

configure.in Wed Jan 23 08:28:56 2008 +0100 init_utsname="0" · line 2577

Quoted 1 line
configure.in Wed Jan 23 08:28:56 2008 +0100 renamed from configure.in Tue Jan 22 17:52:34 2008 +0100 +0 -0
 #define __KERNEL__

It doesn't seem that it is fixed in HG or by this patch (though I do get:
patching file configure.in
Hunk #1 succeeded at 1579 with fuzz 2 (offset
-992 lines).
patch unexpectedly ends in middle of line
when patching), I get the exact same error in both.

Quoted 1 line

And did you run hgcompile after that?

If I run:
sudo ./configure
then:
sudo ./hgcompile
on the latest hg code, I still get the same error:
...
from /usr/src/alsa/alsa-driver/acore/info_oss.c:7:
include/linux/utsname.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
...
/usr/src/alsa/alsa-driver/acore/../alsa-kernel/core/info_oss.c: In function 'snd_sndstat_proc_read':
/usr/src/alsa/alsa-driver/acore/../alsa-kernel/core/info_oss.c:96:
error: 'system_utsname' undeclared (first use in this function)
...
make[3]: *** [/usr/src/alsa/alsa-driver/acore/info_oss.o] Error 1
...

Quoted 9 lines
Quoted 4 lines

I don't pretend to
know a lot about alsa workings, but is this patch in the right area as the error complains about 'system_utsname', not 'init_utsname'?

It's about both. The configure script didn't check the existence of init_utsname() properly due to compile warnings on older kernels. My patch fixes the configure script but you have to regenerate the configure script itself.

Sorry, how do I regenerate the configure script? Is that from configure.in?

Quoted 4 lines

Takashi

Thanks
Brad

#3 lore raw

At Fri, 25 Jan 2008 00:18:33 +1300,

Quoted 80 lines · Brad Milne
Quoted 78 lines · Takashi Iwai

At Thu, 24 Jan 2008 23:40:55 +1300,

Quoted 74 lines · Brad Milne
Quoted 59 lines

From tiwai at suse.de Wed Jan 23 08:31:32 2008
From: tiwai at suse.de (Takashi Iwai)
Date: Wed, 23 Jan 2008 08:31:32 +0100
Subject: [alsa-devel]
=?iso-8859-7?q?1=2E0=2E16rc1_release_--_error=3A_=A1?= =?iso-8859-7?q?system=5Futsname=A2_undeclared?=
In-Reply-To: <s5htzl5t45y.wl%[email protected]>
References: < [email protected]>

    <[email protected]> <s5htzl5t45y.wl%[email protected] >

Message-ID: <s5hsl0pt2uj.wl%[email protected]>

At Wed, 23 Jan 2008 08:03:05 +0100,

Quoted 33 lines · I wrote:

At Wed, 23 Jan 2008 06:25:54 +1100,

Quoted 14 lines · Rick Measham

[1 <multipart/signed (7bit)>]
[1.1 <text/plain; UTF-8 (quoted-printable)>]

Quoted 1 line · Jaroslav Kysela

1.0.16rc1 release is available for download on

Running Kubuntu:

# uname -a
Linux lugtop 2.6.20-16-386 #2 Sun Sep 23 19:47:10 UTC 2007 i686 GNU/Linux

During the make:

Quoted 15 lines

In file included from /usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.c:7:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:
In function ?snd_sndstat_proc_read?:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: ?system_utsname? undeclared (first use in this function) /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: (Each undeclared identifier is reported only once /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: for each function it appears in.)
make[3]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.o] Error 1 make[2]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore] Error 2 make[1]: *** [_module_/usr/src/alsa/alsa-driver-1.0.16rc1] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-386'
make: *** [compile] Error 2

Quoted 1 line

Isn't it fixed on HG version?

Nevermind, I myself can confirm that it's broken. The patch below should fix the problem.

Takashi

diff -r a5f603cb254a configure.in

configure.in Wed Jan 23 08:28:56 2008 +0100 init_utsname="0" · line 2577

Quoted 8 lines
configure.in Wed Jan 23 08:28:56 2008 +0100 renamed from configure.in Tue Jan 22 17:52:34 2008 +0100 +1 -1
@@ -2571,7 +2571,7 @@ init_utsname="0"
 init_utsname="0"
 ac_save_CFLAGS="$CFLAGS"
 ac_save_CC="$CC"
-CFLAGS="$KERNEL_CHECK_CFLAGS -Werror"
+CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration"
 CC=$KCC
 AC_TRY_COMPILE([
 #define __KERNEL__

It doesn't seem that it is fixed in HG or by this patch (though I do get:
patching file configure.in
Hunk #1 succeeded at 1579 with fuzz 2 (offset
-992 lines).
patch unexpectedly ends in middle of line
when patching), I get the exact same error in both.

Quoted 6 lines
Quoted 1 line

And did you run hgcompile after that?

If I run:
sudo ./configure
then:
sudo ./hgcompile

You don't have to be root for compiling the driver. The root priv is needed only for installation, i.e. make install.

Quoted 13 lines

on the latest hg code, I still get the same error:

from /usr/src/alsa/alsa-driver/acore/info_oss.c:7:
include/linux/utsname.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
...
/usr/src/alsa/alsa-driver/acore/../alsa-kernel/core/info_oss.c: In function 'snd_sndstat_proc_read':
/usr/src/alsa/alsa-driver/acore/../alsa-kernel/core/info_oss.c:96:
error: 'system_utsname' undeclared (first use in this function)
...
make[3]: *** [/usr/src/alsa/alsa-driver/acore/info_oss.o] Error 1
...

Interesting. You're using 2.6.20 kernel, right?

First check include/config.h. whether it defines CONFIG_HAVE_INIT_UTSNAME. If it's defined, then the build must go well. If it's undefined (commented out), then check configure.in whether the patch was properly applied and -Werror was changed to -Werror=implicit-function-declaration. And see config.log at the place where init_utsname is checked. You must have a compile error there. Show that part.

Takashi

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

At Fri, 25 Jan 2008 00:30:31 +1300,

Quoted 152 lines · Brad Milne
Quoted 109 lines · Takashi Iwai

At Fri, 25 Jan 2008 00:18:33 +1300,

Quoted 80 lines · Brad Milne
Quoted 78 lines · Takashi Iwai

At Thu, 24 Jan 2008 23:40:55 +1300,

Quoted 74 lines · Brad Milne
Quoted 59 lines

From tiwai at suse.de Wed Jan 23 08:31:32 2008
From: tiwai at suse.de (Takashi Iwai)
Date: Wed, 23 Jan 2008 08:31:32 +0100
Subject: [alsa-devel]
=?iso-8859-7?q?1=2E0=2E16rc1_release_--_error=3A_=A1?= =?iso-8859-7?q?system=5Futsname=A2_undeclared?=
In-Reply-To: <s5htzl5t45y.wl%[email protected]>
References: < [email protected]>

    <[email protected]> <s5htzl5t45y.wl%[email protected] >

Message-ID: <s5hsl0pt2uj.wl%[email protected]>

At Wed, 23 Jan 2008 08:03:05 +0100,

Quoted 33 lines · I wrote:

At Wed, 23 Jan 2008 06:25:54 +1100,

Quoted 14 lines · Rick Measham

[1 <multipart/signed (7bit)>]
[1.1 <text/plain; UTF-8 (quoted-printable)>]

Quoted 1 line · Jaroslav Kysela

1.0.16rc1 release is available for download on

Running Kubuntu:

# uname -a
Linux lugtop 2.6.20-16-386 #2 Sun Sep 23 19:47:10 UTC 2007 i686 GNU/Linux

During the make:

Quoted 15 lines

In file included from /usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.c:7:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:
In function ?snd_sndstat_proc_read?:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: ?system_utsname? undeclared (first use in this function) /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: (Each undeclared identifier is reported only once /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: for each function it appears in.)
make[3]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.o] Error 1 make[2]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore] Error 2 make[1]: *** [_module_/usr/src/alsa/alsa-driver-1.0.16rc1] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-386'
make: *** [compile] Error 2

Quoted 1 line

Isn't it fixed on HG version?

Nevermind, I myself can confirm that it's broken. The patch below should fix the problem.

Takashi

diff -r a5f603cb254a configure.in

configure.in Wed Jan 23 08:28:56 2008 +0100 init_utsname="0" · line 2577

Quoted 8 lines
configure.in Wed Jan 23 08:28:56 2008 +0100 renamed from configure.in Tue Jan 22 17:52:34 2008 +0100 +1 -1
@@ -2571,7 +2571,7 @@ init_utsname="0"
 init_utsname="0"
 ac_save_CFLAGS="$CFLAGS"
 ac_save_CC="$CC"
-CFLAGS="$KERNEL_CHECK_CFLAGS -Werror"
+CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration"
 CC=$KCC
 AC_TRY_COMPILE([
 #define __KERNEL__

It doesn't seem that it is fixed in HG or by this patch (though I do get:
patching file configure.in
Hunk #1 succeeded at 1579 with fuzz 2 (offset
-992 lines).
patch unexpectedly ends in middle of line
when patching), I get the exact same error in both.

Quoted 6 lines
Quoted 1 line

And did you run hgcompile after that?

If I run:
sudo ./configure
then:
sudo ./hgcompile

You don't have to be root for compiling the driver. The root priv is needed only for installation, i.e. make install.

Quoted 13 lines

on the latest hg code, I still get the same error:

from /usr/src/alsa/alsa-driver/acore/info_oss.c:7:
include/linux/utsname.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
...
/usr/src/alsa/alsa-driver/acore/../alsa-kernel/core/info_oss.c: In function 'snd_sndstat_proc_read':
/usr/src/alsa/alsa-driver/acore/../alsa-kernel/core/info_oss.c:96:
error: 'system_utsname' undeclared (first use in this function)
...
make[3]: *** [/usr/src/alsa/alsa-driver/acore/info_oss.o] Error 1
...

Interesting. You're using 2.6.20 kernel, right?

Quoted 7 lines

First check include/config.h. whether it defines CONFIG_HAVE_INIT_UTSNAME. If it's defined, then the build must go well. If it's undefined (commented out), then check configure.in whether the patch was properly applied and -Werror was changed to -Werror=implicit-function-declaration. And see config.log at the place where init_utsname is checked. You must have a compile error there. Show that part.

brad@cyborg:/usr/src/alsa/alsa-driver$ uname -a
Linux cyborg 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007
i686 GNU/Linux

include/config.h:
/* 2.6 kernel */
#define CONFIG_SND_NESTED_CLASS_DEVICE 1
/* #undef CONFIG_SND_OLD_DRIVER_SUSPEND */
#define CONFIG_SND_REMOVE_PAGE_RESERVE 1
#define CONFIG_SND_NEW_IRQ_HANDLER 1
#define CONFIG_HAVE_PNP_SUSPEND 1
#define CONFIG_HAVE_GFP_T 1
/* #undef CONFIG_HAVE_INIT_UTSNAME */ <----!!

configure.in (hg version):
dnl Check for init_utsname...
AC_MSG_CHECKING(for init_utsname)
init_utsname="0"
ac_save_CFLAGS="$CFLAGS"
ac_save_CC="$CC"
CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration" CC=$KCC
AC_TRY_COMPILE([
#define __KERNEL__

config.log:
configure:11638: checking for init_utsname configure:11673: gcc -c -Wall -fno-strict-aliasing -g -O2

(quoted diff) +0 -5
-I/lib/modules/2.6.22-14-generic/build/include
-I/lib/modules/2.6.22-14-generic/build/include/asm-i386/mach-default
-Iinclude -nostdinc -iwithprefix include -DKBUILD_STR(s)=#s
-DKBUILD_BASENAME=KBUILD_STR(dummy) -DKBUILD_MODNAME=KBUILD_BASENAME
-Werror=implicit-function-declaration  conftest.c >&5
Quoted 2 lines

cc1: error: unrecognized command line option
"-Werror=implicit-function-declaration"

Grrr, it looks like this option isn't available for all gcc versions.

Then try the patch below and run hgcompile. It should work, at least, for your system.

thanks,

Takashi

---

configure.in +13 -9
diff -r e80f59e90231 configure.in
@@ -2567,13 +2567,16 @@ fi
 fi
 
 dnl Check for init_utsname...
+if test "$kversion.$kpatchlevel" = "2.6" -a $ksublevel -ge 19; then
+  CONFIG_HAVE_INIT_UTSNAME=1
+else
 AC_MSG_CHECKING(for init_utsname)
-init_utsname="0"
-ac_save_CFLAGS="$CFLAGS"
-ac_save_CC="$CC"
-CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration"
-CC=$KCC
-AC_TRY_COMPILE([
+  init_utsname="0"
+  ac_save_CFLAGS="$CFLAGS"
+  ac_save_CC="$CC"
+  CFLAGS="$KERNEL_CHECK_CFLAGS -Werror"
+  CC=$KCC
+  AC_TRY_COMPILE([
 #define __KERNEL__
 #include <linux/config.h>
 #include <linux/utsname.h>
@@ -2585,9 +2588,10 @@ AC_TRY_COMPILE([
     AC_MSG_RESULT(no);init_utsname="0",
     AC_MSG_RESULT(unknown);init_utsname="0"
 )
-CFLAGS=$ac_save_CFLAGS
-CC=$ac_save_CC
-CONFIG_HAVE_INIT_UTSNAME=$init_utsname
+  CFLAGS=$ac_save_CFLAGS
+  CC=$ac_save_CC
+  CONFIG_HAVE_INIT_UTSNAME=$init_utsname
+fi
 dnl AC_SUBST(CONFIG_HAVE_INIT_UTSNAME)
 if test "$CONFIG_HAVE_INIT_UTSNAME" = "1"; then
   AC_DEFINE(CONFIG_HAVE_INIT_UTSNAME)
author
#6 lore raw
Quoted 210 lines · Takashi Iwai

At Fri, 25 Jan 2008 00:30:31 +1300,

Quoted 152 lines · Brad Milne
Quoted 109 lines · Takashi Iwai

At Fri, 25 Jan 2008 00:18:33 +1300,

Quoted 80 lines · Brad Milne
Quoted 78 lines · Takashi Iwai

At Thu, 24 Jan 2008 23:40:55 +1300,

Quoted 74 lines · Brad Milne
Quoted 59 lines

From tiwai at suse.de Wed Jan 23 08:31:32 2008
From: tiwai at suse.de (Takashi Iwai)
Date: Wed, 23 Jan 2008 08:31:32 +0100
Subject: [alsa-devel]
=?iso-8859-7?q?1=2E0=2E16rc1_release_--_error=3A_=A1?= =?iso-8859-7?q?system=5Futsname=A2_undeclared?=
In-Reply-To: <s5htzl5t45y.wl%[email protected]>
References: < [email protected]>

    <[email protected]> <s5htzl5t45y.wl%[email protected] >

Message-ID: <s5hsl0pt2uj.wl%[email protected]>

At Wed, 23 Jan 2008 08:03:05 +0100,

Quoted 33 lines · I wrote:

At Wed, 23 Jan 2008 06:25:54 +1100,

Quoted 14 lines · Rick Measham

[1 <multipart/signed (7bit)>]
[1.1 <text/plain; UTF-8 (quoted-printable)>]

Quoted 1 line · Jaroslav Kysela

1.0.16rc1 release is available for download on

Running Kubuntu:

# uname -a
Linux lugtop 2.6.20-16-386 #2 Sun Sep 23 19:47:10 UTC 2007 i686 GNU/Linux

During the make:

Quoted 15 lines

In file included from /usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.c:7:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:
In function ?snd_sndstat_proc_read?:
/usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: ?system_utsname? undeclared (first use in this function) /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: (Each undeclared identifier is reported only once /usr/src/alsa/alsa-driver-1.0.16rc1/acore/../alsa-kernel/core/info_oss.c:96:
error: for each function it appears in.)
make[3]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore/info_oss.o] Error 1 make[2]: *** [/usr/src/alsa/alsa-driver-1.0.16rc1/acore] Error 2 make[1]: *** [_module_/usr/src/alsa/alsa-driver-1.0.16rc1] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-386'
make: *** [compile] Error 2

Quoted 1 line

Isn't it fixed on HG version?

Nevermind, I myself can confirm that it's broken. The patch below should fix the problem.

Takashi

diff -r a5f603cb254a configure.in

configure.in Wed Jan 23 08:28:56 2008 +0100 init_utsname="0" · line 2577

Quoted 8 lines
configure.in Wed Jan 23 08:28:56 2008 +0100 renamed from configure.in Tue Jan 22 17:52:34 2008 +0100 +1 -1
@@ -2571,7 +2571,7 @@ init_utsname="0"
 init_utsname="0"
 ac_save_CFLAGS="$CFLAGS"
 ac_save_CC="$CC"
-CFLAGS="$KERNEL_CHECK_CFLAGS -Werror"
+CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration"
 CC=$KCC
 AC_TRY_COMPILE([
 #define __KERNEL__

It doesn't seem that it is fixed in HG or by this patch (though I do get:
patching file configure.in
Hunk #1 succeeded at 1579 with fuzz 2 (offset
-992 lines).
patch unexpectedly ends in middle of line
when patching), I get the exact same error in both.

Quoted 6 lines
Quoted 1 line

And did you run hgcompile after that?

If I run:
sudo ./configure
then:
sudo ./hgcompile

You don't have to be root for compiling the driver. The root priv is needed only for installation, i.e. make install.

Quoted 13 lines

on the latest hg code, I still get the same error:

from /usr/src/alsa/alsa-driver/acore/info_oss.c:7:
include/linux/utsname.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
...
/usr/src/alsa/alsa-driver/acore/../alsa-kernel/core/info_oss.c: In function 'snd_sndstat_proc_read':
/usr/src/alsa/alsa-driver/acore/../alsa-kernel/core/info_oss.c:96:
error: 'system_utsname' undeclared (first use in this function)
...
make[3]: *** [/usr/src/alsa/alsa-driver/acore/info_oss.o] Error 1
...

Interesting. You're using 2.6.20 kernel, right?

Quoted 7 lines

First check include/config.h. whether it defines CONFIG_HAVE_INIT_UTSNAME. If it's defined, then the build must go well. If it's undefined (commented out), then check configure.in whether the patch was properly applied and -Werror was changed to -Werror=implicit-function-declaration. And see config.log at the place where init_utsname is checked. You must have a compile error there. Show that part.

brad@cyborg:/usr/src/alsa/alsa-driver$ uname -a
Linux cyborg 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007
i686 GNU/Linux

include/config.h:
/* 2.6 kernel */
#define CONFIG_SND_NESTED_CLASS_DEVICE 1
/* #undef CONFIG_SND_OLD_DRIVER_SUSPEND */
#define CONFIG_SND_REMOVE_PAGE_RESERVE 1
#define CONFIG_SND_NEW_IRQ_HANDLER 1
#define CONFIG_HAVE_PNP_SUSPEND 1
#define CONFIG_HAVE_GFP_T 1
/* #undef CONFIG_HAVE_INIT_UTSNAME */ <----!!

configure.in (hg version):
dnl Check for init_utsname...
AC_MSG_CHECKING(for init_utsname)
init_utsname="0"
ac_save_CFLAGS="$CFLAGS"
ac_save_CC="$CC"
CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration" CC=$KCC
AC_TRY_COMPILE([
#define __KERNEL__

config.log:
configure:11638: checking for init_utsname configure:11673: gcc -c -Wall -fno-strict-aliasing -g -O2

(quoted diff) +0 -5
-I/lib/modules/2.6.22-14-generic/build/include
-I/lib/modules/2.6.22-14-generic/build/include/asm-i386/mach-default
-Iinclude -nostdinc -iwithprefix include -DKBUILD_STR(s)=#s
-DKBUILD_BASENAME=KBUILD_STR(dummy) -DKBUILD_MODNAME=KBUILD_BASENAME
-Werror=implicit-function-declaration  conftest.c >&5
Quoted 2 lines

cc1: error: unrecognized command line option
"-Werror=implicit-function-declaration"

Grrr, it looks like this option isn't available for all gcc versions.

Then try the patch below and run hgcompile. It should work, at least, for your system.

thanks,

Takashi

---

diff -r e80f59e90231 configure.in

configure.in Thu Jan 24 12:36:35 2008 +0100 renamed from configure.in Wed Jan 23 08:33:10 2008 +0100 +13 -9
@@ -2567,13 +2567,16 @@ fi
 fi
 
 dnl Check for init_utsname...
+if test "$kversion.$kpatchlevel" = "2.6" -a $ksublevel -ge 19; then
+  CONFIG_HAVE_INIT_UTSNAME=1
+else
 AC_MSG_CHECKING(for init_utsname)
-init_utsname="0"
-ac_save_CFLAGS="$CFLAGS"
-ac_save_CC="$CC"
-CFLAGS="$KERNEL_CHECK_CFLAGS -Werror=implicit-function-declaration"
-CC=$KCC
-AC_TRY_COMPILE([
+  init_utsname="0"
+  ac_save_CFLAGS="$CFLAGS"
+  ac_save_CC="$CC"
+  CFLAGS="$KERNEL_CHECK_CFLAGS -Werror"
+  CC=$KCC
+  AC_TRY_COMPILE([
 #define __KERNEL__
 #include <linux/config.h>
 #include <linux/utsname.h>
@@ -2585,9 +2588,10 @@ AC_TRY_COMPILE([
     AC_MSG_RESULT(no);init_utsname="0",
     AC_MSG_RESULT(unknown);init_utsname="0"
 )
-CFLAGS=$ac_save_CFLAGS
-CC=$ac_save_CC
-CONFIG_HAVE_INIT_UTSNAME=$init_utsname
+  CFLAGS=$ac_save_CFLAGS
+  CC=$ac_save_CC
+  CONFIG_HAVE_INIT_UTSNAME=$init_utsname
+fi
 dnl AC_SUBST(CONFIG_HAVE_INIT_UTSNAME)
 if test "$CONFIG_HAVE_INIT_UTSNAME" = "1"; then
   AC_DEFINE(CONFIG_HAVE_INIT_UTSNAME)
Quoted 5 lines

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

It looks like that's done it! Thanks heaps for your help. I'm hoping for some better support for my ALC262 from intel hda (headphones and mic) in this release :)

Brad