• 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

    • The list of Mac devices rumored to get macOS 26 by Hamid Ganji Apple will announce macOS 26 or macOS Tahoe at its Monday Worldwide Developers Conference. As has been reported multiple times over the past weeks, all Apple operating systems will receive a UI overhaul, a touch of AI, and new names at this year's WWDC. The logic behind the "26" in the new macOS version is that Apple aims to align its naming schedule with its 2025-2026 release cycle. The same version number will also appear across iOS, iPadOS, watchOS, and tvOS. While skipping multiple software versions raises many questions, it might help maintain consistency in the Apple ecosystem. With just two days away from the WWDC kick-off, many Mac owners might wonder if the upcoming macOS 26 is compatible with their devices. Here's the rumored list of compatible Mac devices with the macOS 26: MacBook Air (M1 and later) MacBook Pro (2019 and later) iMac (2020 and later) Mac Mini (M1 and later) Mac Studio (all models) Mac Pro (2019 and later) This report comes from MacRumors, which cites a private account on X as the source. However, the interesting thing about this list is that, according to the leaker, Apple might end software support for the MacBook Pro 13-inch (2020 model, two Thunderbolt 3 ports). For now, we should take this claim with a pinch of salt. The 2020 MacBook Pro 13-inch launched with both Intel and Apple Silicon M1 processors. It also comes with two port configurations. Apple is expected to end support for more Intel-based Mac devices this year, and this specific MacBook Pro variant might also be on Apple's kill list. WWDC 2025 kicks off on June 9, and Apple will unveil the latest version of its operating systems with an overhauled UI and a slew of AI-related features. So far, we know what Apple Watch models might get watchOS 26. Apple will announce the compatibility list of various devices at Monday's event.
    • It's a separate question to the thread, but I have VLC and qBitorrent working on W11 without any issue. Download->install->job done.
    • Currently I am using Display Port connection to monitor.   If I change the setting you show above it does make text larger, but ALL text larger not just icon text on desktop. Also is doesn't change the text weight at all. That setting leaves it very thing test. I want bold, or semibold.
    • Patch My PC - Home Updater 5.2.3.0 by Razvan Serea Patch My PC Free is a reliable tool which can quickly check your PC for outdated software. The supported third-party programs include a large number of widely-used applications, including Adobe Reader, Mozilla Firefox, Java, 7-Zip, BleachBit, Google Chrome and many more. Patch My PC Home updater features: Updates over 500 common apps check including portable apps Ability to cache updates for use on multiple machines No bloatware during installations Applications install/update silently by default no install wizard needed Optionally, disable silent install to perform a manual custom install Easy to use user interface Change updated and outdated apps color for color blindness Option to automatically kill programs before updating it Create a baseline of applications if installing on new PC’s Quickly uninstall multiple programs Scan time is usually less than 1 second Set updates to happen on a schedule Skip updates for any application you don’t want to update Suppresses restarts when performing application updates Patch My PC - Home Updater 5.2.3.0 changelog: Startup Manager New tab to manage which apps launch at startup. This helps speed up your boot time and gives you control over what runs in the background. Generate Diagnostic ZIP You can now create a diagnostic ZIP file from the About page. This helps if you need to send logs on our support forum for Home Updater. Remove Portable Apps Right-click any portable app in the App Catalog or Uninstaller page to remove it directly. Applications Added FFmpeg (Full Shared) – Portable Fing G-Helper – Portable IntelliJ IDEA Community Edition K-Lite Basic Codec Pack K-Lite Full Codec Pack K-Lite Standard Codec Pack KeePass Password Safe v1 LibreOffice Help Pack MemTest86 – Portable Nexus Vortex Nvidia Profile Inspector – Portable Pale Moon – Portable ViVeTool – Portable WinCDEmu Windows PC Health Check Wise Video Converter Applications Removed Driver Easy Download: Patch My PC 5.2.3.0 | 54.8 MB (Freeware) Download: Patch My PC Portable | 31.0 MB (Portable) View: Patch My PC Free Homepage | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • "For starters, Microsoft Edge is getting a media control center. This feature is intended to let you control multiple media sources from any website in a single place." Oh, I've got this Media Control and couldn't find how to disable it. I hate it when a button appears on a toolbar where there was none just before I press Play. I probably would find it at least somewhat useful if I could start playing media from any opened tab, but now it only shows controls for media I've already started playing. If anyone knows how to disable it - I'd appreciate a hint.
  • Recent Achievements

    • Week One Done
      abortretryfail earned a badge
      Week One Done
    • First Post
      Mr bot earned a badge
      First Post
    • First Post
      Bkl211 earned a badge
      First Post
    • One Year In
      Mido gaber earned a badge
      One Year In
    • One Year In
      Vladimir Migunov earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      490
    2. 2
      +FloatingFatMan
      257
    3. 3
      snowy owl
      248
    4. 4
      ATLien_0
      224
    5. 5
      +Edouard
      189
  • Tell a friend

    Love Neowin? Tell a friend!