If we use a nice library like TetGen, generate a simple application-wrapper that simplifies our needs and publish it as open source, can we use it inside some Pipe/Chain of applications used in our commercial product?

Is this allowed by the GPL and AGPL licenses, or they do force all of a commercial product that consists of many such applications to be open source?


There are no explicit restrictions on use in commercial products, only on distribution of derived works (or use as a service for AGPL code) without distribution of their source code.

So, if you want to use this library, you will either have to comply with the GPL license or pay for it to be licensed under annother license.

Comply with the GPL/AGPL license

Whether an application is considered a derived work, and thus whether you have to license it under a compatible license, depends on how the GPL code is called.

If you share interfaces and data structures between GPL/AGPL software and your own software, then they will most likely be considered derived works and your own software will need to be licensed under a compatible license.

If you use something like a unix pipe to feed a stream of data from one program to another, those programs are in separate process spaces and share no data structures, then they would most likely not be considered derived works, and you can attach whatever license you like to your own code.

From Frequently Asked Questions about the GNU Licenses:

What is the difference between an “aggregate” and other kinds of “modified versions”?

An “aggregate” consists of a number of separate programs, distributed together on the same CD-ROM or other media. The GPL permits you to create and distribute an aggregate, even when the licenses of the other software are non-free or GPL-incompatible. The only condition is that you cannot release the aggregate under a license that prohibits users from exercising rights that each program's individual license would grant them.

Where's the line between two separate programs, and one program with two parts? This is a legal question, which ultimately judges will decide. We believe that a proper criterion depends both on the mechanism of communication (exec, pipes, rpc, function calls within a shared address space, etc.) and the semantics of the communication (what kinds of information are interchanged).

If the modules are included in the same executable file, they are definitely combined in one program. If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.

By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.

For more information and additional suggestions, see this answer to Can I dynamically call a LGPL/GPL software in my closed-source application?

As always though, unless your situation is clear cut, you may want to consult an lawyer who is an expert in open source licensing before basing your business model on it.

Pay for use via a commercial license

If you determine that your product would form a derived work, and you do not wish to open source your product, the other option is to simply license the library under commercial terms. According to the TetGen Licensing FAQ (question 2) the library is dual licensed, and you can contact them for prices and terms.

If this fits with your business model, then this can be a great way to pay back the open source community, encourage it's growth and future development and help share some of the profit you generate through distributing their software more widely. Everybody wins.


When I was developing commercial software for a customer who had a lot of wishes, I used Open Source components. That did mean the product he received was Open source, too, but it also was commercial. I wouldn't have written that code if I wasn't paid for it.

So yes, you can use Open Source components in commercial software, and yes, with GPL that software then has to be GPL as well.

  • 1
    Well, part of the key here is that the GPL family is a distribution license, not a use license like an EULA is. If your customer intended to redistribute the software to third parties, they'd be on the hook for GPL license compliance. If they simply contracted you to produce software, then there's no problem. This is how large corporations like Google "get away" with heavily modifying Open Source code to run their servers internally: they aren't distributing it, so it doesn't have to be made available. – Bacon Bits Oct 28 '14 at 19:45
  • @BaconBits - Note that the original question also talks about AGPL, which was specifically designed to prevent a service based on the code being used without release of the source code. – Mark Booth Oct 30 '14 at 10:59
  • @MarkBooth That's true. I should have been more clear. – Bacon Bits Oct 30 '14 at 13:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.