LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Dynamically linking or not? (https://www.linuxquestions.org/questions/programming-9/dynamically-linking-or-not-435030/)

Mben 04-14-2006 04:37 AM

Dynamically linking or not?
 
Hello,

I’m just a Linux user :Pengy: , but I’m a IP French lawyer too :study: , and I would have some questions about some alternatives somebody speaks to me : to use together different line code, under different licenses. He said me that its possible to use line code with incompatible license, but it depend the command you use.
:scratch:
An example he speaks to me is about KScope, there were a problem between KScope (BSD License) dynamically linking with KDE (LGPL?), Qt (GPL) and graphviz (CPL).
Finally, I think they choice to use the GNU GPL licence, due to KDE et Qt, but, concerning the CPL for graphviz, they uses 'dot' from the command-line=20 instead of dynamically linking with graphviz.
And the result was to solve all licensing problems.

The goal is to not extend the license to the other part of the program, isn't it?

My question is, what are the different ways to use a dynamical link, and what sort of bypass, or alternative can be found to avoid certain license's effects?

Does somebody have some better explication, solution, or idea about this subject?

Thanks,

BEn

jim mcnamara 04-14-2006 07:43 AM

Here is a simple explanation, with an example. This actually can't happen because of the way windowing works, but let's pretend this is real.

definitions:
static link - Every bit of code the program will ever need is linked into one giant file. A statically linked application does not need shared libraries.
It has it all inside.

dynamic link - Only the code that is local to the application is linked into the file. When the application starts to run, it looks around on the system it is running on to find the rest of the code it needs on the system. It opens shared libraries to find what it needs. A lot of what it needs lives outside the compiled application, outside the control of the prson who develops and links the application.


You write an application, coolgame. It runs under an environment, for example X(windowing). You apply the GPL to your code. You compile normally (dynamic linking)

Okay. Next, a second party writes code to support windowing, myXserver. He claims copyright for the code. No GPL. You have to be granted rights by him to use the myXserver code. He compiles his stuff into a standard shared library.

Now, a third party deploys coolgame on a system with myXserver. coolgame opens up and starts using windowing routines from myXserver. This is a problem. coolgame did not pay to use myXserver shared libraries. Even though thrid party has myXserver legally, the developer for coolgame does not have rights to use it.


Alternatively, coolgame is linked statically. When deployed on the box with myXserver it does not use any myXserver resources. No legal issue.

graemef 04-14-2006 07:49 AM

With open source there are two quite distinct approaches. The first is to use the code, which in essence would be no different from using proprietary code, the second is to modify the code which is now using and adding to someone else's IP.

With a dynamically linked library the code is not integrated into the program, and so the library is not being modified in any way. This means that the impact on the new program of the licence under which the library has been released would be reduced. For a library license there maybe different clauses concerning usage and change. But importantly a program that uses a dynamically linked library can be distributed without that library, which could be done for many reasons not just licencing issues, it is then the responsibility of the end user to acquire the library (if they don't already have it) and agree to the libraries license. The biggest issue with this, for the end user, is that as a library evolves it will have different versions and so the end user must ensure that they have a compatable version for the new program to work.

if I wrong with anything I'm sure people will kindly correct me! But I hope that helps a little.

Mben 04-14-2006 03:30 PM

ok, I think I should read the LGPL one more time, to compare it to the GPL.
Considering what you said, the main difference would be that with the LGPL I can use a library, without changing this one, by dynamical link and I won't have to use the same license.
But if the library is under the GNU GPL license, all my work should be under the GPL, and there are no legal issue if a part of my code is under an other copyleft licence (like MPL, CPL, etc.).
If I try to do write a summary, I can't copy or use GNU GPL with a none GPL program, but I can with the LGPL.
I'm sorry if my english isn't very good, I'm french and I know I'd better improve my english a bit more...


All times are GMT -5. The time now is 10:31 PM.