• 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

    • Meta and Oakley launch AI-driven Performance Glasses with new HSTN model by Fiza Ali Meta has partnered with Oakley to create a new category of Performance AI glasses, combining Oakley’s signature design DNA with Meta’s artificial intelligence technology. This collaboration builds on the success of Ray‑Ban Meta glasses and extends Meta’s partnership with EssilorLuxottica to include another eyewear brand. The global launch is supported by a campaign featuring Team Oakley athletes Kylian Mbappé and Patrick Mahomes. The first model in this series, Oakley Meta HSTN (pronounced "HOW‑stuhn"), is based on Oakley’s HSTN frame. It features a discreet integrated camera capable of capturing Ultra HD (3K) video hands‑free. Open‑ear speakers are also incorporated into the frame. With an IPX4 water‑resistance rating, the HSTN glasses are designed to withstand sweat, rain, and splashes. At the core of the HSTN is Meta AI, the built‑in personal assistant. Users can ask for real‑time environmental data, such as wind speed on a golf course or issue simple voice commands to capture videos or photos. When it comes to the battery life, a full charge provides up to eight hours of use or 19 hours on standby. A portable charging case supplies up to 48 hours of power. Pre‑orders for the Limited‑Edition Oakley Meta HSTN open on 11 July at $499, with the standard collection, starting at $399, due to launch later in the summer. Initial availability will cover the US, Canada, UK, Ireland, France, Italy, Spain, Austria, Belgium, Germany, Sweden, Norway, Finland and Denmark, with Mexico, India and the United Arab Emirates slated to follow before the end of the year. The Oakley Meta HSTN will make its public debut at major sporting events, beginning with Fanatics Fest (20-22 June) and UFC International Fight Week (25-27 June). Further information about the Oakley Meta HSTN, including updates on availability, can be found at Oakley.com and Meta's dedicated webpage here.
    • Ok, wouldn't it be cheaper for tesla to just leave out the self driving system and use the human since he is just gonna be sitting there anyway?
    • A bunch of new content in this patch, including Hurston warehouse missions that are currently bugged, of course. The huge worm mission is cool. Rain is an amazing add-on feature, radiation in Pyro is cool but deadly af. Only issue Im having rn is the horrible server desync and lag. I have ended up 3 times in jail for shooting guards that just pop in your way while shooting baddies.
    • Elon Musk's robotaxi will have a human driver for 'safety' reasons by David Uzondu Image via Depositphotos.com A few days ago, we reported that Tesla was gearing up for its robotaxi launch, set to kick off in Austin, Texas, and now the details of the service are trickling out. Electrek says that some popular pro-Tesla influencers on X have gotten invitations to the launch. These invitations came with a list of rules, and the most glaring one was the presence of what Tesla called a "Safety Monitor" in the front passenger seat. This is basically a human supervising driver whose entire job is to watch the car and make sure it does not drive itself into a ditch. This might feel a little strange, especially given Musk's claims of "no driver" testing in the past. The safety monitor is one of the employees with access to buttons that can stop the car, much like the ones available to Waymo passengers in their fully autonomous rides. The service will operate within a geofenced area from 6 AM to 12 AM and will not run during bad weather. Other requirements include a credit card on file and an agreement that you will not be a jerk. Participants must also agree to a bunch of other rules, and one of the most interesting ones is that their access can be terminated if they share content on social media that shows the vehicle being misused. On top of that, they're not allowed to reverse engineer the technology in any way. At least the passenger gets a bit of a break. So, unlike the Tesla Full-Self Driving Beta, which requires the owner's constant attention, the supervising driver is expected to pay attention. At the same time, you, the passenger, can relax and enjoy the ride. According to Electrek's Fred Lambert, the robotaxi launch seems like an optics thing, designed to let Elon Musk say he met his June deadline for launching a robotaxi network.
  • Recent Achievements

    • Week One Done
      BlakeBringer earned a badge
      Week One Done
    • Week One Done
      Helen Shafer earned a badge
      Week One Done
    • First Post
      emptyother earned a badge
      First Post
    • Week One Done
      Crunchy6 earned a badge
      Week One Done
    • One Month Later
      KynanSEIT earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      661
    2. 2
      ATLien_0
      269
    3. 3
      Michael Scrip
      226
    4. 4
      Steven P.
      166
    5. 5
      +FloatingFatMan
      159
  • Tell a friend

    Love Neowin? Tell a friend!