Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35049 - libsdl 1.2.6-r2 won't compile with alsa-lib 1.0.0_rc1
Summary: libsdl 1.2.6-r2 won't compile with alsa-lib 1.0.0_rc1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on: 35412
Blocks:
  Show dependency tree
 
Reported: 2003-12-04 05:15 UTC by Mikko Tiihonen
Modified: 2003-12-12 07:44 UTC (History)
1 user (show)

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


Attachments
patch w/ necessary definitions to allow for compilation w/ alsa-lib-1.0.0 (alsa-1.0-fix.patch,557 bytes, patch)
2003-12-07 20:06 UTC, Brian Harring (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikko Tiihonen 2003-12-04 05:15:39 UTC
gcc -DPACKAGE=\"SDL\" -DVERSION=\"1.2.6\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -I.
-I. -pipe -O2 -fomit-frame-pointer -frename-registers --param
max-delay-slot-insn-search=300 --param max-delay-slot-live-search=1000 --param
max-pending-list-length=100 --param max-gcse-passes=4 --param
max-gcse-memory=104857600 --param max-crossjump-edges=400 -Wall
-DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN -DOSS_SUPPORT -DALSA_SUPPORT
-I/usr/X11R6/include -DENABLE_X11 -DXTHREADS -I./include -I./src/video
-DXFREE86_VM -DXFREE86_VMGAMMA -DXFREE86_XV -DHAVE_OPENGL -DUSE_INPUT_EVENTS
-D_REENTRANT -DSDL_USE_PTHREADS -DPTHREAD_NO_RECURSIVE_MUTEX -I../../../include
-I../../../include/SDL -I../../../src -I../../../src/linux -I../../../src/main
-I../../../src/audio -I../../../src/video
-I../../../src/video/XFree86/extensions -I../../../src/events
-I../../../src/joystick -I../../../src/cdrom -I../../../src/thread
-I../../../src/timer -I../../../src/endian -I../../../src/file -c
SDL_alsa_audio.c  -fPIC -DPIC -o .libs/SDL_alsa_audio.lo
SDL_alsa_audio.c: In function `ALSA_OpenAudio':
SDL_alsa_audio.c:272: error: too few arguments to function
`snd_pcm_hw_params_get_channels'
SDL_alsa_audio.c:282: warning: passing arg 3 of
`snd_pcm_hw_params_set_rate_near' makes pointer from integer without a cast
SDL_alsa_audio.c:292: warning: passing arg 3 of
`snd_pcm_hw_params_set_period_size_near' makes pointer from integer without a cast
SDL_alsa_audio.c:294: warning: passing arg 3 of
`snd_pcm_hw_params_set_periods_near' makes pointer from integer without a cast
make[3]: *** [SDL_alsa_audio.lo] Error 1


Reproducible: Always
Steps to Reproduce:
1. emerge media-libs/alsa-lib-1.0.0_rc1
2. emerge media-libs/libsdl-1.2.6-r2
3.

Actual Results:  
Emerge fails when compiling alsa driver for sdl.

Expected Results:  
libSDL would be built correctly with alsa support enabled

Portage 2.0.49-r18 (default-amd64-1.4, gcc-3.3.2, glibc-2.3.2-r9,
2.6.0-test11-gentoo-r1)
=================================================================
System uname: 2.6.0-test11-gentoo-r1 x86_64 4
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-pipe -O2 -fomit-frame-pointer -frename-registers --param
max-delay-slot-insn-search=300 --param max-delay-slot-live-search=1000 --param
max-pending-list-length=100 --param max-gcse-passes=4 --param
max-gcse-memory=104857600 --param max-crossjump-edges=400"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-pipe -O2 -fomit-frame-pointer -frename-registers --param
max-delay-slot-insn-search=300 --param max-delay-slot-live-search=1000 --param
max-pending-list-length=100 --param max-gcse-passes=4 --param
max-gcse-memory=104857600 --param max-crossjump-edges=400"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ http://gentoo.linux.no/
ftp://trumpetti.atm.tut.fi/gentoo/ ftp://gentoo.linux.no/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.se.gentoo.org/gentoo-portage"
USE="3dnow X alsa amd64 apm avi berkdb crypt doc encode ethereal foomaticdb
freetype gdbm gif gnome gpm gtk gtk2 imlib jpeg libg++ libwww mikmod mmx mozilla
moznoirc mozsvg mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png
postgres python quicktime readline ruby ruby18 sdl slang spell sse ssl tcpd
truetype xml2 xmms xv zlib"
Comment 1 Robert Thorneycroft 2003-12-05 10:11:44 UTC
I get exactly the same problem as mentioned.

My hardware is Nforce2 3000+ Athlon XP, so I suspect it is not relevant at all the
the amd64 hardware mentioned in the original post.
Comment 2 Chris Mathis 2003-12-05 13:52:50 UTC
putting -alsa in your make.conf or export use="-alsa" works i realise that it does  not help exactly with alsa but it will allow you to build the libsdl.
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2003-12-07 11:12:18 UTC
From the NOTES in alsa-lib-1.0.0rc2:

    From the binary compatibility view, there is no change.  For compilation,
    1.0 ALSA applications do not need any change.  The older applications
    must use this include sequence:

    #define ALSA_PCM_OLD_HW_PARAMS_API
    #define ALSA_PCM_NEW_HW_PARAMS_API
    #include <alsa/asoundlib.h>

... which seems as though it might be the problem.
Comment 4 Brian Harring (RETIRED) gentoo-dev 2003-12-07 20:06:55 UTC
Created attachment 21842 [details, diff]
patch w/ necessary definitions to allow for compilation w/ alsa-lib-1.0.0

The fix is exactly as the poster explained above.  Just a few ifdefs/defines.
Comment 5 Brian Harring (RETIRED) gentoo-dev 2003-12-08 20:36:50 UTC
I've created an eclass fixes this in a more general way (rather then having to create a crapload of package/version specific patches)- bug #35412.
Comment 6 Martin Holzer (RETIRED) gentoo-dev 2003-12-10 08:00:33 UTC
  08 Dec 2003; Mike Frysinger <vapier@gentoo.org> :
  Add patch to work with alsa-1.0.0 #35049.