From: Ben Stanley <Ben.Stanley@exemail.com.au>
To: alsa-devel@alsa-project.org
Subject: Re: alsa-drivers-HEAD does not compile against recent RHE5.1 kernels
Date: Fri, 23 May 2008 21:39:02 +1000 [thread overview]
Message-ID: <1211542742.3811.139.camel@localhost> (raw)
In-Reply-To: <1211506900.3811.105.camel@localhost>
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.
On Fri, 2008-05-23 at 11:41 +1000, Ben Stanley wrote:
> 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
> else
> AC_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.
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2008-05-23 11:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 1:41 alsa-drivers-HEAD does not compile against recent RHE5.1 kernels Ben Stanley
2008-05-23 11:39 ` Ben Stanley [this message]
2008-05-23 12:20 ` Ben Stanley
2008-05-29 23:37 ` Ben Stanley
2008-06-04 12:15 ` Takashi Iwai
2008-06-04 15:12 ` Ben Stanley
2008-06-04 15:16 ` Takashi Iwai
2008-06-04 15:38 ` Ben Stanley
2008-06-04 16:54 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1211542742.3811.139.camel@localhost \
--to=ben.stanley@exemail.com.au \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.