Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98769 - media-sound/sidplay-2.0.9: ALSA driver and configure fix
Summary: media-sound/sidplay-2.0.9: ALSA driver and configure fix
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-12 05:57 UTC by Heikki Orsila
Modified: 2009-07-23 16:10 UTC (History)
3 users (show)

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


Attachments
sidplay-2.0.9 ALSA and configure patch (sidplay-2.0.9-alsa-fix.patch,8.08 KB, text/plain)
2005-07-12 05:58 UTC, Heikki Orsila
Details
sidlplay-2.0.9-r1 ebuild (sidplay-2.0.9-r1.ebuild,828 bytes, text/plain)
2005-07-12 05:59 UTC, Heikki Orsila
Details
corrected version of the sidplay-2.0.9-r1 alsa fix (sidplay-2.0.9-alsa-fix.patch,8.14 KB, patch)
2005-09-07 13:58 UTC, psyill.net
Details | Diff
sidplay-2.0.9-r1.ebuild (sidplay-2.0.9-r1.ebuild,1001 bytes, text/plain)
2005-10-16 14:33 UTC, Jeremy Huddleston (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heikki Orsila 2005-07-12 05:57:23 UTC
Attached patch fixes media-sound/sidplay-2.0.9 ALSA driver to use the ALSA 1.x API. Also, the patch adds --with-alsa switch for the configure script. Please
apply.
Comment 1 Heikki Orsila 2005-07-12 05:58:07 UTC
Created attachment 63229 [details]
sidplay-2.0.9 ALSA and configure patch
Comment 2 Heikki Orsila 2005-07-12 05:59:00 UTC
Created attachment 63230 [details]
sidlplay-2.0.9-r1 ebuild
Comment 3 Heikki Orsila 2005-07-12 05:59:59 UTC
The patch file is 8KiB so it should probably be put somewhere in the net so that
it doesn't bloat the portage tree.
Comment 4 psyill.net 2005-09-07 13:10:12 UTC
I get the following error when emerging:

Making all in alsa
make[3]: Entering directory `/var/tmp/portage/sidplay-2.0.9-r1/work/sidplay-2.0.
9/src/audio/alsa'
if i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H      -march=athlon -mmmx -m3dnow -mno-
sse -O2 -fmessage-length=0 -I../../../include -DHAVE_UNIX  -DHAVE_UNIX  -MT 
audiodrv.o -MD -MP -MF ".deps/audiodrv.Tpo" -c -o audiodrv.o audiodrv.cpp; \
then mv -f ".deps/audiodrv.Tpo" ".deps/audiodrv.Po"; else rm -f ".deps/audiodrv.
Tpo"; exit 1; fi
audiodrv.cpp: In member function `virtual void* Audio_ALSA::open(AudioConfig&, 
const char*)':
audiodrv.cpp:162: error: jump to label `open_error'
audiodrv.cpp:118: error:   fr
Comment 5 psyill.net 2005-09-07 13:10:12 UTC
I get the following error when emerging:

Making all in alsa
make[3]: Entering directory `/var/tmp/portage/sidplay-2.0.9-r1/work/sidplay-2.0.
9/src/audio/alsa'
if i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H      -march=athlon -mmmx -m3dnow -mno-
sse -O2 -fmessage-length=0 -I../../../include -DHAVE_UNIX  -DHAVE_UNIX  -MT 
audiodrv.o -MD -MP -MF ".deps/audiodrv.Tpo" -c -o audiodrv.o audiodrv.cpp; \
then mv -f ".deps/audiodrv.Tpo" ".deps/audiodrv.Po"; else rm -f ".deps/audiodrv.
Tpo"; exit 1; fi
audiodrv.cpp: In member function `virtual void* Audio_ALSA::open(AudioConfig&, 
const char*)':
audiodrv.cpp:162: error: jump to label `open_error'
audiodrv.cpp:118: error:   från här
audiodrv.cpp:121: error:   crosses initialization of `unsigned int rate'
audiodrv.cpp:162: error: jump to label `open_error'
audiodrv.cpp:113: error:   från här
audiodrv.cpp:121: error:   crosses initialization of `unsigned int rate'
audiodrv.cpp:162: error: jump to label `open_error'
audiodrv.cpp:108: error:   från här
audiodrv.cpp:121: error:   crosses initialization of `unsigned int rate'
audiodrv.cpp:162: error: jump to label `open_error'
audiodrv.cpp:93: error:   från här
audiodrv.cpp:121: error:   crosses initialization of `unsigned int rate'
audiodrv.cpp:162: error: jump to label `open_error'
audiodrv.cpp:88: error:   från här
audiodrv.cpp:121: error:   crosses initialization of `unsigned int rate'
audiodrv.cpp:162: error: jump to label `open_error'
audiodrv.cpp:83: error:   från här
audiodrv.cpp:121: error:   crosses initialization of `unsigned int rate'
audiodrv.cpp:162: error: jump to label `open_error'
audiodrv.cpp:74: error:   från här
audiodrv.cpp:121: error:   crosses initialization of `unsigned int rate'
make[3]: *** [audiodrv.o] Fel 1
make[3]: Leaving directory `/var/tmp/portage/sidplay-2.0.9-r1/work/sidplay-2.0.
9/src/audio/alsa'

Here is my emerge --info:

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.4, glibc-2.3.5-r1, 2.6.
12-gentoo-r9 i686)
=================================================================
System uname: 2.6.12-gentoo-r9 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.12.0_pre6
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled]
ccache version 2.4 [disabled]
dev-lang/python:     2.3.4-r1, 2.4.1-r1
sys-apps/sandbox:    1.2.1-r2
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon -mmmx -m3dnow -mno-sse -O2 -fmessage-length=0"
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/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon -mmmx -m3dnow -mno-sse -O2 -fmessage-length=0"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo 
http://mirror.pudas.net/gentoo"
LANG="sv_SE"
LC_ALL="sv_SE"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X a52 aac aalib acpi alsa asm avi bash-completion 
bigger-fonts bitmap-fonts bmp bzip2 ccache cdparanoia cdr cpudetection custom-
cflags dga divx4linux doc dpms dvd eds encode exif ftp gif gimpprint glibc-
omitfp glut gpm gstreamer gtk gtk2 icq imagemagick jabber javascript joystick 
jpeg justify lzw maps mikmod mmx mmxext mng mp3 mpeg mpeg4 mplayer ncurses 
nethack nls noplugin nptl nptlonly nvidia ogg oggvorbis opengl pam pdflib perl 
png python quicktime readline real scanner sdl ssl svg symlink tcltk tetex 
threads tiff truetype truetype-fonts type1-fonts v4l v4l2 vorbis wmf xv xvid 
zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS
Comment 6 psyill.net 2005-09-07 13:58:35 UTC
Created attachment 67869 [details, diff]
corrected version of the sidplay-2.0.9-r1 alsa fix

This patch has moved a definition of a variable in method virtual void*
Audio_ALSA::open(AudioConfig&, const char*) in src/audio/alsa/audiodrv.cpp
towards the top of the method to avoid being undefined when a horde of gotos
execute a couple of lines down in the source code.
The previous patch didn't get that.
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2005-10-16 14:15:47 UTC
have these changes been sent upstream, too?
Comment 8 Heikki Orsila 2005-10-16 14:22:56 UTC
(In reply to comment #6)
> have these changes been sent upstream, too?

I'll notify the maintainer of sidplay2 (sidplay2@yahoo.com) about this.
Comment 9 Jeremy Huddleston (RETIRED) gentoo-dev 2005-10-16 14:26:48 UTC
testing now, thanks... pleasse use 'epatch', make sure the DEPENDs are updated,
and use '|| die' to exit if there are problems.
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2005-10-16 14:33:52 UTC
Created attachment 70811 [details]
sidplay-2.0.9-r1.ebuild

When using your patch, I get the following compilation problem:

if x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H	-O2 -pipe -fomit-frame-pointer
-march=athlon64 -I../../../include   -MT audiodrv.o -MD -MP -MF
".deps/audiodrv.Tpo" -c -o audiodrv.o audiodrv.cpp; \
then mv -f ".deps/audiodrv.Tpo" ".deps/audiodrv.Po"; else rm -f
".deps/audiodrv.Tpo"; exit 1; fi
In file included from audiodrv.h:27,
		 from audiodrv.cpp:34:
../../../include/config.h:35:5: #error Platform not supported!
make[3]: *** [audiodrv.o] Error 1
make[3]: Leaving directory
`/mnt/raid0/tmp/portage/sidplay-2.0.9-r1/work/sidplay-2.0.9/src/audio/alsa'
Comment 11 Simon White 2005-10-17 01:43:07 UTC
Sidplay2 Maintainer: Merged a patch for comment 4 upstream.

As for comment 9 your compile line is incorrect.  Upstream code shows:

if g++ -DHAVE_CONFIG_H      -g -O2 -I../../../include -DHAVE_UNIX
-I/home/swhite/root/include  -DHAVE_UNIX -I/home/swhite/root/include  -MT
audiodrv.o -MD -MP -MF ".deps/audiodrv.Tpo" -c -o audiodrv.o audiodrv.cpp; \
then mv -f ".deps/audiodrv.Tpo" ".deps/audiodrv.Po"; else rm -f
".deps/audiodrv.Tpo"; exit 1; fi

NOTE the -DHAVE_UNIX thats missing in your build.  It should automatically be
picked up from (the already built) libsidplay2.pc, or hardcoded on the line if
you decided to override the library auto-detection (see sidplay2.m4).
Comment 12 Jeremy Huddleston (RETIRED) gentoo-dev 2005-10-17 02:43:03 UTC
The pc file is installed right, and we get:

# pkg-config libsidplay2 --cflags
-DHAVE_UNIX  

Which means that it's not getting picked up right when we build.  We're doing
nothing special... just patching, rerunning auto*, then ./configure --with-alsa
&& make.  I'll look into it further when I get a chance, but that probably won't
be for a while...
Comment 13 Simon White 2005-10-17 06:02:28 UTC
Maybe I didn't write something quite correctly but works on Mandrake.  The magic
is done here in my_macros.m4 (line 316 rev 1.6):

    dnl Get cflags and ldflags seperatly
    my_cxxflags=`$PKG_CONFIG --define-variable=includedir=$my_includedir
--cflags lib$1`
    my_ldflags=`$PKG_CONFIG --define-variable=libdir=$my_libdir --libs lib$1`
    eval ${my_uname}_CXXFLAGS=\"$my_cxxflags\"
    eval ${my_uname}_LDFLAGS=\"$my_ldflags\"

my_name should be set to uppercase LIBSIDPLAY2 and the eval line means we should
end up assigning the cflags to LIBSIDPLAY2_CFLAGS.

In sidplay2.m4 (line 116 rev 1.7) we AC_SUBST the variables to they will appear
in the final Makefile, and also in configure.ac (line 136 rev 1.8) we add to the
compile line:

CXXFLAGS="$CXXFLAGS -I\$(top_srcdir)/include \
\$(LIBSIDPLAY2_CXXFLAGS) \$(LIBSIDUTILS_CXXFLAGS)"

A few echos around those areas should find out what is going on.
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-01 21:52:14 UTC
Was this submitted upstream (if sidplay still has an upstream)?
Comment 15 Heikki Orsila 2006-10-02 07:01:53 UTC
(In reply to comment #13)
> Was this submitted upstream (if sidplay still has an upstream)?
> 

Yes, but no stable has been released since it was committed into the repo at 2005-07-18:
revision 1.8
date: 2005/07/18 19:46:43;  author: s_a_white;  state: Exp;  lines: +107 -9
Switch from obsolete alsa interface (patch by shd).

The repo is at :pserver:anonymous@sidplay2.cvs.sourceforge.net:/cvsroot/sidplay2 co sidplay.

Maybe we could snapshot the latest CVS version and distribute that.. Who knows, it might work better :-)

Comment 16 Simon White 2006-10-14 23:59:23 UTC
Sidplay2 Maintainer:

Has anyone looked at the configuration issue in this bug?  Is it libsidplay, a Gentoo tool or user issue?  Once thats signed off I'll make a release as I consider it important enough to wait for resolution on.
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2009-07-19 13:20:28 UTC
# Samuli Suominen <ssuominen@gentoo.org> (19 Jul 2009)
# Doesn't compile wrt #272602. ALSA support broken wrt #98769.
# No upstream. Masked for removal.
Comment 18 Stefan Borschtel 2009-07-22 20:20:55 UTC
Does this really have to be removed? It compiles completely fine on my system, it's the only commandline-sidplayer i know and i am often using it. Is there any nongui-alternative that i can implement in scripts and that also shows songinformation?
Comment 19 Richard H. 2009-07-23 15:50:06 UTC
Yeah the same for me too.
Are there any alternatives?
Please consider this before removing :(
Comment 20 Samuli Suominen (RETIRED) gentoo-dev 2009-07-23 16:10:25 UTC
Unmasked since I've applied a patch from another bug for building this. Closing as UPSTREAM -> Use alsa's oss support for playing.