flat assembler
Message board for the users of flat assembler.

Index > Heap > A compiler's license and a compiled program's one

Author
Thread Post new topic Reply to topic
axlucas



Joined: 02 May 2014
Posts: 66
Location: Argentina
axlucas
Something I have never had completely clear when building my programs is this: say I am working with compiler "C" of language "L" and I'm making a program called "P"....

* How does the license of the software C impact on P? Does it at all in any way?
* Is L intellectual property of its author? Does this impact on the license of C and therefore, on P as well?

I have always assumed the following, but never been sure:

* Unless the license of C explicitly says the contrary, the author of P can freely decide on P's license.
* Intellectual property of a language does not affect copyright of compilers of that language, unless the procedure of compilation has been patented by the authors of L

Am I very wrong? Razz
Post 04 May 2014, 03:09
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17450
Location: In your JS exploiting you and your system
revolution
The answer will depend upon which country you need to use the rights.

Generally, the EULA of a compiler can (and sometimes does) state that you can only use it to create programs that do <something> and not <another thing>. Check your compiler for what restrictions it tries to place on your usage.

Also generally, languages cannot be copyrighted so it has no effect on C or P. Documentation for a language can be copyrighted but that is not the same thing. The language name might also be a trademark but that can't affect the usage of the language itself, it only affects the usage of the name.

Patents can apply to algorithms (unfortunately) in some places. Not all countries recognise algorithm patents so it might not apply to you.


Last edited by revolution on 04 May 2014, 09:21; edited 1 time in total
Post 04 May 2014, 03:17
View user's profile Send private message Visit poster's website Reply with quote
sid123



Joined: 30 Jul 2013
Posts: 340
Location: Asia, Singapore
sid123
libgcc comes to mind. All code compiled with gcc uses libgcc, so...... (but I think libgcc is either PD or LGPL)
Another example is MASM32, you can't do any non-M$$$$$$ job with it.
Post 04 May 2014, 07:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17450
Location: In your JS exploiting you and your system
revolution
Argentina and Singapore might have different laws regarding the validity of software patents and/or rights than the country of origin. I've never looked into it specifically but there are times when a certain right is not eligible to be denied and thus the clause becomes void. So even if MASM32 specifically denies rights to do <something> that does not mean it is equally valid or enforceable in every country in the world. Of course one should check for themselves what risks or penalties they might incur before deciding to ignore the EULA/copyright/patent/trademark.
Post 04 May 2014, 15:19
View user's profile Send private message Visit poster's website Reply with quote
axlucas



Joined: 02 May 2014
Posts: 66
Location: Argentina
axlucas
Uhm... It seems it's much more complex than I assumed.
I can limit myself to using free software or open source for compiling my programs, but is that enough to be sure I'm doing things right?

@sid123 - If libgcc is PD, then OK. If it is LGPL, I understand that my software does not have to be (L)GPL necessarily, if I'm not mistaken. Now this makes me wonder about other libraries or compilers, whether they could be GPL. Would I be forced to make my programs GPL too? And what about open source? What does it say about the compiled product?
Post 05 May 2014, 16:53
View user's profile Send private message Reply with quote
nyrtzi



Joined: 08 Jul 2006
Posts: 192
Location: Off the scale in the third direction
nyrtzi
@axlucas

Does this clear anything up?

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

Quote:

These libraries are automatically used by the object code that GCC produces. Because of that, if these libraries were simply distributed only under the terms of the GPL, all the object code that GCC produces would have to be distributed under the same terms. However, the FSF decided long ago to allow developers to use GCC's libraries to compile any program, regardless of its license.


So the GPL license of libgcc has an explicit exception for this.

If you just link your code against a LGPL library like GNU libc instead of mixing it into your own codebase then you can license your own code any way you like.

Then again I haven't looked into other compilers so I wouldn't know what their licenses say about stuff like this.
Post 05 May 2014, 17:23
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17450
Location: In your JS exploiting you and your system
revolution
axlucas wrote:
I can limit myself to using free software or open source for compiling my programs, but is that enough to be sure I'm doing things right?
No. You still need to check the license of the program to see what has been allowed/denied. Just because it is free or open source does not automatically mean you can do whatever you want.
Post 05 May 2014, 23:24
View user's profile Send private message Visit poster's website Reply with quote
axlucas



Joined: 02 May 2014
Posts: 66
Location: Argentina
axlucas
Uhm... but this is because of the libraries in high level languages, whose code is included in the programs, right? I mean... if I use assembly, no matter what the license of the assembler program, as long as I don't include external routines, the code is 100% mine, right?
Post 06 May 2014, 05:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17450
Location: In your JS exploiting you and your system
revolution
axlucas wrote:
Uhm... but this is because of the libraries in high level languages, whose code is included in the programs, right? I mean... if I use assembly, no matter what the license of the assembler program, as long as I don't include external routines, the code is 100% mine, right?
No. The assembler license may restrict what you are permitted to use it for when assembling. For example some compilers/assemblers forbid the making of malware. Some licenses forbid you to make commercial programs.
Post 06 May 2014, 05:18
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Here is one important thing: The output of some program is different than the program itself. The output is always a property of the one running program, not the program author. The author can allow or forbid you to run the program, but once he allowed you to run the program, he can't limit what you will make with the output of the program.

Also, most copyright licenses concerns only the copying and distribution of the program. You can take every program, modify it and use it for yourself (even inside a whole corporation) without restrictions. The restrictions comes when you try to distribute your modifications.
Post 06 May 2014, 05:57
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
axlucas



Joined: 02 May 2014
Posts: 66
Location: Argentina
axlucas
@JohnFound - Yours is a very good point. Distribution is also almost the only way they can actually enforce anything, even if they wanted to be more restrictive (unless the program runs online, or something like that). Same way, if I assemble some code, who can tell which assembler I used? Of course, if it's a high level language and libraries are embedded in the resulting code, that's a different story. That's very sensible to me.
Post 06 May 2014, 19:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17450
Location: In your JS exploiting you and your system
revolution
axlucas wrote:
... if I assemble some code, who can tell which assembler I used?
If you have decided to ignore the license and are worried about enforcement then it is entirely possible to determine the assembler used. All assemblers leave "signatures" in the binary because of the way in which duplicated encodings are selected.

Anyhow, it is probably easier on the conscience just to respect the licenses and use only what is permitted. That way you can sleep better at night and not be concerned about the thugs breaking down your door.
Post 07 May 2014, 01:00
View user's profile Send private message Visit poster's website Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 490
Location: Belarus
zhak
JohnFound wrote:
You can take every program, modify it and use it for yourself (even inside a whole corporation) without restrictions. The restrictions comes when you try to distribute your modifications.
Isn't it considered distribution when you copy a program from one pc to another? Even inside a company. As I understand it, distribution starts the moment the program leaves your PC or whereever-it-has-been-stored
Post 07 May 2014, 07:24
View user's profile Send private message Reply with quote
nyrtzi



Joined: 08 Jul 2006
Posts: 192
Location: Off the scale in the third direction
nyrtzi
zhak wrote:
JohnFound wrote:
You can take every program, modify it and use it for yourself (even inside a whole corporation) without restrictions. The restrictions comes when you try to distribute your modifications.
Isn't it considered distribution when you copy a program from one pc to another? Even inside a company. As I understand it, distribution starts the moment the program leaves your PC or whereever-it-has-been-stored


I'd say that for example in the case of the GPL distribution is about software moving between users.

Distributing derived works is usually a problem for a corporation only when the source code would spread outside the corporation to the hands of the competition or to the general public.

With GPL if you have obtained a legal copy of the binaries of a program you are entitled to get the sources as well and are free to do anything you want with them and the binaries.

Then again there is the web service loophole which allows other people to use your program without providing them with the binaries and therefore you don't need to give them the sources either. Unless we are talking about the Affero variant of GPL which counts using the software over the network as distribution as well.
Post 07 May 2014, 15:33
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17450
Location: In your JS exploiting you and your system
revolution
nyrtzi wrote:
With GPL if you have obtained a legal copy of the binaries of a program you are entitled to get the sources as well and are free to do anything you want with them and the binaries.
I guess it depends upon your definition of "free" since you are still obligated to keep the GPL license on derivative works and also to distribute the derivative sources with binaries. It is not really free in terms of having no restrictions or obligations.
Post 07 May 2014, 15:53
View user's profile Send private message Visit poster's website Reply with quote
nyrtzi



Joined: 08 Jul 2006
Posts: 192
Location: Off the scale in the third direction
nyrtzi
revolution wrote:
nyrtzi wrote:
With GPL if you have obtained a legal copy of the binaries of a program you are entitled to get the sources as well and are free to do anything you want with them and the binaries.
I guess it depends upon your definition of "free" since you are still obligated to keep the GPL license on derivative works and also to distribute the derivative sources with binaries. It is not really free in terms of having no restrictions or obligations.


Yep, my bad. The idea that the GPL not only gives you freedom in the copyleft sense but also takes away your right to take away that freedom from others completely slipped my mind. What can I say? I guess I've been working with GPL code so long that often sublicensing doesn't even cross my mind anymore.
Post 07 May 2014, 16:46
View user's profile Send private message Reply with quote
sid123



Joined: 30 Jul 2013
Posts: 340
Location: Asia, Singapore
sid123
BSD - Giving a friend a free drink, because he is your friend
GPL - Giving a friend a free drink, and forcing him to tell others "MY FIREND GAVE ME A DRINK! HE'S THE COOLEST PERSON ON EARTH!"
PD - Giving a stranger a free drink, cause you've nothing else to do.
Razz
Post 08 May 2014, 12:25
View user's profile Send private message Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 822
Location: Jakarta, Indonesia
TmX
sid123 wrote:
BSD - Giving a friend a free drink, because he is your friend
GPL - Giving a friend a free drink, and forcing him to tell others "MY FIREND GAVE ME A DRINK! HE'S THE COOLEST PERSON ON EARTH!"
PD - Giving a stranger a free drink, cause you've nothing else to do.
Razz


I'm not a big fan of GPL due to its viral aspect.
But on the other side, I understand that if you intend your project to be community based
(and not something that can be turned into proprietary product by others), then go GPL-ed it.
Kinda makes sense why high-caliber open source projects like Linux kernel
or GCC use GPL.

Personaly I prefer more liberal licenses like BSD, WOL, or WTFPL though Smile
Post 08 May 2014, 16:05
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.