GNU, GPL, and LGPL

Source: Internet
Author: User
Title: GNU, GPL, and LGPL. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems and open-source, and other basic classification 1.GNU and Linux relationships

The GNU Project started in 1984 and is funded by the Free Software Foundation (FSF). It aims to develop a Free, UNIX-type operating system, it is called the GNU system. GNU is "GNU? The abbreviation of s Not UNIX, which is widely used in Linux kernel.

The GNU project has developed many high-quality programming tools, including the emacs editor, gnu c, and C ++ compilers (GCC and G ++) that can run on any computer system. All GNU software and derivative work follow the GNU General Public License (GPL. Linux development uses many GNU tools. In Linux, almost all the tools used to implement the POSIX.2 standard are developed by the GNU project. Many content of the Linux system is also developed by the GNU project, including:

POSIX-compliant Operating System shell and peripheral tools.

C language compiler and other software development tools and function libraries.

X Window System.

Various application software, including word processing software and image processing software.

Various Internet software, including FTP servers and WWW servers.

Relational Database Management System.

2. GPL

GPL (General Public License, General Public License) is a software License. Its main goal is to ensure that the software is free for all users and has nothing to do with whether the software is free. GPL achieves this goal through the following channels:

It requires the software to be released in the form of source code, and requires that any user can copy or publish the software to another user in the form of source code.

It notifies each user that no form of guarantee is provided for the software.

If your software uses a part of any software protected by GPL, the software inherits the GPL software and becomes the GPL software, that is, the source code must be released along with the application.

GPL does not exclude the commercial packaging and release of Free Software, nor restrict the packaging and release of other non-free software on the basis of free software.

Software that complies with GPL cannot be spread at will, and these software usually have formal copyrights. GPL declares constraints when releasing or replicating software. However, from the user's perspective, these are not restrictions at all. On the contrary, users will only benefit from them because they can ensure that they can obtain the source code.

Although the Linux kernel is also in the GPL category, GPL is not applicable to applications that use kernel services through system calls. Generally, this type of application is regarded as a normal use of the kernel.

If you are preparing to release application software in binary form (like most commercial software), you must ensure that your program does not use any software protected by GPL. Of course, if the software uses other software through function calls, this restriction is not imposed. Currently, many libraries are protected by another GNU Public License (LGPL), which will be described below.

In Linux, the GPL statement is saved in the COPYING file under each directory. open the file to view the GPL content.

3. LGPL

Gnu lgpl (Library General Public License, Library Public License) is a License for the use of function libraries. LGPL allows users to use other libraries in their own applications, even if the source code of their own programs is not disclosed, but must ensure that the source code of the Library in use can be obtained, and, LGPL also allows users to modify these libraries.

In Linux, the content of LGPL is stored in a file named COPYING. LIB. If the Linux kernel source program is installed, a copy of the COPYING. LIB file can be found in any source program directory.

Most Linux libraries, including C language libraries (libc. a), belong to the LGPL category. Therefore, if you use the GCC compiler to create your own applications in Linux, most libraries linked to the program are protected by LGPL. To publish application software in binary format, you must follow the relevant LGPL regulations.

One way to follow LGPL is to publish the target code along with the application and makefile files that can link the target code with libraries protected by LGPL. When using such applications, you must obtain the required library through other channels and generate the final executable program based on the makefile file.

Another better way to follow LGPL is to use dynamic links. When dynamic links are used, the application calls functions in the function library at runtime. The application itself and the function library are different entities. Therefore, the application only needs to follow the dynamic link library usage method and can use the function in the function library just like using its own function, after the function library is updated, you can directly use the updated function library. When using such applications, you must first obtain the dynamic link library of the required Library (such as libc. a), and then directly run the application.

Note that some libraries and applications belong to GPL rather than LGPL. For example, the library of the common GNU dbm (gdbm) database class is a very famous GPL Library; the program generated by the GNU bison analyzer is another practical GPL tool. Therefore, if you use bison to generate code, the obtained Code also applies to GPL.

In addition to GPL, there are also substitutes for gdbm and GNU bison. For example, for database libraries, you can use the Berkeley database db to replace gdbm. For analyzer generators, you can use yacc to replace bison.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.