Author Topic: Licenses  (Read 2033 times)

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 301
Re: Licenses
« Reply #15 on: August 29, 2018, 12:07:11 AM »
I took a look at bmk_util.bmx and it seems NG links to winpthread (Posix) not pthread (Win32) in Windows, on Linux it's pthread, on Mac there's no link to pthread at all, so maybe Clang adds this by default ?

After the 0.93 release, NG is now threaded by default, as far as I could tell threading can't actually be disabled now, such as with "-h st" ? If you're using the 0.87 release, you can still build single-thread apps.

Here's Brucey's "threads by default" topic:
https://www.syntaxbomb.com/index.php/topic,82.msg764.html

If your using vanilla Blitzmax, it links to pthread (Win32) not winpthread (Posix) so even if you rebuild with threads there's no need for a license there.

We only need to add this license at the distribution stage (ie. final product) not demos or betas, since we do this all the time and nothing happens.

Offline TomToad

  • Sr. Member
  • ****
  • Posts: 340
Re: Licenses
« Reply #16 on: August 29, 2018, 12:14:14 AM »
It seems that if you are using TDM-gcc, then winpthreads is compiled into every executable, whether you use it or not.  Other distributions have winpthreads as a .dll or linked statically, and are only needed if you use c++11 std::threads class.  So it seems that if you use vanilla BMax, you need to distribute the license with every copy you distribute. I don't believe that NG is using TDM.  In the version that is bundled with the release version of NG, there is a libwinpthreads.dll file which I don't see in the TDM-GCC directory.  Also doing gcc -v produces "gcc version 5.1.0 (tdm-1)" with TDM, but "gcc version 7.2.0 (x86_64-posix-seh-rev1, Built by MinGW-W64 project)" with the version included with NG.

In the TDM version, I see this in the README-gcc-tdm64.txt file:
Code: [Select]
Because of TDM-GCC's continuing goal of minimizing extra DLLs, winpthreads has
been compiled statically. It will be statically linked with every program you
compile, which will increase your baseline executable size.
...
Because every program you compile will now rely on winpthreads, you should make
sure to read and comply with its MIT-style license, included in the file
"COPYING.winpthreads.txt".
This would indicate that every executable contains winpthreads.  I see no such statement in any of the documentation included with NG.

As for other licenses, this would be on a module by module case.  Most of the standard brl and maxgui modules should be free of any additional requirements, although I'm not sure what changes Brucey has made to NG that might affect that.  Any third party modules would have their own license requirements.
------------------------------------------------
8 rabbits equals 1 rabbyte.

Offline wombats

  • Jr. Member
  • **
  • Posts: 25
Re: Licenses
« Reply #17 on: August 29, 2018, 12:56:07 AM »
I took a look at bmk_util.bmx and it seems NG links to winpthread (Posix) not pthread (Win32) in Windows, on Linux it's pthread, on Mac there's no link to pthread at all, so maybe Clang adds this by default ?

After the 0.93 release, NG is now threaded by default, as far as I could tell threading can't actually be disabled now, such as with "-h st" ? If you're using the 0.87 release, you can still build single-thread apps.

Here's Brucey's "threads by default" topic:
https://www.syntaxbomb.com/index.php/topic,82.msg764.html

If your using vanilla Blitzmax, it links to pthread (Win32) not winpthread (Posix) so even if you rebuild with threads there's no need for a license there.

We only need to add this license at the distribution stage (ie. final product) not demos or betas, since we do this all the time and nothing happens.
The version of TDM MinGW in the Win32 v0.87 release has winpthreads. If we don't specifically enable threading, can we guarantee winphthreads won't be included?

I'm starting to wonder if BlitzMax is even appropriate for my project anymore, which is a shame because language and feature wise it's perfect. I don't know of any other languages I could use. I worry that my users will balk at the idea of having to distribute a license for something they don't use. Maybe I'm overthinking it, I don't know.

Offline TomToad

  • Sr. Member
  • ****
  • Posts: 340
Re: Licenses
« Reply #18 on: August 29, 2018, 02:13:49 AM »
I don't really see it as much of an issue. Just go ahead and copy the winpthreads license in an easily accessible area, such a in the about box, or with the documentation. That's all that winpthreads requires. 

------------------------------------------------
8 rabbits equals 1 rabbyte.

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 301
Re: Licenses
« Reply #19 on: August 29, 2018, 04:09:24 AM »
Hi TomToad,

well I'm fairly sure that static linking is the process of copying the library code into the exe, so if you're not building NG multi-threaded in Windows you shouldn't actually have winpthread in the exe. I think the text you posted is a bit misleading, and should read:

Quote
It will be statically linked [upon request] with every program you
compile, which will increase your baseline executable size.
...
Because every program you compile will now rely on winpthreads [instead of pthread-w32]

And that again means vanilla Blitzmax never needs the winpthread license.

wombats, I'm fairly sure winpthreads isn't included but I can't guarantee anything as I'm not an expert on low-level coding. NG 0.87 should work fine, most changes since have been new language features.

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 301
Re: Licenses
« Reply #20 on: August 29, 2018, 04:54:49 AM »
wombats, if you do want to use the latest NG you could make including the license really easy. Just Incbin the license and have it print (or write out) the text file when some text or image is selected, then explain this function clearly in your docs to your users and leave it up to them whether they use it. It could even be written to be compatible with any project using Max2d and posted as a code archive...

Offline wombats

  • Jr. Member
  • **
  • Posts: 25
Re: Licenses
« Reply #21 on: August 29, 2018, 05:01:48 AM »
wombats, I'm fairly sure winpthreads isn't included but I can't guarantee anything as I'm not an expert on low-level coding. NG 0.87 should work fine, most changes since have been new language features.
I'm not bothered about new language features (vanilla BlitzMax language is what I'm used to, anyway...I would actually use it instead of NG if it supported x64), so if NG v0.87 doesn't have winpthreads or including it can be avoided, I think it would work fine for me. I would want to know for sure that it's not in there, but I'm not sure how I would do that.

wombats, if you do want to use the latest NG you could make including the license really easy. Just Incbin the license and have it print (or write out) the text file when some text or image is selected, then explain this function clearly in your docs to your users and leave it up to them whether they use it. It could even be written to be compatible with any project using Max2d and posted as a code archive...
That's not a bad idea. I would like to avoid the whole situation if I can, though.

Offline Derron

  • Hero Member
  • *****
  • Posts: 1511
Re: Licenses
« Reply #22 on: August 29, 2018, 07:33:45 AM »
@modules
MIT / zlib are liberal. I think you only need to hand out the licence text when providing others the source code. It is there to always keep the information about the original authors.


@ NG 0.93 (or newer)
If it uses MinGW-W64 and not the TDM variant, it should not use the "problematic" library - so that licence-thingy is not an issue.


@ 3rd party end users
So you develop an ".exe" which utilizes stuff enforcing you to add some licence texts. You now skip adding these licences and hand out the application to somebody else who can create new applications with yours. right?
If so: how could these "somebody else" know that they needed to put in the licences? _They_ can't know that easily. It is up to you to put up licences or not.
If you are dumb/brave, skip adding the licences and your end users will never know.

Or just create - as suggested above - a "projectbinaryname.COPYING.txt" when creating/compiling/... stuff. It is up to the end user to package the COPYING.txt file too - or not.


bye
Ron

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 301
Re: Licenses
« Reply #23 on: August 29, 2018, 03:06:36 PM »
Quote
If it uses MinGW-W64 and not the TDM variant, it should not use the "problematic" library - so that licence-thingy is not an issue.
Derron, I think you'll find this is not correct, winpthread is in MinGW w64 GCC v6+, it's a replacement for the older one which lacks certain C++11 features.

wombats, also if you're just sharing module source code you don't have to reproduce the license. I think I would probably go for a logo/image that writes out the license file when you click it.

Offline Derron

  • Hero Member
  • *****
  • Posts: 1511
Re: Licenses
« Reply #24 on: August 29, 2018, 08:46:15 PM »
Ok. Think I got confused by "TDM" author stating something while W64 authors (from which TDM is basing its release on) did not change that (in 2013).


bye
Ron