Compiling and running pulseaudio from git
来源:互联网 发布:实验网络应用层协议 编辑:程序博客网 时间:2024/05/16 08:49
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:
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'.
[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:
sysconfdir:
localstatedir:
System Runtime Path:
System State Path:
System Config Path:
Compiler:
CFLAGS:
Have X11:
Enable OSS Output:
Enable OSS Wrapper:
Enable CoreAudio:
Enable Alsa:
Enable Solaris:
Enable GLib 2.0:
Enable Gtk+ 2.0: