spatialite-android LGPL + Closed Source Android-APP

460 views
Skip to first unread message

Gerd Baumbach

unread,
Jan 27, 2013, 8:02:48 AM1/27/13
to spatiali...@googlegroups.com
Hi, 

I am wondering if I am allowed to use the spatialite library for android in a closed source application (therfore a not lgpl licensed app) ?

I have read a lot of information about this topic. In short the LGPL says that the library have to be linked as a shared library and can be replaced by another library. Otherwise the application have to be licensed as LGPL as well. As far as I know it is only possible to publish an android app with a static linked library. Does it mean that only LGPL-licensed apps are allowed to use the spatialite-android-library?

I look forward for an explanation.

Regards
Gerd

P.S: As usuel: please excuse my english :-) 

a.fu...@lqt.it

unread,
Jan 27, 2013, 7:53:35 PM1/27/13
to spatiali...@googlegroups.com
Hi Gerd,

> I have read a lot of information about this topic. In short the LGPL
> says that the library have to be linked as a shared library and can
> be
> replaced by another library.
>

that's correct


> Otherwise the application have to be licensed as LGPL as well.
>

not completely correct:
a) the LGPL license only applies to *libraries*, is not at all
intended for applications
b) the LGPL has no "viral" clauses, so statically linking your own
"proprietary" application and a LGPLed library never implies
that your code becomes GPLed "by viral infection".
anyway this way you are surely infringing the license terms, and
that's all; it simply is a forbidden option.
c) on the other side, if your own code is GPLed (by your free choice,
not by external imposition) then you can surely statically link
any other open source component.
the reason is basically simple: all users can rebuilt the whole
binaries stack starting from sources, so you are not limiting
their freedom in no way by releasing a statically linked app.
d) an alternative possibility exists: even if you are not willing
to disclose your source code, you can anyway publicly release
the corresponding object files (*.o)
this way you'll allow any user willing to relink the application
to do such a thing; in this case the user's freedom will suffer
no limitation, and you can statically link the LGPLed library
without infringing the license terms.

> As far as I know it is only possible to publish an android app
> with a static linked library. Does it mean that only LGPL-licensed
> apps are allowed to use the spatialite-android-library?
>

AFAIK it's Apple iOS that forbids using any kind of dynamic linking;
I'm not at all aware of such limitation on Android (not really sure,
anyway).

bye Sandro

--
Il messaggio e' stato analizzato alla ricerca di virus o
contenuti pericolosi da MailScanner, ed e'
risultato non infetto.

JaakL

unread,
Jan 28, 2013, 4:23:14 AM1/28/13
to spatiali...@googlegroups.com



I am wondering if I am allowed to use the spatialite library for android in a closed source application (therfore a not lgpl licensed app) ?


 You can also choose MPL 1.1 license. This should be applicable then: http://www.mozilla.org/MPL/1.1/FAQ.html. If you modify sources, you need to share them, otherwise you can use it with commercial apps with no license restrictions. 

Jaak

a.fu...@lqt.it

unread,
Jan 28, 2013, 4:50:46 AM1/28/13
to spatiali...@googlegroups.com
Hi Jaak,

> You can also choose MPL 1.1 license.
>

please note well:
no, you cannot switch to MPL in the specific case of spatialite-android
because the U.S. Army Geospatial Center released this derivative
version
of libspatialite under strict LGPLv3 license terms.

https://www.gaia-gis.it/fossil/libspatialite/wiki?name=splite-android

Gerd Baumbach

unread,
Jan 28, 2013, 5:04:18 AM1/28/13
to spatiali...@googlegroups.com
Hi, 

Thank you both so much for answering.

 this way you'll allow any user willing to relink the application to do such a thing 
(...) 
AFAIK it's Apple iOS that forbids using any kind of dynamic linking; 
I'm not at all aware of such limitation on Android (not really sure, 
anyway). 

That is true for iOS as dynamic linking is not allowed by Apple. 
For android, it is unfortunately not possible to build an app with a dynamic linked library. That is the problem. 


It seems, that android-library under LGPL is a bit senseless. :-(

Nolan Darilek

unread,
Jan 28, 2013, 9:30:07 AM1/28/13
to spatiali...@googlegroups.com
On 01/28/2013 04:04 AM, Gerd Baumbach wrote:
> For android, it is unfortunately not possible to build an app with a
> dynamic linked library. That is the problem.
>
>
>

Wait, I'm confused. My Android app has a libs folder, split by
architecture. At runtime, the VM dynamically loads the library for the
correct device architecture.

If this is not dynamic linking then I don't know what is.

Gerd Baumbach

unread,
Jan 28, 2013, 11:46:20 AM1/28/13
to spatiali...@googlegroups.com
Wait, I'm confused. My Android app has a libs folder, split by 
architecture. At runtime, the VM dynamically loads the library for the 
correct device architecture. 

That is correct, _before_ the build a libs folder exists. But the LGPL license says (as far as I guess) that the enduser should have the possibility to change (relink) a library. And exact this is NOT possible with android. 

There you can find a few words regarding the lgpl:

or linking the LGPL-ed library dynamically and allowing users to manually upgrade or replace the library. Since Android software is typically shipped in the form of a static system image, complying with these requirements ends up restricting OEMs' designs. (For instance, it's difficult for a user to replace a library on read-only flash storage.)


It is java lib, a jar file licensed under LGPL, my android app uses it and has a compile time dependency on it; so I include it as a jar file in my project. Now when I compile my app, I don't see the jar inside the resulting APK, so I assume the jar file gets merged in the single DEX file for the whole app. This DEX file is all dalvik byte code, so it is not dynamic linking. Although the author of the lgpl-lib doesn't have any issues with it; but I just wanted to know if LGPL itself allows something like that.
 

Eric Frohnhoefer

unread,
Jan 28, 2013, 8:05:38 PM1/28/13
to spatiali...@googlegroups.com
 
no, you cannot switch to MPL in the specific case of spatialite-android
because the U.S. Army Geospatial Center released this derivative
version
of libspatialite under strict LGPLv3 license terms.

 
I am the maintainer of the referenced project. I want to make it clear I am not associated with the U.S. Army Geospatial Center.  I also believe the LGPL license is incompatible with current US Law.  All works created by the US government are free to use without restriction. (reference: http://www.usa.gov/copyright.shtml)

That being said I have changed the license to the same tri-license scheme used by Spatialite. Originally I chose LGPL because GEOS was the most restrictive.

-Eric

Gerd Baumbach

unread,
Jan 29, 2013, 6:34:17 AM1/29/13
to spatiali...@googlegroups.com
That being said I have changed the license to the same tri-license scheme used by Spatialite

feel being hugged!

thank you so much. 
Reply all
Reply to author
Forward
0 new messages