Compiling on Ubuntu 10 (Lucid and Maverick)

The version of FFmpeg in the Ubuntu repository is too recent for Audacity 1.3.12 beta and 1.3.13 alpha.
To support the Ubuntu version of FFmpeg, Audacity must be patched.

Place this patch file in the src directory, then from that location run:

patch -p2 < ffmpeg-av-match-ext.patch

ffmpeg-av-match-ext.patch (2.06 KB)
The colours of the sliders for the mixer toolbar and the transcription toolbar are incorrect in Audacity 1.3.12 beta and 1.3.13 (up to and including the current r10736 October 17th 2010)

To fix this issue apply this patch in similar fashion with

patch -p2 < fix-slider-background-color.patch

fix-slider-background-color.patch (784 Bytes)
There is currently an issue (hopefully this will be resolved soon) that prevents Audacity from building on Ubuntu due to a build failure of portaudio-v19.
Until this is fixed, the workaround is to build up to the point where the portaudio-v19 failure occurs, then change into the lib-src/portaudio-v19 directory and run:

/bin/bash ./libtool --mode=link gcc -Wl,-Bsymbolic-functions -Wl,-z,defs -Wl,--as-needed -Wl,-z,defs -Wl,--as-needed -rpath /usr/lib -no-undefined -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio)_.*" -version-info 2:0:0 -o lib/ src/common/pa_allocation.lo src/common/pa_converters.lo src/common/pa_cpuload.lo src/common/pa_dither.lo src/common/pa_debugprint.lo src/common/pa_front.lo src/common/pa_process.lo src/common/pa_skeleton.lo src/common/pa_stream.lo src/common/pa_trace.lo src/hostapi/alsa/pa_linux_alsa.lo src/hostapi/jack/pa_jack.lo src/common/pa_ringbuffer.lo src/hostapi/oss/pa_unix_oss.lo src/os/unix/pa_unix_hostapis.lo src/os/unix/pa_unix_util.lo -lrt -lasound -ljack -lpthread -lrt   -lm -lpthread

Then run ‘make’ again and the build should complete successfully.

Just to note, the problem is with the colour of the backgrounds to the sliders (far too light).

An alternative is to run configure (and make if you wish) using the shell which is used as /bin/sh:

CONFIG_SHELL=/bin/sh ./configure ; make

That should compile straight through.


This patch has now been applied in SVN HEAD as of today (r10740) (ifdef’ed for WXGTK because it breaks the background colours on Windows).


Excellent :slight_smile:

Do you know if the FFmpeg version patch will be used, or is that just a matter of waiting for Audacity to user a later version of FFMpeg?

Yes, that patch “could” be applied globally if we release 1.3.13 for Windows/Mac with some FFmpeg version from 2010, but it would break backwards compatibility for Win/Mac (once they get 1.3.13 Beta they have to update FFmpeg again); it would also break FFmpeg for Linux people who are still using an older FFmpeg. Also note that FFmpeg from SVN after June 1st 2010 was causing Audacity not to compile with error:

“invalid conversion from ‘int ()(URLContext, unsigned char*, int)’ to ‘int ()(URLContext, const unsigned char*, int)’”

in FFmpeg.cpp:257. The workaround to that is to change src/FFmpeg.cpp line 207 from

**static int ufile_write(URLContext h, unsigned char buf, int size)


static int ufile_write(URLContext *h, const unsigned char *buf, int size).

I didn’t get that problem when I recompiled Audacity using Ubuntu 10.10’s current FFmpeg, but presumably some people will see it happen. Does it happen with SVN FFmpeg now?

Either we want backwards compatibility (in which case runtime detection of FFmpeg would be needed to cover the cases above where the Audacity code will fail); or we make each Audacity release use a particular minimum version of FFmpeg and make sure it works with that.


Although the patch is an improvement for the toolbar backgrounds, it has introduced a problem that the slider backgrounds for selected Track Control Panel are now grey rather than blue, so bug 175 has been re-opened. I think but am not 100% sure that Benjamin is also saying in the bug that he wants the entire body of toolbars to be a lighter grey (so for example the Timeline would appear a darker grey than the toolbars above it). Does anyone have any views?


A colour problem that seems more critical is that with the default Ubuntu 10.10 theme the play speed of the transcription tool is unreadable without double clicking to open the text input.

This is what it looks like while being adjusted with the mouse:
And this is what it looks like in XP

Thanks, Steve. It affects all the “click-to-see-value” slider tooltips. It happens the same way on Windows in “High-Contrast” themes, the difference being that the default Ubuntu “Ambiance” theme has some light-on-dark elements. See Bug 186.


Al has committed a better fix (r10744) that makes the toolbar slider backgrounds match the toolbar body colour without producing the background mismatch for the sliders in the Track Control Panel.

Richard has committed a fix (r10743) for the need to run CONFIG_SHELL=/bin/sh ./configure on Ubuntu in order to make portaudio v19 compile. You can now just do ./configure then make normally.


Excellent - I guess I can “un-sticky” this topic now.