I use gSOAP to generate c++ code from wsdl in some project hosted on github and I am a little lost in the license compatibilities.

Shortly I prefer to share my work without any license constraint, respecting licenses of its dependencies.

The gSOAP license seems to say that :

This SO post explains that generated code is also covered by GPLv2.

Using a Makefile that invoke the GPLv2 tools (wsdl2h & soap2cpp) that will generate the GPLv2 generated code and finally the GPLv2 code and my code will be compiled and linked into an executable.

The project will not include any gSOAP material, only command to invoke generator, reference to includes and link command to librairies (that are covered by the gSOAP Public License).

I will not provide any binaries deliveries that contains the object files compiled using GPLv2 generated code. I would like only to shared the source code letting to use it with GPLv2 or gSOAP Commercial License.

Could I use unlicense for my code ?

  • Related Q & A
    – RubberDuck
    Feb 15 '16 at 3:33
  • @RubberDuck the topic of this link is really different, it will be similar if the wsdl were covered by a license.
    – mpromonet
    Feb 15 '16 at 8:00
  • I said related. It's all about the program copying itself into the output. Does this tool do that?
    – RubberDuck
    Feb 15 '16 at 9:39

According to the GPL FAQ the output of a GPL program is not licensed under the GNU GPL, unless it copies substantial parts of sourcecode into the output which are complex enough to fall under copyright:

Q:In what cases is the output of a GPL program covered by the GPL too?

A: Only when the program copies part of itself into the output.

  • 2
    Note that all GPL programs doing this I'm aware of (GCC, bison) have special exceptions, or essentially copy a separately licensed file into their output, or use a separately licensed library for that effect.
    – vonbrand
    Feb 13 '16 at 21:15
  • wsdl2h and soap2cpp write a copyright in the generated code. Could it be considered as a part of itself ?
    – mpromonet
    Feb 14 '16 at 11:42
  • @mpromonet, you'll have to analyse the licenses (and the notices included in generated files) carefully by yourself, ask the owners to clarify, or retain a lawyer. You can not base your actions on believing the random ramblings of unknown people over the 'net.
    – vonbrand
    Feb 14 '16 at 18:57
  • The big question here is "Does this tool copy parts of itself into the output?" If it does, this answer is misleading at best, even if it's technically correct.
    – RubberDuck
    Feb 15 '16 at 3:27

I agree with the conclusion in your linked SO answer: the GPLv2-licensed wsdl2h generates code that is licensed under GPLv2 also. Therefore you cannot use unlicense on the output. If you link said code with any other code, the whole program must also be GPLv2.

Don't just take my, or the linked answer's, words for it. The gSOAP site says so itself (emphasis mine):


If you use gSOAP under the GPL v2 to integrate parts of it or code generated by it with your own code, then you are allowed to sell copies of the modified program commercially, but only under the terms of the GNU GPL v2. Thus, for instance, you must make the source code available to the users of the program as described in the GPL, and they must be allowed to redistribute and modify it as described in the GPL. These requirements are the condition for including the GPL-covered code you received in a program of your own. These restrictions may hamper certain proprietary software development scenarios. If you do not wish for your program to be released under a GPL-compatible open source license, then an alternate proprietary software license for gSOAP which will remove the aforementioned requirement is available from Genivia Inc. The gSOAP software does not include any third-party GPL code. All software was build from the ground up. Note that the GNU Bison and Flex tools are used to generate source code for the gSOAP soapcpp2 compiler. However, the Bison/Flex-generated source code is not restricted by the GPL or LGPL terms. Non-GPL third-party contributions are included in the 'extras' directory in the package and you are free to use these contributions. Suggested changes and improvements by vendors were accepted under the public gSOAP license (not GPL), which includes support for VxWorks and Apache and IIS modules for gSOAP.

Note that in the same text they mention you can obtain a proprietary license from them. This is probably part of their business model.

The reason why this is the case, but not in general for GPL programs (like text editors, browsers etc.) is explained in the GPL FAQ, linked in Phillip's answer. The key is whether the program copies part of itself into the output.

Some GPL programs, such as GNU bison and GCC, copy parts of themselves into the output, but their output isn't GPL licensed, because they provide an exception in their license.

This isn't some weird GPL thing; even proprietary programs offer similar exceptions. For example, Microsoft Office has a license exception on their document templates, so that the templates remain under Microsoft's copyright, but you can use them to create your own documents under relatively free terms (e.g. you can't "create obscene or scandalous works").

  • Why the downvotes? This is the right answer!
    – RubberDuck
    Feb 15 '16 at 3:29
  • a) it was a mistake. b) it's the right practical answer to the gsoap question, but a trifle misleading about the principle of the situation.
    – bmargulies
    Feb 15 '16 at 3:32
  • "The key is whether the program copies part of itself into the output." is all you need to know. ++
    – RubberDuck
    Feb 15 '16 at 3:35
  • @bmargulies I'm not familiar with gSOAP but I assume that quote from their website is truthful, that the generated code is also GPL, and the only way that could be possible is if GPL-licensed material is copied into the output. Do you have reason to doubt this? You state in your answer that the runtime component is GPL, but this neither proves nor disproves whether the generated code is also GPL. Feb 15 '16 at 3:57
  • In the project I would like to use unlicense, I didn't put any gSOAP material neither tools nor generated files. The links with gSOAP is the makefile that invoke gSOAP generators, the include reference and the libary linking. Like this I was wondering if someone use a GPL gSOAP distribution output will be GPL and if someone elese use the gSOAP Commercial license the output will be with the same license.
    – mpromonet
    Feb 15 '16 at 7:51

You should communicate with the author of gsoap. We acquired ('paid for') a separate license from him when we used gsoap in a commercial, non-open-source, project. However, the reason was not that he claimed that the GPL extended to the generated code, but rather that we wanted clarity on our rights to the runtime that he distributes. Note that the language quoted in another answer, which asserts the GPL requirement, stems from the runtime component, not from the generated code itself, since the generated code is useless without the runtime. I'm also not sure that language was there some years back when we dealt with this.

To talk about the general case: if the program generates code from a template, then the author of the program could treat the generated output as a derived work, subject to licensing terms of the template itself. If the program generates code 'from whole cloth', then I do not believe that there is a legal basis for the author of the generator to claim that the generated code is derived or otherwise her or his work.

  • Thnaks, but my aim is not to deliver anything, I just like to share code in github.
    – mpromonet
    Oct 9 '16 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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