Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a program that uses OpenAL. When I link against it (I'm using CMake), it also links against libpulse - PulseAudio. This results in the binary not working on other systems. Can I somehow not link against PulseAudio and still use OpenAL on Ubuntu?

Edit: I just figured something out: It's not OpenAL that's dragging PulseAudio in, it's SDL. Is there anything I can do about that?

share|improve this question
up vote 2 down vote accepted

About the SDL pulseaudio you can simply install libsdl1.2debian-alsa, it will remove the pa-sdl version and link against ALSA libs. Still you are likely to get other binary/library related compatibilities like dv3500ea mentioned. A common approach to avoid system related dependency issues is by using static linking. This will make the binaries much larger because they include the required code from the libraries.

For more information on static linking check:

share|improve this answer
CMake seems to support static linking only reluctantly, and I believe that there are some libraries I can legally not link static, but I'll look into it. The libsdl debian package is a good idea, I'll use that :) – halifar Aug 24 '10 at 4:42

Build the binary separately on each platform you want to supply binary packages for and make sure you distribute the source code so that people on other platforms can build it for themselves.

Note that Linux focuses on source compatibility rather than binary compatibility. Most distributions are not binary compatible with each other (not even Ubuntu and Debian are completely compatible*).

This is a somewhat related question:

share|improve this answer
Source distribution is not really an option. How do the makers of Skype etc. do it? – halifar Aug 23 '10 at 20:30
Why exactly is source distribution not an option? Be careful and make sure that all libraries you are linking to allow distribution without the source code. You should be OK if they are all licensed under the LGPL but if any are licensed under the GPL, you MUST make the source code available. The only way to ensure it works is to build them on each platform you want to support. (To do this you could use something like virtualbox and install Debian, Fedora, OpenSUSE, Windows etc. and build the binary package on them). – dv3500ea Aug 23 '10 at 20:44
The application is not open source, so I'll have to go for binary distribution. – halifar Aug 23 '10 at 20:45
If it's your program, you could always make it open source :). It's completely your choice though, and if you want to only release binary packages it will just mean more work to support different platforms. – dv3500ea Aug 23 '10 at 20:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.