I have a project which is open source. I use the gstreamer library in my application. Can I distribute my application on github and provide a compiled version of gstreamer with it (so users dont have to compile it themselves)? Or is this forbidden? Gstreamer is lgpl.


All common open source libraries allow you to distribute binaries or executables, though they may impose additional conditions. For example:

  • You must always include copyright & license notices.
  • For Apache 2.0 licensed software, this includes any notices in a NOTICE file.
  • The Artistic License limits how you may call the executables or libraries in case you are not distributing the Standard Version.
  • GPL, AGPL, and LGPL covered software only allows you to distribute binaries if you make the Corresponding Source available using one of the mechanisms explicitly allowed in the license. The different license versions differ slightly. E.g. for version 3, you can satisfy this requirement by offering download of the source archive right next to the download of the binaries.
  • Some licenses allow extra terms to be tacked on, in particular the mechanism in section 7 of the GPL 3.

Aside from these legalities, there is the question whether it is sensible to check in pre-built binaries into version control. In general and especially for open source projects, the answer should be “no”:

  • Binaries can get quite large, thus unnecessarily bloating the size of the repository.
  • Binaries are usually specific to one compiler/CPU/OS. These precompiled binaries are useless to people running a different configuration.
  • Sometimes it makes sense that any dependencies are installed by users themselves. They then have the choice e.g. if they compile the dependency from source, use a package manager, or use other precompiled binaries. E.g. the Autotools build system tries to compile small test programs to determine whether a library is present.
  • Otherwise, it makes sense that the build system of your project also takes care of building dependencies. Then, you would include the source code of the dependency in your project (possibly a literal copy or Git subtree, possibly a Git submodule). While this makes initial compilation a bit slower, it is easier to guarantee that the binaries of the dependency will be compatible with your main software.

You should also think about the effect of your chosen method on security updates that are published for the dependency. If you manage the depdency yourself, you have to publish a new version of your software so that the security update can reach users. This holds regardless of whether you distribute source code or binaries. In contrast, depending on libraries that are already installed on the system lets you benefit from independent updates.

I've worked on two non-open source projects that did check in binaries. In one case this was for archival purposes, as checking in a binary was simpler than setting up reproducible builds. In another case, other factors prevented us from compiling from source. Checking in compiled artefacts was then the only approach. None of these scenarios fit your circumstances.

| improve this answer | |

Yes, it is typical in bundling applications to provide all the libraries as compiled binaries to the end-user. The GPL licences talk about such as "object code". With the LGPL such a library can be used in a proprietary app as well. The terms of the license mean source and/or object code. Therefor the clauses specified for using the library code(s) in your application would apply as well be it source and/or object code.

| improve this answer | |
  • 2
    Note: GPL/LGPL allow you to distribute a work in source or binary form subject to specific rules. e.g. You must allow anyone to whom you distribute the binary to to have access to the source that was used to make that binary as well, and in the case of GPL, you must also release the the rest of the work as GPL, whereas LGPL does not require this. – 3D1T0R Dec 22 '18 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.