您的位置:首页 > 产品设计 > UI/UE

Compiling and running pulseaudio from git

2011-09-09 09:46 549 查看
A few budding developers have asked me recently about this and to make life easy, I decided to write up this guide! There are some gotchas
to look out for so please read carefully!

Are we ready? OK, lets being!

The shell output shown below will include my machine's name, "Eoollo". My bash prompt also shows the current git branch thanks to the git-prompt package in Mandriva (you can enable it manually by following this guide). Note that for various reasons I wont go
into in this guide, the development version of PA is currently 0.9.19, this is despite the current released version being 0.9.21. Its due to how the git tree is organised, and I'm hoping to fix this soon. Edit: Git master is now tracking PA 1.0 (not for any
specific milestone of 1.0, but just because a 3-point version number is kinda annoying. Essential the version policy is now decided and all should be working fine now. There may still be a 0.9.23 based of the current stable-queue branch, but the next release
from master will be 1.0.

May the Source Be With You

The first job is to clone our code repository. You first have to pick where you want to keep your development version. In the example below I've decided to use a folder under my home directory called "padev"

[Ubuntu@Eoollo ~]$ git clone git://git.0pointer.de/pulseaudio.git padev

Cloning into padev...

remote: Counting objects: 39578, done.

remote: Compressing objects: 100% (6760/6760), done.

remote: Total 39578 (delta 32779), reused 39578 (delta 32779)

Receiving objects: 100% (39578/39578), 14.56 MiB | 1.97 MiB/s, done.

Resolving deltas: 100% (32779/32779), done.

[Ubuntu@Eoollo ~]$

Now you should have a ~/padev/ folder containing the code.

Compile Time

Now it's time to compile the code, but before we do this, we have to prepare the checkout for compilation. Handily there is a script provided to make this easy for us.

[Ubuntu@Eoollo ~]$ cd padev/

[Ubuntu@Eoollo padev (master)]$ ./bootstrap.sh -V

+ case $(uname) in

++ uname

...

+ make clean

make: *** No rule to make target `clean'.  Stop.

[Ubuntu@Eoollo padev (master)]$

There is an error about not being able to "make clean" here but you can safely ignore that.

Next we'll create a build directory. This is not mandatory, but it helps keep temporary build files etc. separate from the code in the checkout (there are special git commands to delete such files but all the same, I feel this is cleaner). After creating the
build directory, we change to it and run the configure script.

[Ubuntu@Eoollo padev (master)]$ mkdir build

[Ubuntu@Eoollo padev (master)]$ cd build/

[Ubuntu@Eoollo build (master)]$ ../configure --prefix=$(pwd)

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

...

config.status: executing po/stamp-it commands

---{ pulseaudio 0.9.19-562-g395da }---

prefix:                        /home/Ubuntu/padev/build

sysconfdir:                    ${prefix}/etc

localstatedir:                 ${prefix}/var

System Runtime Path:           ${prefix}/var/run/pulse

System State Path:             ${prefix}/var/lib/pulse

System Config Path:            ${prefix}/var/lib/pulse

Compiler:                      gcc -std=gnu99

CFLAGS:                        -g -O2 -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations
-Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls
-Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include

Have X11:                      yes

Enable OSS Output:             yes

Enable OSS Wrapper:            yes

Enable CoreAudio:              no

Enable Alsa:                   yes

Enable Solaris:                no

Enable GLib 2.0:               yes

Enable Gtk+ 2.0:              
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息