• 0

Is libwinpthread-1.dll covered by the "GCC Runtime Library Exception"


Question

I want to distribute some software that was compiled with the MinGW compiler which is bound by the GPL but my software is closed source and my software requires the GCC run time environment. (It uses the DLLs so no static linking).

 

According to this:

 

http://www.gnu.org/licenses/gcc-exception-3.1-faq.html

 

  Quote

You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPLv3, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules.

 

Based on my understanding, I can keep my code closed as far as I don't mess with the original source files (which I don't, I only use the compiler to compile the program). Then it says this:

 

  Quote

The GCC Runtime Library Exception covers any file that has a notice in its license headers stating that the exception applies. This includes libgcc, libstdc++, libfortran, libgomp, libdecnumber, libgcov, and other libraries distributed with GCC.

 

It doesn't meantion: libwinpthread-1 but it does say "and other libraries distributed with GCC." I spent quite some time searching for the answer but I could not find out if it's covered or not. So I had to download the MinGW source code and try to make sense (this is the first time I was looking at its source code) and I found a file called: "thread.c" in src-4.8.0-release-rev1.tar\src-4.8.0-release-rev1\src\gcc-4.8.0\gcc\ada and in it:

 

  Quote

* As a special exception under Section 7 of GPL version 3, you are granted *
 * additional permissions described in the GCC Runtime Library Exception,   *
 * version 3.1, as published by the Free Software Foundation.               *

 

But I don't know if this file is responsible for "libwinpthread-1.dll" because there is also a folder called "winpthreads" and in it there some files and not one of them mentions "GCC Runtime Library Exception" so I am really really confused.

 

I have done so much research but I could not find an answer.

 

My objective is to release the software without later on being forced to release my code because if that's the case I may as well buy Vision Studio and compile it using VS.

10 answers to this question

Recommended Posts

  • 0
  On 28/12/2013 at 02:13, rwx said:

Yes, I get the point now and I agree, that is a good point.

 

In my case, the software I'd like to redistribute as a freeware (I am an independent developer) was developed with the Qt framework (which is a top-notch framework without a doubt).

 

I dynamically link to Qt DLL files as well as the MinGW DLLs. When I say dynamically, what I mean is my EXE requires the DLLs in order for it to run. So the DLL code is not built-into the exe itself. It depends on the DLLs and take one DLL away, it won't run. My app is closed source and have done zero modifications to the Qt libraries. I just #included the header files so I can utilize the API.

 

So I will need to have Qt's source code handy in case someone asks for it (which I do, it comes with installer as far as I am aware).

 

I know I am bound to include the LGPL license file with the files I am redistributing and acknowledge the use of Qt LGPL edition in the about box.

 

That's basically all I intend to do and the LGPL allows having the source closed if you dynamically link the libraries (as far as I am aware).

 

This all sounds perfectly permissible to me (and quite common). Dynamic linking is required as per the license AFAIK because of the part I highlighted in my previous post. I don't believe static linking is allowed because it would make it impossible for the user to relink to a newer revision of the library (as required under the licensing terms). Anyway, I just took a look at the specific revision that QT is using and it it looks like newer revisions of the LGPL have a stipulation that exempts you from having to directly redistribute the source after all (this is not in the older versions: https://www.gnu.org/licenses/lgpl.html). So you can go ahead and do what you were thinking and just provide a link:

 

  Quote
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

-http://www.gnu.org/licenses/lgpl-2.1.html

 

Be careful though, if the version or the license the software is under doesn't have that stipulation then you should be wary of doing doing it that way. It's important to check the terms exactly.

  • 0

There are two pthread libraries that are typically used with MinGW and MinGW-w64*: winpthreads and pthreads-win32. Neither are from the GNU Project so they don't necessarily have the same licensing. Most of the compilation runtime related aspects of GCC are under the GCC exception clause you found; however, that doesn't mean winpthreads and pthreads-win32 are (since they aren't from the GNU Project). Winpthreads is actually under a 3 clause BSD-style license so it has almost no restrictions: http://sourceforge.net/p/mingw-w64/code/6184/tree/trunk/mingw-w64-libraries/winpthreads/COPYING. So you can link to it statically/dynamically without issue. Pthreads-win32 on the other hand is an LGPL licensed software and does not have an exception. What this means is that if you happen to use it that you have to distribute the source code for version of the DLL you are distributing. You don't have to distribute your own source code in that scenario (unless you are taking a very liberal interpretation of copy-left...).

 

That ada/thread.c code is not related. It just defines some ADA language specific setup code for pthreads (i.e. to use CLOCK_RT_Ada for the clock of pthread_condattr: http://www.sourceware.org/pthreads-win32/manual/pthread_condattr_init.htmlhttp://linux.die.net/man/3/pthread_condattr_setclock)

 

 

* You probably shouldn't be use MinGW if you are, and should instead be using MinGW-w64 (even for 32-bit targets). The former is out of date last I heard and chronically slow at incorporating new features, etc.

  • 0
  • 0

snaphat, thank you for taking your time to answer this. I appreciate it. I have been all over Google for this one and I didn't find the required info but I certainly learned quite a bit of the licensing restrictions of GPL and LGPL.

 

In relation to LGPL, I think you are right, but I believe providing a link to the sources' web page "should" be enough rather than providing the actual source code of the version that one would be using.

 

Take this for example, If I was using a DLL compiled by someone else, I do not have the source code for that DLL so if someone "asks" for the source code of that DLL, does that mean I am required to do "his" work? This would involve me personally studying the MinGW source code and make sense (understand the code on his behalf) and pin point literally what files are responsible for the DLL? It just doesn't sound right.

 

In my case, I just copied the DLLs of the MinGW's bin directory (which were compiled by the MinGW team) so if I was distributing the exact unmodified DLLs compiled by someone else, the someone else interested about the source code should seek the answer from the MinGW source code hosting page.

  • 0
  On 28/12/2013 at 00:37, rwx said:

snaphat, thank you for taking your time to answer this. I appreciate it. I have been all over Google for this one and I didn't find the required info but I certainly learned quite a bit of the licensing restrictions of GPL and LGPL.

 

In relation to LGPL, I think you are right, but I believe providing a link to the sources' web page "should" be enough rather than providing the actual source code of the version that one would be using.

 

Take this for example, If I was using a DLL compiled by someone else, I do not have the source code for that DLL so if someone "asks" for the source code of that DLL, does that mean I am required to do "his" work? This would involve me personally studying the MinGW source code and make heads and tales and pin point literally what files are responsible for the DLL? It just doesn't sound right.

 

In my case, I just copied the DLLs of the MinGW's bin directory (which were compiled by the MinGW team) so if I was distributing the exact unmodified DLLs compiled by someone else, that someone interested about the source code should seek the answer from the MinGW source code hosting page.

 

Under LGPL, you are required to provide the source code even for DLLs you didn't compile yourself. You are still bound by the terms of the license regardless of whether or not you actually compiled the software. I'm not sure why you'd think otherwise. You don't get to ignore that part just because someone else already distributed the source code at some point*.

 

In any case, it wouldn't be all that difficult since library code is generally self-contained. Providing an web link to MinGW's source code is not enough because you need a specific revision of the source code (the one that corresponds to the build) and you have to guarantee that the code is going to be available. Ubuntu and other Linux distributions skirt the issue of distributing the binary package and source code from the same location.

 

That being said, MinGW's runtime components don't have that restriction. Like I said in my previous post, winpthreads has a BSD-style license. And my understanding is that most of the runtime components are public domain anyway so they wouldn't have any restriction.

 

*See:

  Quote
4. Combined Works.

You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:

  • a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
  • b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
  • c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
  • d) Do one of the following:
    • 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
    • 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
  • e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)

 

  • 0

Here's a good example of why you are bound to redistribute the source code. Imagine that a vendor privately did modifications and then compiled some LGPL software. If they distribute the binaries then they are required to distribute the source code right? Now, suppose they only distribute the binaries/source code to their customers. And now imagine their costumers decide to redistribute the same binaries. If the customers were exempt from redistributing the source code, then the entire purpose of copy-left licensing is circumvented.

 

Now another good example: imagine you simply link to MinGW's source code instead of hosting/providing the source code yourself (supposing that MingGW was simply LGPL). And then imagine that MinGW closes shop and stops providing binaries and source code all together. Now, you are distributing binary and you can't distribute the source code because you don't have it and were actually relying on someone else to distribute it for you.

  • 0
  Quote

 

Now another good example: imagine you simply link to MinGW's source code instead of hosting/providing the source code yourself (supposing that MingGW was simply LGPL). And then imagine that MinGW closes shop and stops providing binaries and source code all together. Now, you are distributing binary and you can't distribute the source code because you don't have it and were actually relying on someone else to distribute it for you.

 

Yes, I get the point now and I agree, that is a good point.

 

In my case, the software I'd like to redistribute as a freeware (I am an independent developer) was developed with the Qt framework (which is a top-notch framework without a doubt).

 

I dynamically link to Qt DLL files as well as the MinGW DLLs. When I say dynamically, what I mean is my EXE requires the DLLs in order for it to run. So the DLL code is not built-into the exe itself. It depends on the DLLs and take one DLL away, it won't run. My app is closed source and have done zero modifications to the Qt libraries. I just #included the header files so I can utilize the API.

 

So I will need to have Qt's source code handy in case someone asks for it (which I do).

 

My understanding is that I am bound to include the LGPL license file with the files I am redistributing and acknowledge the use of Qt LGPL edition in the about box and I have done all this.

 

That's basically all I intend to do and the LGPL allows having the source closed if you dynamically link the libraries (as far as I am aware).

  • 0
  On 28/12/2013 at 03:29, rwx said:

Thank you! Yes I am using the latest version.

Just a reminder: if your question has been answered, please click "Mark Solved" on the answer.

  • Like 1
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Aiarty Image Enhancer for PC & Mac (worth $85) free offer ends today June 8 by Steven Parker Claim your complimentary eBook worth $85 for free, before the offer ends today June 8. Get Aiarty Image Enhancer to restore and upscale images to 32K with more details. Make your images and photos larger, sharper and clearer with AI. Tired of the tiny, blurry or low-resolution images downloaded from web or grainy pictures taken by old smartphones? Aiarty Image Enhancer comes to help you out. Leveraging tailored AI models and deep learning algorithms, it can transform any images, photos and AI arts into high-quality visuals with exceptional clarity and realistic details. No matter you’re enhancing web graphics, restoring cherished family memories, or preparing visuals for creative projects, Aiarty can produce studio-quality results in just a few clicks. Get it now to transform your images to stunning masterpieces at zero cost! Key Features: Upscale: enlarge images and photos to 4K/8K/32K for printing, archiving, sharing, displaying, or more. More details: generate more realistic details for hair, fur, feature, skin textures and so on, ensuring crystal-clear pixels. Restore face with faithful details, perfect for portraits, selfies, old photos, group shot. 4-in-1 enhancement: deblur, denoise, dejpeg and upscale image in one click. Batch process. Enhance 3000+ images at once, streamlining image editing workflow. Fast & Simple. Upscale 100 images in 2 minutes with just one click. No skills needed. Trained on 6.78 million images. Optimized for NVIDIA, AMD, and Intel GPUs & CPUs. The exclusive offer ends on June 8th. Don't miss out – grab your free licensed copy today. How to get it Please ensure you read the terms and conditions to claim this offer. Complete and verifiable information is required in order to receive this free offer. If you have previously made use of these free offers, you will not need to re-register. While supplies last! Download Aiarty Image Enhancer for PC/Mac (worth $85) for free Offered by Digiarty WinXDVD, view other free resources The below offers are also available for free in exchange for your (work) email: Winxvideo AI V3.0 Lifetime License for PC ($69.95 Value) FREE – Expires 6/8 Aiarty Image Enhancer for PC/Mac ($85 Value) FREE – Expires 6/8 Solutions Architect's Handbook, Third Edition ($42.99 Value) FREE – Expires 6/10 AI and Innovation ($21 Value) FREE – Expires 6/11 Unruly: Fighting Back when Politics, AI, and Law Upend [...] ($18 Value) FREE - Expires 6/17 SQL Essentials For Dummies ($10 Value) FREE – Expires 6/17 Continuous Testing, Quality, Security, and Feedback ($27.99 Value) FREE – Expires 6/18 VideoProc Converter AI v7.5 for FREE (worth $78.90) – Expires 6/18 Macxvideo AI ($39.95 Value) Free for a Limited Time – Expires 6/22 The Ultimate Linux Newbie Guide – Featured Free content Python Notes for Professionals – Featured Free content Learn Linux in 5 Days – Featured Free content Quick Reference Guide for Cybersecurity – Featured Free content We post these because we earn commission on each lead so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. Other ways to support Neowin The above deal not doing it for you, but still want to help? Check out the links below. Check out our partner software in the Neowin Store Buy a T-shirt at Neowin's Threadsquad Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: An account at Neowin Deals is required to participate in any deals powered by our affiliate, StackCommerce. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through the branded deals site.
    • You will find sketch and clone apps on both the Play Store and the App Store contrary to what Google and Apple will tell you. This fact negates their argument for why there shouldn't be other app stores and so on, it's BS at the end.
    • I ran the powershell script and it did not "recreate the inetpub directory if it has been deleted" I rebooted several times and also tried re running the script. I had to click y three times when I ran it initially as well, now running it just returns to a new poweshell line with no errors but still no directory recreated. meh
    • So? What matters for the masses is the default experience. And in their own ad block implementation they whitelist their ad platform by default. What they care about is making their ad platform more relevant and a good way to do that in their own browser implementation is to blacklist google's platform (lowering its market share) and whitelist theirs (increasing its market share).
    • This, plus loved it as a cameo on 6 underground  
  • Recent Achievements

    • First Post
      viraltui earned a badge
      First Post
    • Reacting Well
      viraltui earned a badge
      Reacting Well
    • Week One Done
      LunaFerret earned a badge
      Week One Done
    • Week One Done
      Ricky Chan earned a badge
      Week One Done
    • Week One Done
      maimutza earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      482
    2. 2
      +FloatingFatMan
      264
    3. 3
      snowy owl
      238
    4. 4
      ATLien_0
      231
    5. 5
      Edouard
      177
  • Tell a friend

    Love Neowin? Tell a friend!