Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32623 - alsa-driver-0.9.8 configure script fails when trying to determine compiler version
Summary: alsa-driver-0.9.8 configure script fails when trying to determine compiler ve...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
: 34428 36879 37238 39737 42905 (view as bug list)
Depends on: 23116
Blocks:
  Show dependency tree
 
Reported: 2003-11-03 07:04 UTC by Pär Karlsson
Modified: 2004-02-25 14:53 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Updated configure file (configure,199.46 KB, text/plain)
2003-11-06 10:36 UTC, James Young
Details
A simple patch to the kernel version extraction problem (configure.patch,1.27 KB, patch)
2003-11-18 02:45 UTC, Michel Jansen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pär Karlsson 2003-11-03 07:04:19 UTC
When emerging alsa-driver-0.9.8 with gentoo-sources-2.4.20-r8, the configure
script fails when trying to determine the kernel compiler.

Reproducible: Always
Steps to Reproduce:
1. Compile gentoo-sources-2.4.20-r8, install bzImage and modules as described in
the installation instructions. Reboot.
2. emerge alsa-driver-0.9.8


Actual Results:  
mikroviking root # emerge alsa-driver
Calculating dependencies ...done!
>>> emerge (1 of 1) media-sound/alsa-driver-0.9.8 to /
>>> md5 src_uri ;-) alsa-driver-0.9.8.tar.bz2
>>> Unpacking source...
>>> Unpacking alsa-driver-0.9.8.tar.bz2 to /var/tmp/portage/alsa-driver-0.9.8/work
 * Applying makefile.patch...  [ ok ]
>>> Source unpacked.
oss
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for i586-pc-linux-gnu-gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for i586-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for a BSD compatible install... /bin/install -c
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for gcc option to accept ANSI C... none needed
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for current directory...
/var/tmp/portage/alsa-driver-0.9.8/work/alsa-driver-0.9.8
checking cross compile...
checking for directory with kernel source... /usr/src/linux
checking for kernel version... 2.4.20-gentoo-r8
checking for GCC version... Kernel compiler:   Used compiler: gcc (GCC) 3.3.2
20031022 (Gentoo Linux 3.3.2-r2, propolice)
Fatal error: Compiler type does not match
Decoded kernel compiler: type= version=
Decoded used compiler: type=gcc version=3.3.2
Please, send ./configure output to <alsa-devel@alsa-project.org>
 
!!! ERROR: media-sound/alsa-driver-0.9.8 failed.
!!! Function src_compile, Line 61, Exitcode 1
!!! ./configure failed
 
mikroviking root #


Expected Results:  
It should've determined the compiler versions, happily compiled and installed
itself into the right place.

Gentoo Base System version 1.4.3.11
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.4.20-gentoo-r8)
=================================================================
System uname: 2.4.20-gentoo-r8 i686 VIA C3 Ezra
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium-mmx -m3dnow -mmmx -O3 -fomit-frame-pointer -funroll-loops
-pipe"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium-mmx -m3dnow -mmmx -O3 -fomit-frame-pointer
-funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache autoaddcvs sandbox userpriv usersandbox fixpackages"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo
http://ftp.easynet.nl/mirror/gentoo/
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo
http://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
http://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.uninett.no/pub/linux/Gentoo
http://gentoo.linux.no/ http://gentoo.oregonstate.edu
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://kmssghost1/gentoo-portage"
USE="x86 oss apm crypt encode gif imlib jpeg libg++ mad mikmod mpeg ncurses nls
png sdl spell svga xml2 zlib alsa gdbm berkdb slang readline java ruby mysql gpm
tcpd pam libwww ssl perl python oggvorbis 3dnow acl acpi acpi4linux amd apache2
autofs clamav curl doc emacs fbcon gd imagemagick jack jack-caps jack-tmpfs
ladcca lcms leim maildir mbox mcal md5sum memlimit mmx moznocompose moznoirc
moznomail mozsvg nptl oav objc openssh plotutils samba sasl snmp socks5 tiff usb
wmf xfs xml -arts -avi -cups -foomaticdb -gtk -kde -gnome -motif -opengl -pdflib
-qt -quicktime -truetype -X -xmms -xv -directfb -tetex -tcltk -cdr"
Comment 1 James Young 2003-11-06 10:30:15 UTC
I have an updated version which corrects the compiler problem.  If you have
questions as to where I made the edit, feel free to ask.
Comment 2 James Young 2003-11-06 10:36:31 UTC
Created attachment 20347 [details]
Updated configure file

In your editor, look for the line that says:
Updated lines are below

You'll see where the addition was made to correctly detect the compiler used
on
the system.

Any questions, e-mail me.
Comment 3 Pär Karlsson 2003-11-07 00:29:33 UTC
Well that works... it's weird that it's only on this machine that the autoconf
stuff fails for this particular case, since I have other machines that have
the same kernel version and the same version of the alsa-drivers and that
has worked without a glitch.
  I suppose that this might be a one-time fluke, possibly a problem with
the hardware of the somewhat exotic machine that I used.
  If noone else has experienced the same problem I think this problem is
solved (since I easily can use the fix from you, James).

Thanks!
Comment 4 Michael Prager 2003-11-08 14:07:21 UTC
I have the exactly same problem after updating to gentoo-sources-2.4.20-r8
Comment 5 Nick Fish 2003-11-12 16:08:51 UTC
using gentoo-sources-r8 with hardened-gcc


James Young's configure script fixes mine as well.
Comment 6 Pär Karlsson 2003-11-13 02:43:11 UTC
The problem with James' configure hack is that it requires manual intervention (you need to replace the line with the compiler and compiler version with the one that you are actually using). It should really be done automatically by the script.
  It does get done automatically on my other machine, which runs the same kernel version, but on a different architecture, and it worked on the problem machine with vanilla-sources-2.4.22.
  This is not much help, I'm afraid, but nevertheless it might be useful info. :-)
Comment 7 Michel Jansen 2003-11-18 02:45:36 UTC
Created attachment 20901 [details, diff]
A simple patch to the kernel version extraction problem

Place this file in your
/usr/portage/media-sound/alsa-driver/files/
directory, add the following line to
/usr/portage/media-sound/alsa-driver/alsa-driver-0.9.8.ebuild 
in the "unpack_src" section:

    # The configure script has some faulty detection of the
    # compiler used for compiling the kernel.
    # This patch disables that check
    epatch ${FILESDIR}/configure.patch


This is not a very elegant patch. It will simply disable the kernel version
extraction. Use only if you know for sure the kernel was compiled with the
current version of GCC.
Comment 8 Martin Holzer (RETIRED) gentoo-dev 2003-11-26 11:10:24 UTC
*** Bug 34428 has been marked as a duplicate of this bug. ***
Comment 9 Alessandro Sappia 2003-11-28 15:20:46 UTC
The problem appears to be just on some kernel 2.4.x
I tried with latest gentoo-sources and it didn-t work
but
with ole gaming-r1 it worked for me
what is changed between the two ?
Comment 10 Mikael A 2003-11-28 18:04:02 UTC
On my box doing the following trivial change in /usr/src/linux/Makefile (and rebuilding the kernel) leads to /usr/src/linux/include/linux/compile.h to be generated correctly. 

tail -1 isn't valid on my machine but tail -n 1 is. I belive this was changes some time ago but i don't know why it isn't fixed/handled.

--- Makefile	2003-11-29 02:58:12.000000000 +0100
+++ Makefile	2003-11-29 02:50:55.000000000 +0100
@@ -348,7 +348,7 @@
 	 ([ -x /bin/domainname ] && /bin/domainname > .ver1) || \
 	 echo > .ver1
 	@echo \#define LINUX_COMPILE_DOMAIN \"`cat .ver1 | $(uts_truncate)`\" >> .ver
-	@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver
+	@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> .ver
 	@mv -f .ver $@
 	@rm -f .ver1
 
Comment 11 Martin Holzer (RETIRED) gentoo-dev 2004-01-01 08:01:49 UTC
*** Bug 36879 has been marked as a duplicate of this bug. ***
Comment 12 Martin Holzer (RETIRED) gentoo-dev 2004-01-31 07:16:24 UTC
*** Bug 39737 has been marked as a duplicate of this bug. ***
Comment 13 Martin Holzer (RETIRED) gentoo-dev 2004-01-31 07:17:13 UTC
*** Bug 37238 has been marked as a duplicate of this bug. ***
Comment 14 Martin Holzer (RETIRED) gentoo-dev 2004-01-31 07:19:58 UTC
the tail patch should be fixed with latets stable core-utils
Comment 15 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-15 03:04:49 UTC
closing...
Comment 16 Martin Holzer (RETIRED) gentoo-dev 2004-02-25 14:53:24 UTC
*** Bug 42905 has been marked as a duplicate of this bug. ***