licensing

From Lazarus wiki
Jump to navigationJump to search

Licensing relating to usage

Free Pascal licensing is pretty liberal, including some additional clauses to avoid some people's fear of LGPL/GPL licensing (though often unfounded in practice, it saves a lot of useless discussion).

The base licensing principle is that usage of FPC and its libraries should be possible in a normal responsible way. This means that anything that is linked into end users programs should be usable in commercial programs in the classical sense. This is realised by choosing for the LGPL license, with additional clauses that remove any doubt or double interpretations. This combined license (LGPL formal text + additional FPC disambigiuation) is commonly referred to as "FPC modified LGPL". Here is the core additional clause:

As a special exception, the copyright holders of this library give you permission to link this library with independent 
modules to produce an executable, regardless of the license terms of these independent modules, [..]

This clause is mainly meant to avoid (maybe even justified) uncertainties about the "shared linking" only clauses in the LGPL.

Lazarus follows the same base principles

Licensing relating FPC (the compiler/IDE/Lazarus program) itself

The end binaries are mostly GPL. However products made by GPL programs are not automatically subject to the GPL, so this only applies if you modify or integrate (by static linking) the core compiler binary itself. Since there are many misconceptions about the actual meaning of GPL, in case of doubt ASK! Since FPC is often used as backend compiler in educational programming projects I'll try to debunk some of the more popular myths that apply to that environment:

  • If I distribute FPC with my application for internal scripting, I must also package the source. (a link to the FPC side in some copyright addendum is enough)
  • If I modify FPC and distribute it with my application (but am not linked to it), I must ship the open source my application. (Only if you link your application to GPLed code. If you package it, modifications (or better the modified source) on your site or distribution media is enough)
  • If I link to GPL code, I must open my own sources. (yes, but only when you distribute them. See Lazarus licensing section) Note that FPC is set up in a way that linking to GPL code is usually not needed.

So in short the GPL only applies if you try to integrate a core FPC end-binary into your application. Not if you merely call it. There is one unpleasant side detail though, see the lazarus licensing section.

The MPL problem

According to GNU, the MPL is GPL incompatible on hard to explain technicalities. (which to be honest I don't understand myself either). If this is true or not doesn't matter, the uncertainty alone makes the MPL-GPL combination annoying.

This is a big problem for the FPC project since it uses several endbinaries that are GPL, while the majority of the open source components in the Delphi world are MPL, due to that being Borland's choice for Jedi and companion CDs. Relicensing on the FPC side is hard, since the project is over 14 years old, and has numerous contributors. Fortunately there is an escape in some cases, the MPL provides a clause to duallicense LGPL-MPL, thoughthis clause must be explicitely invoked in the license statement, which is effectively a relicensing (even though it is more a technicality to satisfy GNU than a massive licensing change. The MPL-LGPL differences are more a difference in viewpoint and wording, resp open source ideological(GNU) and corporate legalese(MPL) in than in content). But for any relicensing, even if in practice a technicality, you must obtain consent from all major contributors.

If your MPL project still is in touch with all its contributors, you could ask their permission to relicense under the MPL dual license. In the past Jedi APILib and Jedi SDL did this. (and are now part of the FPC distribution). The Jedi JCL had discussions about it (and had the choice, since they had a pretty tight core of contriburors), but I can't remember the exact end-outcome.

MPL issues relating to Lazarus

Licensing of Lazarus is pretty much the same as with FPC itself. The libraries are modified LGPL, the environment itself is GPL. However designtime libraries link into Lazrus, making them subject to the GPL. The Lazarus teams defuses this situation by pointing at a fair use property of the GPL. This property of the GPL is that it doesn't come into effect until you distribute the result. However the result/product in the GPL license sense is the Lazarus binary with plugged-in components itself, not the application binary created with it. The application binary itself is only limited by the components you actually link to, and in the FPC/Lazarus project those are all LGPL.

So though potentially confusing this licensing is not a problem when crafting binaries with Lazarus, even if you have commercial components with designtime parts. This because you only have to open the source when you distribute the result (iow lazarus with preinstalled components).

However there is one sideeffect to this. If you distribute a Lazarus with components pre installed, they must be GPL compatible. IOW it makes it impossible for e.g. componentvendors to provide a lazarus with components installed, or create a Lazarus distro with the MPL-only Jedi components preinstalled.

MPL issues relating to FPC

MPL issues in general only affect the FPC release distribution, not the generated programs (unless the generated programs are GPL), since unlike Lazarus, no linkage to GPL binaries is needed for normal operation.

We wish to keep the FPC distribution licensing somewhat uniform for the benefit of our users. Which means for

  • libraries LGPL-modified, or something fully compatible (like e.g. a (modified/modern) BSD license), and
  • for enduser binaries, GPL, LGPL, BSD or PD. In general anything free that is GPL compatible.
  • build scripts,Makefiles and the like are mostly considered throwaway tools, and their licensing is usually not explicitely locked down.

The result of this policy is that strict MPL libraries are not to be added to the core FPC distribution at this point. Several projects (Jedi-Apilib, Jedi Math are done, Jedi-SDL is being negotiated) kindly dual-licensed their offerings to LGPL-modified though to work around this, and were added, for which we are eternally grateful.

Some other projects (e.g destructor.de's libtar) relicensed their sources under a compatible license from their own designed license for consistency's sake.

Note that in general distribution of a package in the FPC and/or Lazarus distribution doesn't mean FPC core taking control of a package. It is merely done to create a more clear and synchronized versioning, and ease of use. It also moves the FPC specific release engineering to FPC, allowing the projects to focus on the Delphi release engineering.