alsa-drivers-HEAD does not compile against recent RHE5.1 kernels
Hi,
alsa-drivers-HEAD does not compile against recent RHE5 kernels, such as ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Client/en/os/SRPMS/kernel-2.6.18-53.1.21.el5.src.rpm
The problem is mixed up with the test for init_utsname in configure.in:
dnl Check for init_utsname...
if test "$kversion.$kpatchlevel" = "2.6" -a $ksublevel -ge 19; then
CONFIG_HAVE_INIT_UTSNAME=1
elseAC_MSG_CHECKING(for init_utsname)
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>
],[
int *x = (int *)init_utsname();
*x = 0;
],
AC_MSG_RESULT(yes);init_utsname="1",
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
fi
dnl AC_SUBST(CONFIG_HAVE_INIT_UTSNAME)
if test "$CONFIG_HAVE_INIT_UTSNAME" = "1"; then
AC_DEFINE(CONFIG_HAVE_INIT_UTSNAME)
fi
The problem is that <linux/config.h> does not exist in recent kernel.org and RH 2.6.18 kernels. The AC_TRY_COMPILE produces a negative result (because of a warning, treated as an error, about the missing linux/config.h file), which then causes CONFIG_HAVE_INIT_UTSNAME to NOT be defined.
This results in a compile failure in acore/info_oss.c .
I'm not sure how this should be fixed. I'm also not sure why someone else hasn't noticed it already, since it affects me with a standard kernel.org kernel. Therefore, here is my test procedure.
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2
tar -xjf linux-2.6.25.tar.bz2
cd linux-2.6.25
make defconfig
make modules_prepare
cd ..
(This next step takes *forever*)
git clone git://git.alsa-project.org/alsa-kernel.git alsa-kernel
git clone git://git.alsa-project.org/alsa-driver.git alsa-driver cd alsa-driver
./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25
This currently produces an error:
No alsa-kernel is found.
Please specify the correct location via ALSAKERNELDIR environment variable.
So instead I run
ALSAKERNELDIR=../alsa-kernel ./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25
and I get the same error.
when I repeat the above with an alsa-kernel from hg, I do not get this problem (in fact, alsa-driver compiles completely on the Ubuntu 7.10 machine I'm using for this test).
So, I've got perhaps two different problems here. I need a hand.
Ben Stanley.
I have now refined the description of the original problem, after the other problems were resolved. The init_utsname problem only occurs with the RHE5.1 kernel, and not with the corresponding vanilla kernel.org kernel.
My build procedure is (this is before Jaroslav fixed the alsa-kmirror issue):
$ git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror $ git clone git://git.alsa-project.org/alsa-driver.git alsa-driver $ cd alsa-driver $ ALSAKERNELDIR=../alsa-kmirror ./gitcompile
The Linux headers in /usr/include/linux are owned by the package linux-headers-2.6.8-53.1.19 from RHEL5.1 .
Note the result
checking for init_utsname... no
However, this kernel includes a definition for init_utsname in include/linux/utsname.h:37:52. The configure test has detected the wrong result.
Further down, the build fails
CC [M] /home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.o
In file included
from /home/stanb/Desktop/Drivers/alsa-driver/acore/../alsa-kernel/core/info_oss.c:29,
from /home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.c:7:include/linux/utsname.h:37:52: error: macro "init_utsname" passed 1 arguments, but takes just 0
In file included
from /home/stanb/Desktop/Drivers/alsa-driver/acore/../alsa-kernel/core/info_oss.c:29,
from /home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.c:7:include/linux/utsname.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
If I build against a kernel.org vanilla 2.6.18, as follows:
$ cd linux-2.6.18 $ make modules_prepare $ cd .. $ git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror $ git clone git://git.alsa-project.org/alsa-driver.git alsa-driver $ cd alsa-driver $ ALSAKERNELDIR=../alsa-kmirror ./gitcompile --with-kernel=../linux-2.6.18 --with-build=../linux-2.6.18
Then the build fails further down (for a different reason):
CC [M] /home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.o
In file included
from /home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.c:2:/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c: In function ‘get_rawmidi_substream’:/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:240: warning: implicit declaration of function ‘list_first_entry’ /home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:241: error: expected expression before ‘struct’ /home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:241: warning: return makes pointer from integer without a cast make[4]: ***
[/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.o] Error 1
Ben Stanley.
Quoted 80 lines · Ben Stanley
Hi,
alsa-drivers-HEAD does not compile against recent RHE5 kernels, such as ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Client/en/os/SRPMS/kernel-2.6.18-53.1.21.el5.src.rpm
The problem is mixed up with the test for
init_utsnamein configure.in:dnl Check for
init_utsname...
if test "$kversion.$kpatchlevel" = "2.6" -a $ksublevel -ge 19; then
CONFIG_HAVE_INIT_UTSNAME=1
elseAC_MSG_CHECKING(for init_utsname)
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>
],[
int *x = (int *)init_utsname();
*x = 0;
],AC_MSG_RESULT(yes);init_utsname="1", 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
fi
dnlAC_SUBST(CONFIG_HAVE_INIT_UTSNAME)
if test "$CONFIG_HAVE_INIT_UTSNAME" = "1"; then
AC_DEFINE(CONFIG_HAVE_INIT_UTSNAME)
fiThe problem is that <
linux/config.h> does not exist in recent kernel.org and RH 2.6.18 kernels. TheAC_TRY_COMPILEproduces a negative result (because of a warning, treated as an error, about the missinglinux/config.hfile), which then causesCONFIG_HAVE_INIT_UTSNAMEto NOT be defined.This results in a compile failure in
acore/info_oss.c.I'm not sure how this should be fixed. I'm also not sure why someone else hasn't noticed it already, since it affects me with a standard kernel.org kernel. Therefore, here is my test procedure.
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2
tar -xjf linux-2.6.25.tar.bz2
cd linux-2.6.25
make defconfig
makemodules_prepare
cd ..(This next step takes *forever*)
git clonegit://git.alsa-project.org/alsa-kernel.gitalsa-kernelgit clone
git://git.alsa-project.org/alsa-driver.gitalsa-driver cd alsa-driver
./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25This currently produces an error:
No alsa-kernel is found.
Please specify the correct location via ALSAKERNELDIR environment variable.So instead I run
ALSAKERNELDIR=../alsa-kernel ./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25
and I get the same error.when I repeat the above with an alsa-kernel from hg, I do not get this problem (in fact, alsa-driver compiles completely on the Ubuntu 7.10 machine I'm using for this test).
So, I've got perhaps two different problems here. I need a hand.
Quoted 7 lines
Ben Stanley.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Further to my previous email,
The config.log file shows the following output for the test for init_utsname in the case of the RHEL 5.1 kernel 2.6.18-53.1.19:
configure:10792: checking for init_utsname
configure:10822: gcc -c -Wall -fno-strict-aliasing -g -O2 -I/lib/modules/2.6.18-53.1.19.el5/build/include -I/lib/modules/2.6.18-53.1.19.el5/source/include -Iinclude -nostdinc -iwithprefix include -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(dummy) -DKBUILD_MODNAME=KBUILD_BASENAME -Werror conftest.c >&5
In file included from conftest.c:52:/lib/modules/2.6.18-53.1.19.el5/build/include/linux/config.h:6:2: error:
#warning Including config.h is deprecated.
configure:10828: $? = 1
configure: failed program was:
I think it is failing because of the config.h warning.
Ben Stanley.
Quoted 153 lines · Ben Stanley
I have now refined the description of the original problem, after the other problems were resolved. The
init_utsnameproblem only occurs with the RHE5.1 kernel, and not with the corresponding vanilla kernel.org kernel.My build procedure is (this is before Jaroslav fixed the alsa-kmirror issue):
$ git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror $ git clone git://git.alsa-project.org/alsa-driver.git alsa-driver $ cd alsa-driver $ ALSAKERNELDIR=../alsa-kmirror ./gitcompileThe Linux headers in
/usr/include/linuxare owned by the package linux-headers-2.6.8-53.1.19 from RHEL5.1 .Note the result
checking forinit_utsname... no
However, this kernel includes a definition forinit_utsnameininclude/linux/utsname.h:37:52. The configure test has detected the wrong result.Further down, the build fails
CC [M]
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.o
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/acore/../alsa-kernel/core/info_oss.c:29,from
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.c:7:include/linux/utsname.h:37:52: error: macro "init_utsname" passed 1 arguments, but takes just 0
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/acore/../alsa-kernel/core/info_oss.c:29,from
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.c:7:include/linux/utsname.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ tokenIf I build against a kernel.org vanilla 2.6.18, as follows:
$ cd linux-2.6.18 $ make modules_prepare $ cd .. $ git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror $ git clone git://git.alsa-project.org/alsa-driver.git alsa-driver $ cd alsa-driver $ ALSAKERNELDIR=../alsa-kmirror ./gitcompile --with-kernel=../linux-2.6.18 --with-build=../linux-2.6.18Then the build fails further down (for a different reason):
CC [M]
/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.o
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.c:2:/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c: In function ‘get_rawmidi_substream’:/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:240: warning: implicit declaration of function ‘list_first_entry’/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:241: error: expected expression before ‘struct’/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:241: warning: return makes pointer from integer without a cast make[4]: ***
[/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.o] Error 1Ben Stanley.
Quoted 80 lines · Ben Stanley
Hi,
alsa-drivers-HEAD does not compile against recent RHE5 kernels, such as ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Client/en/os/SRPMS/kernel-2.6.18-53.1.21.el5.src.rpm
The problem is mixed up with the test for
init_utsnamein configure.in:dnl Check for
init_utsname...
if test "$kversion.$kpatchlevel" = "2.6" -a $ksublevel -ge 19; then
CONFIG_HAVE_INIT_UTSNAME=1
elseAC_MSG_CHECKING(for init_utsname)
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>
],[
int *x = (int *)init_utsname();
*x = 0;
],AC_MSG_RESULT(yes);init_utsname="1", 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
fi
dnlAC_SUBST(CONFIG_HAVE_INIT_UTSNAME)
if test "$CONFIG_HAVE_INIT_UTSNAME" = "1"; then
AC_DEFINE(CONFIG_HAVE_INIT_UTSNAME)
fiThe problem is that <
linux/config.h> does not exist in recent kernel.org and RH 2.6.18 kernels. TheAC_TRY_COMPILEproduces a negative result (because of a warning, treated as an error, about the missinglinux/config.hfile), which then causesCONFIG_HAVE_INIT_UTSNAMEto NOT be defined.This results in a compile failure in
acore/info_oss.c.I'm not sure how this should be fixed. I'm also not sure why someone else hasn't noticed it already, since it affects me with a standard kernel.org kernel. Therefore, here is my test procedure.
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2
tar -xjf linux-2.6.25.tar.bz2
cd linux-2.6.25
make defconfig
makemodules_prepare
cd ..(This next step takes *forever*)
git clonegit://git.alsa-project.org/alsa-kernel.gitalsa-kernelgit clone
git://git.alsa-project.org/alsa-driver.gitalsa-driver cd alsa-driver
./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25This currently produces an error:
No alsa-kernel is found.
Please specify the correct location via ALSAKERNELDIR environment variable.So instead I run
ALSAKERNELDIR=../alsa-kernel ./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25
and I get the same error.when I repeat the above with an alsa-kernel from hg, I do not get this problem (in fact, alsa-driver compiles completely on the Ubuntu 7.10 machine I'm using for this test).
So, I've got perhaps two different problems here. I need a hand.
Quoted 7 lines
Ben Stanley.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 4 lines
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
[PING]
I need some help on this one. I don't know how to determine whether or not the config.h file should be included in the test program or not.
Ben Stanley.
Quoted 181 lines · Ben Stanley
Further to my previous email,
The config.log file shows the following output for the test for
init_utsnamein the case of the RHEL 5.1 kernel 2.6.18-53.1.19:configure:10792: checking for
init_utsnameconfigure:10822: gcc -c -Wall -fno-strict-aliasing -g -O2(quoted diff) +0
-5-I/lib/modules/2.6.18-53.1.19.el5/build/include -I/lib/modules/2.6.18-53.1.19.el5/source/include -Iinclude -nostdinc -iwithprefix include -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(dummy) -DKBUILD_MODNAME=KBUILD_BASENAME -Werror conftest.c >&5In file included from conftest.c:52:
/lib/modules/2.6.18-53.1.19.el5/build/include/linux/config.h:6:2: error:
#warning Includingconfig.his deprecated.
configure:10828: $? = 1
configure: failed program was:I think it is failing because of the
config.hwarning.Ben Stanley.
Quoted 153 lines · Ben Stanley
I have now refined the description of the original problem, after the other problems were resolved. The
init_utsnameproblem only occurs with the RHE5.1 kernel, and not with the corresponding vanilla kernel.org kernel.My build procedure is (this is before Jaroslav fixed the alsa-kmirror issue):
$ git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror $ git clone git://git.alsa-project.org/alsa-driver.git alsa-driver $ cd alsa-driver $ ALSAKERNELDIR=../alsa-kmirror ./gitcompileThe Linux headers in
/usr/include/linuxare owned by the package linux-headers-2.6.8-53.1.19 from RHEL5.1 .Note the result
checking forinit_utsname... no
However, this kernel includes a definition forinit_utsnameininclude/linux/utsname.h:37:52. The configure test has detected the wrong result.Further down, the build fails
CC [M]
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.o
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/acore/../alsa-kernel/core/info_oss.c:29,from
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.c:7:include/linux/utsname.h:37:52: error: macro "init_utsname" passed 1 arguments, but takes just 0
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/acore/../alsa-kernel/core/info_oss.c:29,from
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.c:7:include/linux/utsname.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ tokenIf I build against a kernel.org vanilla 2.6.18, as follows:
$ cd linux-2.6.18 $ make modules_prepare $ cd .. $ git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror $ git clone git://git.alsa-project.org/alsa-driver.git alsa-driver $ cd alsa-driver $ ALSAKERNELDIR=../alsa-kmirror ./gitcompile --with-kernel=../linux-2.6.18 --with-build=../linux-2.6.18Then the build fails further down (for a different reason):
CC [M]
/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.o
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.c:2:/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c: In function ‘get_rawmidi_substream’:/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:240: warning: implicit declaration of function ‘list_first_entry’/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:241: error: expected expression before ‘struct’/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:241: warning: return makes pointer from integer without a cast make[4]: ***
[/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.o] Error 1Ben Stanley.
Quoted 80 lines · Ben Stanley
Hi,
alsa-drivers-HEAD does not compile against recent RHE5 kernels, such as ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Client/en/os/SRPMS/kernel-2.6.18-53.1.21.el5.src.rpm
The problem is mixed up with the test for
init_utsnamein configure.in:dnl Check for
init_utsname...
if test "$kversion.$kpatchlevel" = "2.6" -a $ksublevel -ge 19; then
CONFIG_HAVE_INIT_UTSNAME=1
elseAC_MSG_CHECKING(for init_utsname)
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>
],[
int *x = (int *)init_utsname();
*x = 0;
],AC_MSG_RESULT(yes);init_utsname="1", 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
fi
dnlAC_SUBST(CONFIG_HAVE_INIT_UTSNAME)
if test "$CONFIG_HAVE_INIT_UTSNAME" = "1"; then
AC_DEFINE(CONFIG_HAVE_INIT_UTSNAME)
fiThe problem is that <
linux/config.h> does not exist in recent kernel.org and RH 2.6.18 kernels. TheAC_TRY_COMPILEproduces a negative result (because of a warning, treated as an error, about the missinglinux/config.hfile), which then causesCONFIG_HAVE_INIT_UTSNAMEto NOT be defined.This results in a compile failure in
acore/info_oss.c.I'm not sure how this should be fixed. I'm also not sure why someone else hasn't noticed it already, since it affects me with a standard kernel.org kernel. Therefore, here is my test procedure.
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2
tar -xjf linux-2.6.25.tar.bz2
cd linux-2.6.25
make defconfig
makemodules_prepare
cd ..(This next step takes *forever*)
git clonegit://git.alsa-project.org/alsa-kernel.gitalsa-kernelgit clone
git://git.alsa-project.org/alsa-driver.gitalsa-driver cd alsa-driver
./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25This currently produces an error:
No alsa-kernel is found.
Please specify the correct location via ALSAKERNELDIR environment variable.So instead I run
ALSAKERNELDIR=../alsa-kernel ./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25
and I get the same error.when I repeat the above with an alsa-kernel from hg, I do not get this problem (in fact, alsa-driver compiles completely on the Ubuntu 7.10 machine I'm using for this test).
So, I've got perhaps two different problems here. I need a hand.
Quoted 7 lines
Ben Stanley.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-develQuoted 4 lines
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 4 lines
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Fri, 30 May 2008 09:37:43 +1000,
Quoted 5 lines · Ben Stanley
[PING]
I need some help on this one. I don't know how to determine whether or not the
config.hfile should be included in the test program or not.
config.h is needed for older kernels indeed.
Takashi
Quoted 190 lines
Ben Stanley.
Quoted 181 lines · Ben Stanley
Further to my previous email,
The config.log file shows the following output for the test for
init_utsnamein the case of the RHEL 5.1 kernel 2.6.18-53.1.19:configure:10792: checking for
init_utsnameconfigure:10822: gcc -c -Wall -fno-strict-aliasing -g -O2(quoted diff) +0
-5-I/lib/modules/2.6.18-53.1.19.el5/build/include -I/lib/modules/2.6.18-53.1.19.el5/source/include -Iinclude -nostdinc -iwithprefix include -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(dummy) -DKBUILD_MODNAME=KBUILD_BASENAME -Werror conftest.c >&5In file included from conftest.c:52:
/lib/modules/2.6.18-53.1.19.el5/build/include/linux/config.h:6:2: error:
#warning Includingconfig.his deprecated.
configure:10828: $? = 1
configure: failed program was:I think it is failing because of the
config.hwarning.Ben Stanley.
Quoted 153 lines · Ben Stanley
I have now refined the description of the original problem, after the other problems were resolved. The
init_utsnameproblem only occurs with the RHE5.1 kernel, and not with the corresponding vanilla kernel.org kernel.My build procedure is (this is before Jaroslav fixed the alsa-kmirror issue):
$ git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror $ git clone git://git.alsa-project.org/alsa-driver.git alsa-driver $ cd alsa-driver $ ALSAKERNELDIR=../alsa-kmirror ./gitcompileThe Linux headers in
/usr/include/linuxare owned by the package linux-headers-2.6.8-53.1.19 from RHEL5.1 .Note the result
checking forinit_utsname... no
However, this kernel includes a definition forinit_utsnameininclude/linux/utsname.h:37:52. The configure test has detected the wrong result.Further down, the build fails
CC [M]
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.o
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/acore/../alsa-kernel/core/info_oss.c:29,from
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.c:7:include/linux/utsname.h:37:52: error: macro "init_utsname" passed 1 arguments, but takes just 0
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/acore/../alsa-kernel/core/info_oss.c:29,from
/home/stanb/Desktop/Drivers/alsa-driver/acore/info_oss.c:7:include/linux/utsname.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ tokenIf I build against a kernel.org vanilla 2.6.18, as follows:
$ cd linux-2.6.18 $ make modules_prepare $ cd .. $ git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror $ git clone git://git.alsa-project.org/alsa-driver.git alsa-driver $ cd alsa-driver $ ALSAKERNELDIR=../alsa-kmirror ./gitcompile --with-kernel=../linux-2.6.18 --with-build=../linux-2.6.18Then the build fails further down (for a different reason):
CC [M]
/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.o
In file included
from/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.c:2:/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c: In function ‘get_rawmidi_substream’:/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:240: warning: implicit declaration of function ‘list_first_entry’/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:241: error: expected expression before ‘struct’/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/../../alsa-kernel/pci/ice1712/ice1724.c:241: warning: return makes pointer from integer without a cast make[4]: ***
[/home/stanb/Desktop/Drivers/alsa-driver/pci/ice1712/ice1724.o] Error 1Ben Stanley.
Quoted 80 lines · Ben Stanley
Hi,
alsa-drivers-HEAD does not compile against recent RHE5 kernels, such as ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Client/en/os/SRPMS/kernel-2.6.18-53.1.21.el5.src.rpm
The problem is mixed up with the test for
init_utsnamein configure.in:dnl Check for
init_utsname...
if test "$kversion.$kpatchlevel" = "2.6" -a $ksublevel -ge 19; then
CONFIG_HAVE_INIT_UTSNAME=1
elseAC_MSG_CHECKING(for init_utsname)
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>
],[
int *x = (int *)init_utsname();
*x = 0;
],AC_MSG_RESULT(yes);init_utsname="1", 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
fi
dnlAC_SUBST(CONFIG_HAVE_INIT_UTSNAME)
if test "$CONFIG_HAVE_INIT_UTSNAME" = "1"; then
AC_DEFINE(CONFIG_HAVE_INIT_UTSNAME)
fiThe problem is that <
linux/config.h> does not exist in recent kernel.org and RH 2.6.18 kernels. TheAC_TRY_COMPILEproduces a negative result (because of a warning, treated as an error, about the missinglinux/config.hfile), which then causesCONFIG_HAVE_INIT_UTSNAMEto NOT be defined.This results in a compile failure in
acore/info_oss.c.I'm not sure how this should be fixed. I'm also not sure why someone else hasn't noticed it already, since it affects me with a standard kernel.org kernel. Therefore, here is my test procedure.
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2
tar -xjf linux-2.6.25.tar.bz2
cd linux-2.6.25
make defconfig
makemodules_prepare
cd ..(This next step takes *forever*)
git clonegit://git.alsa-project.org/alsa-kernel.gitalsa-kernelgit clone
git://git.alsa-project.org/alsa-driver.gitalsa-driver cd alsa-driver
./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25This currently produces an error:
No alsa-kernel is found.
Please specify the correct location via ALSAKERNELDIR environment variable.So instead I run
ALSAKERNELDIR=../alsa-kernel ./gitcompile --with-kernel=../linux-2.6.25 --with-build=../linux-2.6.25
and I get the same error.when I repeat the above with an alsa-kernel from hg, I do not get this problem (in fact, alsa-driver compiles completely on the Ubuntu 7.10 machine I'm using for this test).
So, I've got perhaps two different problems here. I need a hand.
Quoted 7 lines
Ben Stanley.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-develQuoted 4 lines
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-develQuoted 4 lines
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 4 lines
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
So, if config.h is not needed in 'newer' kernels (and causes an error?), and is needed in 'older' kernels, it is then an error to universally include it in a configure test program where it causes an error if used inappropriately...
I think the error is not noticed in newer newer kernels because init_utsname is defined in newer newer kernels. (I should look into this statement some more.)
I think it comes down to figuring out the point between 'newer' and 'older' kernels and modifying the configure test appropriately to use or not use config.h as required. I'm not sure how that should be done.
Ben.
Quoted 39 lines · Takashi Iwai
At Fri, 30 May 2008 09:37:43 +1000,
Quoted 5 lines · Ben Stanley
[PING]
I need some help on this one. I don't know how to determine whether or not the
config.hfile should be included in the test program or not.
config.his needed for older kernels indeed.Takashi
Quoted 26 lines
Ben Stanley.
Quoted 22 lines · Ben Stanley
Further to my previous email,
The config.log file shows the following output for the test for
init_utsnamein the case of the RHEL 5.1 kernel 2.6.18-53.1.19:configure:10792: checking for
init_utsnameconfigure:10822: gcc -c -Wall -fno-strict-aliasing -g -O2(quoted diff) +0
-5-I/lib/modules/2.6.18-53.1.19.el5/build/include -I/lib/modules/2.6.18-53.1.19.el5/source/include -Iinclude -nostdinc -iwithprefix include -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(dummy) -DKBUILD_MODNAME=KBUILD_BASENAME -Werror conftest.c >&5In file included from conftest.c:52:
/lib/modules/2.6.18-53.1.19.el5/build/include/linux/config.h:6:2: error:
#warning Includingconfig.his deprecated.
configure:10828: $? = 1
configure: failed program was:I think it is failing because of the
config.hwarning.Ben Stanley.
At Thu, 05 Jun 2008 01:12:28 +1000,
Quoted 5 lines · Ben Stanley
So, if
config.his not needed in 'newer' kernels (and causes an error?), and is needed in 'older' kernels, it is then an error to universally include it in a configure test program where it causes an error if used inappropriately...
Well, apparently it's only RH kernels that cause the problem. So I haven't cared about it at all.
Quoted 3 lines
I think the error is not noticed in newer newer kernels because
init_utsnameis defined in newer newer kernels. (I should look into this statement some more.)
The problem is, as usual, RH kernels backported init_utsname in a different way than the upstream. This makes things really hard.
Takashi
Quoted 47 lines
I think it comes down to figuring out the point between 'newer' and 'older' kernels and modifying the configure test appropriately to use or not use
config.has required. I'm not sure how that should be done.Ben.
Quoted 39 lines · Takashi Iwai
At Fri, 30 May 2008 09:37:43 +1000,
Quoted 5 lines · Ben Stanley
[PING]
I need some help on this one. I don't know how to determine whether or not the
config.hfile should be included in the test program or not.
config.his needed for older kernels indeed.Takashi
Quoted 26 lines
Ben Stanley.
Quoted 22 lines · Ben Stanley
Further to my previous email,
The config.log file shows the following output for the test for
init_utsnamein the case of the RHEL 5.1 kernel 2.6.18-53.1.19:configure:10792: checking for
init_utsnameconfigure:10822: gcc -c -Wall -fno-strict-aliasing -g -O2(quoted diff) +0
-5-I/lib/modules/2.6.18-53.1.19.el5/build/include -I/lib/modules/2.6.18-53.1.19.el5/source/include -Iinclude -nostdinc -iwithprefix include -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(dummy) -DKBUILD_MODNAME=KBUILD_BASENAME -Werror conftest.c >&5In file included from conftest.c:52:
/lib/modules/2.6.18-53.1.19.el5/build/include/linux/config.h:6:2: error:
#warning Includingconfig.his deprecated.
configure:10828: $? = 1
configure: failed program was:I think it is failing because of the
config.hwarning.Ben Stanley.
Quoted 15 lines · Takashi Iwai
At Thu, 05 Jun 2008 01:12:28 +1000,
Quoted 5 lines · Ben Stanley
So, if
config.his not needed in 'newer' kernels (and causes an error?), and is needed in 'older' kernels, it is then an error to universally include it in a configure test program where it causes an error if used inappropriately...Well, apparently it's only RH kernels that cause the problem. So I haven't cared about it at all.
Quoted 3 lines
I think the error is not noticed in newer newer kernels because
init_utsnameis defined in newer newer kernels. (I should look into this statement some more.)
Quoted 5 lines
The problem is, as usual, RH kernels backported
init_utsnamein a different way than the upstream. This makes things really hard.Takashi
Since its a RH kernel problem, I was hoping to prod a response out of Jaroslav :-) .
This was a real PITA for us because the sound card manufacturer's supported build procedure required updating the system ALSA to a particular version before building their driver. The broken test for the init_utsname symbol prevented this.
Anyway, in the end I have worked around this issue because I have successfully compiled the driver in question against the kernel headers as an external module without the need to use ALSA as a base. This also makes the configuration more supportable from my point of view, as I don't have to worry about re-testing everything else that depended on the original system version of alsa. And getting the driver to compile against RH kernel 2.6.18-53.1.19 was only really a matter of backporting it to alsa 1.0.14 , which turned out to be not too hard. This build procedure also allows me to use dkms to manage the installation of my driver, which is something of a bonus.
Ben Stanley.
At Wed, 04 Jun 2008 17:16:12 +0200,
Quoted 11 lines · I wrote:
At Thu, 05 Jun 2008 01:12:28 +1000,
Quoted 5 lines · Ben Stanley
So, if
config.his not needed in 'newer' kernels (and causes an error?), and is needed in 'older' kernels, it is then an error to universally include it in a configure test program where it causes an error if used inappropriately...Well, apparently it's only RH kernels that cause the problem. So I haven't cared about it at all.
On the second thought, we may force to define the own linux/config.h to avoid this for the case > 2.6.14. A totally untested patch below.
Takashi
---
configure.in +13 -0
@@ -615,6 +615,19 @@ CHECK_KERNEL_HEADER(linux/config.h, [#ifndef _LINUX_CONFIG_H #endif ]) +if test ! -f include/linux/config.h; then + if test "$kversion.$kpatchlevel" = "2.6" -a "$ksublevel" -gt 14; then + echo "Force to create linux/config.h" + mkdir -p include/linux + echo "#ifndef _LINUX_CONFIG_H +#define _LINUX_CONFIG_H +#ifndef AUTOCONF_INCLUDED +#include <linux/autoconf.h> +#endif +#endif" > include/linux/config.h + fi +fi + dnl Check kernel headers for 2.2 MODIFY_KERNEL_HEADER(linux/kmod.h, __LINUX_KMOD_H__) CHECK_KERNEL_HEADER(linux/utsrelease.h)