关于GPL

因为最近在做ffmpeg相关的东西,所以GPL/LGPL还是要了解一下的。

GPL的WIKI: GPL WIKI

FFmpeg主要代码遵循的是LGPL;简单来说,静态库调用的话必须同样遵循LGPL(被传染),而动态库调用就没关系:FFmpeg legal

The following is a checklist for LGPL compliance when linking against the FFmpeg libraries. It is not the only way to comply with the license, but we think it is the easiest. There are also a few items that are not really related to LGPL compliance but are good ideas anyway.

1.Compile FFmpeg without “–enable-gpl” and without “–enable-nonfree”.

2.Use dynamic linking (on windows, this means linking to dlls) for linking with FFmpeg libraries.

但是X264遵循的是GPL。。。(编译的时候要--enable-gpl还记得么)

在静态库链接上,基本没疑问,老老实实遵循GPL就好了。

但是在动态库链接上,争议很大。正如Android ,在争议中逃离 Linux 内核的 GPL 约束提到的GPL官网的FAQ:

If a library is released under the GPL (not the LGPL), does that mean that any software which uses it has to be under the GPL or a GPL-compatible license? (#IfLibraryIsGPL)

Yes, because the software as it is actually run includes the library.

这句话是有争议的,如果可以证明software can run without the library那就可以用的意思么(静态链接的话,去掉库编译都报错了,所以直接pass)?

在wiki上对此也有三个版本的说法:

  1. Point of view: dynamic and static linking violate GPL
  2. Point of view: static linking violates GPL but unclear as of dynamic linking
  3. Point of view: linking is irrelevant

。。。先按照相对最安全的方法,使用动态库链接吧。。。。

更新:发现更华丽的一个License : GNU Classpath exceptionJavacv在用,这是止步GPL于JAR包的意思啊,很好!】