[erlang-questions] Is there an accepted way of including GPL code in a project?

Harald Welte <>
Tue May 1 10:56:21 CEST 2012

Hi Alan,

apologies for my late response, I don't read the erlang-questions list
very frequently, although I'm subscribed to it.

As some of you may know, besides writing lots of osmocom.org code I'm
also involved in legal aspects of Free Software for many years
(including GPL enforcement at gpl-violations.org).  As such I also have
the pleasure of meeting with lots and lots international legal experts
around Free Software licensing.

The question is not really one of licenses, but whether or not OTP
libraries and 'user applications' will form a 'derivative work' under
copyright law.  This is not easy to answer, particularly as most of the
existing work in this area has been focussing on classinc "C/C++" style
development, which is quite a bit different from what you can see in

I cannot (and don't want to) go into all the detailed arguments here,
but suffice it to say that at least in some jurisdictions you will
inevitably find some legal experts that consider that using a OTP
library from your own code creates a derivative work.

In such a case, your own code cannot be licensed under
GPLv2/GPLv3/AGPLv3, as the GPL conditions extend to the entire
derivative work, including the OTP libraries.  As those are under the
incompatible Erlang Public License, tihs won't work.

The solutoing (for GPLv3 / AGPLv3) is to add an "additional permissive
clause" to your own work, stating that _if_ the combination of the
Erlang/OTP libraries and your own program form such a derivative work,
then you explicitly give permsision to convey/distribute those Erlang/OTP
libraries under their license.

I've done that for the osmocom.org Erlang code, as you can see at

% Additional Permission under GNU AGPL version 3 section 7:
% If you modify this Program, or any covered work, by linking or
% combining it with runtime libraries of Erlang/OTP as released by
% Ericsson on http://www.erlang.org (or a modified version of these
% libraries), containing parts covered by the terms of the Erlang Public
% License (http://www.erlang.org/EPLICENSE), the licensors of this
% Program grant you additional permission to convey the resulting work
% without the need to license the runtime libraries of Erlang/OTP under
% the GNU Affero General Public License. Corresponding Source for a
% non-source form of such a combination shall include the source code
% for the parts of the runtime libraries of Erlang/OTP used as well as
% that of the covered work.

So my recommendation for anyone doing GPLv3 / AGPLv3 development would
be to use a similar clause just to be on the safe side.

If there is no derivative work between the OTP library and your code,
then you don't have to worry about license compatibility at all.

- Harald Welte <>           http://laforge.gnumonks.org/
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

More information about the erlang-questions mailing list