Bug 100112 - a52dec compile fails: audio_out_oss.c:38:31: machine/soundcard.h: No such file or directory
Bug#: 100112 Product:  Gentoo/Alt Version: unspecified Platform: x86
OS/Version: FreeBSD Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: sound@gentoo.org Reported By: morph@ngi.it
Component: Other
URL: 
Summary: a52dec compile fails: audio_out_oss.c:38:31: machine/soundcard.h: No such file or directory
Keywords:  
Status Whiteboard: 
Opened: 2005-07-24 05:44 0000
Description:   Opened: 2005-07-24 05:44 0000
When i try to compile a52dec with +oss flag:   
   
Making all in libao   
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.   
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.   
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.   
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.   
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.   
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.   
audio_out_oss.c:38:31: machine/soundcard.h: No such file or directory   
audio_out_oss.c: In function `oss_play':   
audio_out_oss.c:102: error: `SNDCTL_DSP_CHANNELS' undeclared (first use in   
this function)   
audio_out_oss.c:102: error: (Each undeclared identifier is reported only once   
audio_out_oss.c:102: error: for each function it appears in.)   
audio_out_oss.c:109: error: `SNDCTL_DSP_SPEED' undeclared (first use in this   
function)   
audio_out_oss.c: In function `oss_open':   
audio_out_oss.c:163: error: `AFMT_S16_LE' undeclared (first use in this   
function)   
audio_out_oss.c:164: error: `SNDCTL_DSP_SETFMT' undeclared (first use in this   
function)   
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.   
gmake[1]: *** [audio_out_oss.o] Error 1   
gmake[1]: *** Waiting for unfinished jobs....   
gmake: *** [all-recursive] Error 1   
   
!!! ERROR: media-libs/a52dec-0.7.4-r5 failed.   
!!! Function src_compile, Line 45, Exitcode 2   
!!! emake failed   
!!! If you need support, post the topmost build error, NOT this status   
message.   
 
---- 
 
Portage 2.0.51.22 (!/usr/local/portage/profiles/default-bsd/fbsd/5.4/x86, 
gcc-, freebsd-lib-5.4-r2, 5.4-RELEASE i386) 
================================================================= 
System uname: 5.4-RELEASE i386 i386 
Gentoo/FreeBSD: FreeBSD version 5.4-RELEASE; Gentoo base version 0.7 
dev-lang/python:     2.4.1-r1 
sys-apps/sandbox:    [Not Present] 
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.15, 2.16.1 
sys-devel/libtool:   1.5.18-r1 
virtual/os-headers:  5.4 
ACCEPT_KEYWORDS="x86 x86-fbsd ~x86 ~x86-fbsd" 
AUTOCLEAN="yes" 
CBUILD="i686-gentoo-freebsd5.4" 
CFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer -m3dnow -msse -mmmx" 
CHOST="i686-gentoo-freebsd5.4" 
CONFIG_PROTECT="/etc" 
CONFIG_PROTECT_MASK=" /etc/env.d" 
CXXFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer -m3dnow -msse -mmmx" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="candy distlocks" 
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
MAKEOPTS="-j2 -s" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="x86-fbsd 3dnow 3dnowext X a52 aac arts bash-completion browserplugin 
crypt dvd dvdr estraier ffmpeg flac freetype gstreamer gtk gtk2 jpeg kde 
kdeenablefinal matroska moznocompose moznoirc moznomail moznoxft mozsvg mp3 
mpeg nocxx ogg oggvorbis opengl oss pam perl png python qt quicktime readline 
real slang spell ssl symlink tiff truetype truetype-fonts type1-fonts unicode 
visualization vorbis win32codecs wxwindows xine xml2 xscreensaver xv xvid zlib 
userland_BSD kernel_FreeBSD elibc_FreeBSD" 
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

------- Comment #1 From Alberto Zennaro 2005-07-24 05:46:40 0000 -------
Created an attachment (id=64199) [details]
Fix the wrong include path in audio_out_oss.c

------- Comment #2 From Diego E. 'Flameeyes' Pettenò 2005-07-29 06:40:01 0000 -------
Thanks added to CVS. 
 

------- Comment #3 From Stefan Briesenick 2005-08-11 07:09:30 0000 -------
patch doesn't work! 
 
>>> Unpacking a52dec-0.7.4.tar.gz 
to /vol1/.gentoo/build/portage/a52dec-0.7.4-r5/work 
 * Applying a52dec-0.7.4-build.patch ...                                                                              
[ ok ] 
 * Applying a52dec-0.7.4-freebsd.patch ... 
 
 * Failed Patch: a52dec-0.7.4-freebsd.patch ! 
 *  ( /usr/portage/media-libs/a52dec/files/a52dec-0.7.4-freebsd.patch ) 
 * 
 * Include in your bugreport the contents of: 
 * 
 
*   /vol1/.gentoo/build/portage/a52dec-0.7.4-r5/temp/a52dec-0.7.4-freebsd.patch-24012.out 
 
 

------- Comment #4 From Stefan Briesenick 2005-08-11 07:11:01 0000 -------
Created an attachment (id=65663) [details]
a52dec-0.7.4-freebsd.patch-24715.out

Problem is this hardcoded, fully qualified path in the patchfile:

--- /var/tmp/portage/a52dec-0.7.4-r5/work/a52dec-0.7.4/libao/audio_out_oss.c   
2002-04-28 12:23:02 +0200
+++ audio_out_oss.c	2005-07-23 15:42:50 +0200

------- Comment #5 From Stefan Briesenick 2005-08-11 07:13:21 0000 -------
fixing the header to: 
 
--- libao/audio_out_oss.c     2002-04-28 12:23:02 +0200 
+++ libao/audio_out_oss.c     2005-07-23 15:42:50 +0200 
 
solves the problem! 
 

------- Comment #6 From Diego E. 'Flameeyes' Pettenò 2005-08-11 07:29:04 0000 -------
The problem with the patch is reported elsewhere. 
 
And I still can't reproduce it, if you can, feel free to commit the fix, I 
avoid committing fixes if I'm unable to reproduce the problem as they can make 
things bad. 
 

------- Comment #7 From Stefan Briesenick 2005-08-11 07:32:06 0000 -------
you can easily reproduce it, if your portage-temp is not /var/tmp/portage 
 
Mine is on a different location. 
 
*never* use absolute paths in patch files! 
 

------- Comment #8 From Stefan Briesenick 2005-08-11 07:32:44 0000 -------
ok, I commit the fix.