Bug 92672 - Compiling pulse audio 7.0
Summary: Compiling pulse audio 7.0
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: build-system (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium blocker
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-26 05:33 UTC by sai pavan boddu
Modified: 2018-07-30 10:37 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Build Logs (21.38 KB, text/plain)
2015-10-26 06:52 UTC, sai pavan boddu
Details
build log2 (21.31 KB, patch)
2015-10-26 06:55 UTC, sai pavan boddu
Details | Splinter Review

Description sai pavan boddu 2015-10-26 05:33:30 UTC
Hi all,

I need pulse audio static files(libpulse.a and libpulse-simple.a) for building by QEMU tool statically. 
Ubuntu package manger is not providing me any static versions, I only have .SO files.

So I got down to compile pulse audio from source, and I see the following errors

modules/alsa/alsa-util.c: In function 'pa_alsa_set_sw_params':
modules/alsa/alsa-util.c:464:5: warning: implicit declaration of function 'snd_pcm_sw_params_set_period_event' [-Wimplicit-function-declaration]
     if ((err = snd_pcm_sw_params_set_period_event(pcm, swparams, period_event)) < 0) {
     ^
modules/alsa/alsa-util.c:469:65: error: 'SND_PCM_TSTAMP_ENABLE' undeclared (first use in this function)
     if ((err = snd_pcm_sw_params_set_tstamp_mode(pcm, swparams, SND_PCM_TSTAMP_ENABLE)) < 0) {
                                                                 ^
modules/alsa/alsa-util.c:469:65: note: each undeclared identifier is reported only once for each function it appears in
modules/alsa/alsa-util.c: In function 'pa_alsa_open_by_device_string':
modules/alsa/alsa-util.c:692:33: error: 'SND_PCM_NO_AUTO_RESAMPLE' undeclared (first use in this function)
                                 SND_PCM_NO_AUTO_RESAMPLE|
                                 ^
modules/alsa/alsa-util.c:693:33: error: 'SND_PCM_NO_AUTO_CHANNELS' undeclared (first use in this function)
                                 SND_PCM_NO_AUTO_CHANNELS|
                                 ^
modules/alsa/alsa-util.c:694:49: error: 'SND_PCM_NO_AUTO_FORMAT' undeclared (first use in this function)
                                 (reformat ? 0 : SND_PCM_NO_AUTO_FORMAT))) < 0) {
                                                 ^
modules/alsa/alsa-util.c: In function 'pa_alsa_safe_avail':
modules/alsa/alsa-util.c:1137:5: warning: implicit declaration of function 'snd_pcm_avail' [-Wimplicit-function-declaration]
     n = snd_pcm_avail(pcm);
     ^

Do I need to install any deps still. I just believe "apt-get build-dep pulseaudio" should be enough. If I am missing any thing more here please let me know.

Below is the link, from where I followed the steps to compile

http://www.linuxfromscratch.org/blfs/view/svn/multimedia/pulseaudio.html

My machine details:
	Lubuntu 32bit running over virtual box.
	Allocated 4gb ram.

Regards,
B. Sai pavan
Comment 1 Tanu Kaskinen 2015-10-26 06:35:59 UTC
The errors look like you don't have the alsa-lib headers installed. But if PulseAudio tries to compile the alsa code, it means that the configure script found the headers (or actually alsa.pc, to be precise). I don't have other explanations than that you uninstalled the libasound2-dev package after "./configure" and before "make".
Comment 2 sai pavan boddu 2015-10-26 06:52:17 UTC
Created attachment 119192 [details]
Build Logs
Comment 3 sai pavan boddu 2015-10-26 06:55:11 UTC
Created attachment 119193 [details] [review]
build log2

Build Log of make

I did a clean build. with config command
./configure --prefix=/usr                    --sysconfdir=/etc                --localstatedir=/var             --disable-bluez4         --enable-static

&& make.

Attached are the log
libasound2-dev is still installed on my machine.


Regards,
sai pavan
Comment 4 Tanu Kaskinen 2015-10-26 07:16:31 UTC
I was wrong to suggest that the headers wouldn't exist - the error would have been different in that case.

alsa-util.c includes <asoundlib.h>, and <asoundlib.h> includes <alsa/pcm.h>, which is where these missing things should be declared. You can try to figure out why your system doesn't declare e.g. snd_pcm_sw_params_set_period_event in pcm.h. I don't see how this could be a PulseAudio bug. Do you have any complaints if I close this bug?
Comment 5 sai pavan boddu 2015-10-26 08:56:32 UTC
(In reply to Tanu Kaskinen from comment #4)
> I was wrong to suggest that the headers wouldn't exist - the error would
> have been different in that case.
> 
> alsa-util.c includes <asoundlib.h>, and <asoundlib.h> includes <alsa/pcm.h>,

my pcm.h doesent have any declaration on snd_pcm_sw_params_set_period_event, what might be the issue then ?

> which is where these missing things should be declared. You can try to
> figure out why your system doesn't declare e.g.
> snd_pcm_sw_params_set_period_event in pcm.h. I don't see how this could be a
> PulseAudio bug. Do you have any complaints if I close this bug?

Fine, but what is correct place for this issue ?

Thanks,
Sai Pavan
Comment 6 Tanu Kaskinen 2015-10-26 09:07:31 UTC
(In reply to sai pavan boddu from comment #5)
> my pcm.h doesent have any declaration on snd_pcm_sw_params_set_period_event,
> what might be the issue then ?

I don't know. Is your libasound2-dev version very old? The function was added in alsa-lib 1.0.17 (released in 2008). PulseAudio requires alsa-lib 1.0.19, though, so configure should have failed in that case.

> > which is where these missing things should be declared. You can try to
> > figure out why your system doesn't declare e.g.
> > snd_pcm_sw_params_set_period_event in pcm.h. I don't see how this could be a
> > PulseAudio bug. Do you have any complaints if I close this bug?
> 
> Fine, but what is correct place for this issue ?

If your alsa-lib version claims to be at least version 1.0.17, complain to whoever provided that package, since it's missing stuff.
Comment 7 sai pavan boddu 2015-10-26 09:30:57 UTC
(In reply to Tanu Kaskinen from comment #6)
> (In reply to sai pavan boddu from comment #5)
> > my pcm.h doesent have any declaration on snd_pcm_sw_params_set_period_event,
> > what might be the issue then ?
> 
> I don't know. Is your libasound2-dev version very old? The function was
> added in alsa-lib 1.0.17 (released in 2008). PulseAudio requires alsa-lib
> 1.0.19, though, so configure should have failed in that case.
> 
> > > which is where these missing things should be declared. You can try to
> > > figure out why your system doesn't declare e.g.
> > > snd_pcm_sw_params_set_period_event in pcm.h. I don't see how this could be a
> > > PulseAudio bug. Do you have any complaints if I close this bug?
> > 
> > Fine, but what is correct place for this issue ?
> 
> If your alsa-lib version claims to be at least version 1.0.17, complain to
> whoever provided that package, since it's missing stuff.

Yes, i have a older version of alsa 1.0.13, I dont know why, even the config did not complaint on that. Thanks I will give a try after updating it.

Regards,
Sai Pavan
Comment 8 GitLab Migration User 2018-07-30 10:37:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/534.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.