Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 105519 - emerge alsa-driver-1.0.9b says there's an error in /usr/include/linux/pci.h
Summary: emerge alsa-driver-1.0.9b says there's an error in /usr/include/linux/pci.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
: 110750 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-10 12:19 UTC by Alexander Rigbo
Modified: 2006-01-05 00:07 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Rigbo 2005-09-10 12:19:37 UTC
CC 
[M]  /var/tmp/portage/alsa-driver-1.0.9b/work/alsa-driver-1.0.9b/acore/sgbuf.o 
In file included 
from /var/tmp/portage/alsa-driver-1.0.9b/work/alsa-driver-1.0.9b/include/adriver.h:677, 
                 
from /var/tmp/portage/alsa-driver-1.0.9b/work/alsa-driver-1.0.9b/acore/sgbuf.c:12: 
include/linux/pci.h:389: error: syntax error before numeric constant 
make[4]: *** 
[/var/tmp/portage/alsa-driver-1.0.9b/work/alsa-driver-1.0.9b/acore/sgbuf.o] 
Error 1 
make[3]: *** 
[/var/tmp/portage/alsa-driver-1.0.9b/work/alsa-driver-1.0.9b/acore] Error 2 
make[2]: *** 
[_module_/var/tmp/portage/alsa-driver-1.0.9b/work/alsa-driver-1.0.9b] Error 2 
make[1]: *** [modules] Error 2 
make[1]: Leaving directory `/usr/src/linux-2.6.13-mm1' 
make: *** [compile] Error 2 
 
!!! ERROR: media-sound/alsa-driver-1.0.9b failed. 
!!! Function src_compile, Line 84, Exitcode 2 
!!! Make Failed 
!!! If you need support, post the topmost build error, NOT this status 
message. 
 
The row in the error (with context) /usr/include/linux/pci.h: 
#define PCI_EXT_CAP_ID_ERR      1 
#define PCI_EXT_CAP_ID_VC       2 
#define PCI_EXT_CAP_ID_DSN      3 
#define PCI_EXT_CAP_ID_PWR      4 
 
The one with PCI_EXT_CAP_ID_DSN is 389 and it looks OK to my c-programmer eyes 

Reproducible: Always
Steps to Reproduce:
1. emerge =alsa-driver-1.0.9b 



metroid ~ # emerge info 
Portage 2.0.52-r1 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r1, 
2.6.13-mm1 i686) 
================================================================= 
System uname: 2.6.13-mm1 i686 AMD Athlon(tm) XP 2600+ 
Gentoo Base System version 1.12.0_pre8 
dev-lang/python:     2.3.5, 2.4.1-r1 
sys-apps/sandbox:    1.2.12 
sys-devel/autoconf:  2.13, 2.59-r7 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 
sys-devel/binutils:  2.16.1 
sys-devel/libtool:   1.5.20 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-O2 -march=athlon-xp -w -pipe" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O2 -march=athlon-xp -w -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
USE="x86 X aac alsa apm arts avi berkdb bitmap-fonts cdparanoia crypt cups 
debug dvd dvdread encode fam gdbm gif glitz hal imlib java jpeg junit kde 
libg++ libwww logitech-mouse mad mikmod mp3 mpeg ncurses nossp nptl nvidia ogg 
oggvorbis openexr opengl oss pam pdflib perl png python qt readline samba sdl 
spell ssl tcpd theora tiff truetype truetype-fonts type1-fonts vorbis xml2 xv 
xvid zlib userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Alexander Rigbo 2005-09-10 15:45:25 UTC
Update: 
i looked in another "pci.h" and found this line 389 (with context): 
int __must_check pci_set_dma_mask(struct pci_dev *dev, u64 mask); 
int __must_check pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); 
void pci_update_resource(struct pci_dev *dev, struct resource *res, int 
resno); 
(the line in the middle is the faulty line) 
 
 
Comment 2 Alexander Rigbo 2005-09-11 01:44:36 UTC
Another update: 
The other pci.h i was talking about is in /usr/src/linux/include/linux, i 
forgot to mention that in the last post. 
 
I've solved the problem in a _very_ ugly way: 
I commented out the row in /usr/src/linux/include/linux/pci.h so i got past 
the compilation of that .o but i got more errors. 
It seems that the pci_save_state and pci_restore_state has changed in the 
kernel. Before, they had two arguments like this: pci_save_state(dev, state); 
and pci_restore_state(dev, state); but now you do like this: 
pci_save_state(dev); and pci_restore_dev(dev); so what i did was this: 
ebuild alsa-driver-1.0.9b.ebuild unpack 
vim /var/tmp/portage/alsa-driver-1.0.9b/work/alsa-driver-1.0.9b/acore/init.c 
find all places where pci_set_state and pci_restore_state are beeing used and 
change them from the old form to the new form. 
ebuild alsa-driver-1.0.9b build 
ebuild alsa-driver-1.0.9b install 
ebuild alsa-driver-1.0.9b qmerge 
Comment 3 Mystilleef 2005-09-16 10:31:56 UTC
I'm confirming the same problem with vanilla-sources 2.6.14_rc1
Comment 4 Daniel Guido 2005-09-17 10:34:06 UTC
I am also having this problem with kernel 2.6.14_rc1 + alsa-driver-1.0.10_rc1
and 1.0.9b
Comment 5 Dietrich Heise 2005-09-30 01:38:03 UTC
I can confirm the same error for me :(
Comment 6 David 'Bombe' Roden 2005-09-30 20:21:08 UTC
The real culprit is in include/adriver.h:599.

#ifndef CONFIG_HAVE_PCI_CONSISTENT_DMA_MASK
#define pci_set_consistent_dma_mask(p,x) 0 /* success */
#endif

The reason why CONFIG_HAVE_PCI_CONSISTENT_DMA_MASK isn't set correctly might be
this:

> In file included from /usr/src/linux-2.6.14-rc2//include/linux/pci.h:20,
>                  from configure:6817:
> /usr/src/linux-2.6.14-rc2//include/linux/mod_devicetable.h:186:15: #if with no
expression

(from config.log)

> #if __KERNEL__
>         void    *data;
> #else
>         kernel_ulong_t data;
> #endif

The first line should clearly be an #ifdef because __KERNEL__ is set but
evaluates to an empty string.

After that hwdep.c compiles cleanly but the build still fails for other reasons
still to be investigated.




Comment 7 David 'Bombe' Roden 2005-09-30 20:43:24 UTC
For the next error (URB_ASYNC_UNLINK undefined in usb/usbaudio.c) the patch is
simple: Remove the offending lines. usb_unlink_urb is always async in recent
kernels so that flag can be skipped. The real patch should probably check for
the existence of that flag in include/linux/usb.h and define it to 0 if it's
missing.
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-10-28 15:58:50 UTC
*** Bug 110750 has been marked as a duplicate of this bug. ***
Comment 9 Marcin Kurek 2005-10-30 03:36:22 UTC
In my system all this problems was caused by changes in the include placement in
2.6.14, no modifications are required in alsa-driver source code. Now I can
simple emerge alsa-driver and it works fine.

In 2.6.14 includes from asm-ppc was splited in to asm-ppc and asm-powerpc, this
causes many failures in configure script because miising files.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-10-30 04:13:21 UTC
Hrm the error I see on 110750 is basically the same with pci.h that it's 
reported here. 
 
Can you attach the output of configure failures? 
 
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-10-30 13:48:54 UTC
Please try with 1.0.10_rc2. 
 
Comment 12 Paul 2005-10-31 05:16:22 UTC
I've unmasked alsa-headers, alsa-lib and alsa-driver as

=media-sound/alsa-driver-1.0.10_rc2
=media-sound/alsa-headers-1.0.10_rc2
=media-libs/alsa-lib-1.0.10_rc2

and this seems to fix the problem.
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-17 03:53:37 UTC
Fixed then.
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-01-05 00:07:32 UTC
*** Bug 117801 has been marked as a duplicate of this bug. ***