Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 60734 - xmcd-3.3.2 failes to build
Summary: xmcd-3.3.2 failes to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2004-08-17 23:25 UTC by Lindsay Haisley
Modified: 2004-09-15 11:35 UTC (History)
1 user (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 Lindsay Haisley 2004-08-17 23:25:59 UTC
There are numerous errors in the build.  Build dialog follows.  Note the absence of libcdda.a needed by the xmcd build plus others.  This is a funky piece of source, even though it's a very nice CD player.  The build info is long, but it looks as if the critical errors are as follows.

wr_alsa.c:723: error: too many arguments to function `snd_pcm_hw_params_get_buffer_size'
wr_alsa.c:740: warning: passing arg 3 of `snd_pcm_hw_params_set_period_time_near' makes integer from pointer without a cast
wr_alsa.c:756: warning: passing arg 2 of `snd_pcm_hw_params_get_period_size' from incompatible pointer type
wr_alsa.c:756: error: too many arguments to function `snd_pcm_hw_params_get_period_size'
make[1]: *** [wr_alsa.o] Error 1
make[1]: *** No rule to make target `../cdda_d/libcdda.a', needed by `xmcd'.  Stop.
make[1]: *** No rule to make target `../cdda_d/libcdda.a', needed by `cda'.  Stop.

Note that several binaries aren't built, includin xmcd. Later on...

The following executable binaries are missing:

        xmcd_d/xmcd
        cda_d/cda
        cdda_d/has_alsa
Comment 1 Lindsay Haisley 2004-08-18 16:34:16 UTC
The crux of the matter appears to be incorrect function calls in wr_alsa.c.

If I edit cdda_d/Imakefile and comment out the line 'DEFINES+= -DHAS_ALSA' in the source tree (non-gentoo), the build finishes and all the binaries are created.  I suspect that calls are being made to external lib (libalsa*.* ?) functions that have changed in some way that's not backwards-compatible.
Comment 2 Lindsay Haisley 2004-08-18 18:53:56 UTC
Two things apparently need to happen in order to fix the current ebuild of xmcd.

1.  The first section in the xmcd-3.2.1.patch file must be removed:

# diff -u xmcd-3.2.1-gentoo.patch.old xmcd-3.2.1-gentoo.patch     
--- xmcd-3.2.1-gentoo.patch.old 2004-08-18 20:41:26.000000000 -0500
+++ xmcd-3.2.1-gentoo.patch     2004-08-18 20:42:07.000000000 -0500
@@ -1,15 +1,3 @@
-diff -urN xmcd-3.2.1.old/cdda_d/Imakefile xmcd-3.2.1/cdda_d/Imakefile
---- xmcd-3.2.1.old/cdda_d/Imakefile    2003-08-02 21:24:35.000000000 -0500
-+++ xmcd-3.2.1/cdda_d/Imakefile        2003-12-20 02:13:36.000000000 -0600
-@@ -114,7 +114,7 @@
- alsalib_incl+=        $(wildcard /usr/local/include/alsa/asoundlib.h)
- 
- ifneq "$(strip $(alsalib_incl))" ""
--DEFINES+= -DHAS_ALSA
-+DEFINES+= -DHAS_ALSA -DALSA_PCM_OLD_HW_PARAMS_API
- endif
- #endif
- 
 diff -urN xmcd-3.2.1.old/install.sh xmcd-3.2.1/install.sh
 --- xmcd-3.2.1.old/install.sh  2003-08-02 21:24:33.000000000 -0500
 +++ xmcd-3.2.1/install.sh      2003-12-20 02:37:16.000000000 -0600

Don' know why this is so.  The logic of the alsa include files looks as if this should be the other way around and that ALSA_PCM_OLD_HW_PARAMS_API should be defined in order for the build to work.  If I put a #define for it in wr_alsa.c this is the way it works.

2. xmcd, as written, depends on the FLAC libraries.  If these aren't present the build will fail at link time.  flac should probably be listed as a dependency in the ebuild.

With these changes, xmcd builds and installs as expected.
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-06 17:01:03 UTC
what version of alsa-lib are you using?
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-15 11:35:37 UTC
fixed in portage.  thanks.