Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

Question about derived works from GCC

2 Aufrufe
Direkt zur ersten ungelesenen Nachricht

James Michael DuPont

ungelesen,
01.03.2002, 06:44:0401.03.02
an
Dear All,

I would like to put a GPL licence on a derived work
from the GCC.

This GPLd modification would allow for access of all
the data in memory that is stored about any given
program that is being fed as input to the gcc, this
data would be stored in a text file.

Basically all source code input to the GCC will be
treated as output data of this module.

But the output data format is strongly dependent on
the internal structure of gcc.

Anyone who uses this tool's output will have to be
considered a derived work, and be GPLed.

Anyone who feeds non-free source through the compiler
can use the data outputted, but only via tools that
are GPLED. That means that the data outputted is also
covered by a licence and it is free data. Even if its
content is not free.

Does that require any change to the GPL,
or by putting the program under GPL, would that
protect the GCC from usage from non free software?

Mike


=====
James Michael DuPont

__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

Isaac

ungelesen,
02.03.2002, 00:26:3702.03.02
an
On Fri, 1 Mar 2002 03:44:04 -0800, James Michael DuPont <mdupo...@yahoo.com>
wrote:

>Dear All,
>
>I would like to put a GPL licence on a derived work
>from the GCC.
>
>This GPLd modification would allow for access of all
>the data in memory that is stored about any given
>program that is being fed as input to the gcc, this
>data would be stored in a text file.
>
>Basically all source code input to the GCC will be
>treated as output data of this module.
>
>But the output data format is strongly dependent on
>the internal structure of gcc.
>
>Anyone who uses this tool's output will have to be
>considered a derived work, and be GPLed.

I think I understand you up to this point.


>
>Anyone who feeds non-free source through the compiler
>can use the data outputted, but only via tools that
>are GPLED. That means that the data outputted is also
>covered by a licence and it is free data. Even if its
>content is not free.
>

I don't see how the GPL would put be any restriction on what tools
are used to operate on the output. I don't think such a restriction
would be very desireable.

Maybe the output is GPLd, but that simply means that if I modify
the output I must treat the result as a GPL'd work if it contains
any copyrightable elements from the original work. But as an
example if I want to edit the output, I don't have to use a GPLd
editor. I can use vim or vi if I want.

Isaac

Michael DuPont

ungelesen,
02.03.2002, 04:41:0802.03.02
an
> Maybe the output is GPLd, but that simply means that if I modify

> the output I must treat the result as a GPL'd work if it contains

> any copyrightable elements from the original work.

Yes, that is a much more precise definition of the problem.

The output of the memory dump from the compiler contains two types of
copyrights :

1. The format of the data is created by the data structures of the gcc
compiler, therefore the very layout and fieldnames are all dervied
works (however small) from the GCC.

2. The content of the data are snippets of the source code fed to the
system, and can be treated as being just copies of the original
source.

Therefore the two are intertwined.

If I compile for example microsofts header file indows.h with the gcc,
then dump all the data about everything held in memory at the end of
compiling, I have to treat the output as if it contains copyrightable
elements from microsoft and gnu?

mike

Isaac

ungelesen,
02.03.2002, 18:47:5502.03.02
an
On 2 Mar 2002 01:41:08 -0800, Michael DuPont <mdupo...@yahoo.com> wrote:
>
>If I compile for example microsofts header file indows.h with the gcc,
>then dump all the data about everything held in memory at the end of
>compiling, I have to treat the output as if it contains copyrightable
>elements from microsoft and gnu?
>

Are there any copyrightable elements in windows.h? Often header
files don't have any such elements.

Isaac

Michael DuPont

ungelesen,
04.03.2002, 02:45:0104.03.02
an
> Are there any copyrightable elements in windows.h? Often header

> files don't have any such elements.

Hmmm..... Good point.

For example on msdn there are some headerfiles that have copyrights on
them.
http://msdn.microsoft.com/library/en-us/dnime/html/msime.asp?frame=true
BEGIN QUOTE
%%File: MSIME.H
Copyright (c) 1997-2001 Microsoft Corporation
Version 1.2
END QUOTE

Lets use a different example, code that was written to support some
business processes in my company, copyrighted by someone in the
company that I am compiling.
If I extract all the data that was compiled from the input file out of
the dump file, the layout of the data is still dictated by the
compilers sourcecode.
If you use a routine to de-parse the data structure to recreate the
original source code then you will have a copy of the input source.

Mike

Isaac

ungelesen,
05.03.2002, 23:31:5705.03.02
an
On 3 Mar 2002 23:45:01 -0800, Michael DuPont <mdupo...@yahoo.com> wrote:
>Lets use a different example, code that was written to support some
>business processes in my company, copyrighted by someone in the
>company that I am compiling.
>If I extract all the data that was compiled from the input file out of
>the dump file, the layout of the data is still dictated by the
>compilers sourcecode.

I'm not convinced that copyrightable elements of the compiler have
been captured in the output file. After all, to some extent, normal
compiler output is strongly related to the compiler's source code.

But let's assume that something protectable by copyright is
mixed with the source code in some way. In that case I think you
have either a collective work or a derivative work that can't be
distributed without either permission of the copyright holder
of GCC either explicit or by following the GPL with respect to the
output.

Isaac

Michael DuPont

ungelesen,
06.03.2002, 02:00:4406.03.02
an
mdupo...@yahoo.com (Michael DuPont) wrote in message news:<8118d547.02030...@posting.google.com>...

> > Are there any copyrightable elements in windows.h? Often header

> > files don't have any such elements.


Phil Hunt (ph...@vision25.demon.co.uk)wrote
In the "Re: KDE v. Gnome" thread on this list:
QUOTE
2. Microsoft copyrighted the <windows.h> file that contained their
C API for Windows. If other vendors of C programming systems wanted
to use this, they had to pay MS.
END QUOTE

Another example of the same basic question about the GPL:

Lets say that you make a gpl program that links to a GPLed function,
lets say unmangle from the gcc.

If you used the gcc libberty library from this GPLed program that
reads in a mangled name from STDIN, and outputs all the information
about the mangled name in a text file, in xml format, that is within
the GPL.

Then If you create closed-source or non-gpl code or even LGPL that
uses this GPL util to unmangle any functions passed to it via the
input stream.

You then create a web interface for this program and put it on a web
server for all the world to use.
Even with an XML-RPC interface for anyone to use programmatically,
you then have a "Web Service"

Anyone would then be able to link to the XML-RPC interface even though
the code is GPL. The web service could be used by anyone without ever
being on the same computer or be known to you.

The same goes for any other GPL function,
any function can be wrapped in such a way to be a executable that
reads in all parameters from stdin and writes the results back out
into the stdout. The format could be easy to parse like xml.

Are you then still inside the GPL?
Is this covered by the GPL?


mike

Michael DuPont

ungelesen,
06.03.2002, 04:49:3806.03.02
an
Here is an example from :
Microsoft Visual Studio\VC98\INCLUDE\WINBASE.H
END QUOTE
/************************************************************************
*
*
* winbase.h -- This module defines the 32-Bit Windows Base APIs
*
*
*
* Copyright 1990 - 1998 Microsoft Corp. All rights reserved. *
*
*
************************************************************************/
typedef struct _OUTPUT_DEBUG_STRING_INFO {
LPSTR lpDebugStringData;
WORD fUnicode;
WORD nDebugStringLength;
} OUTPUT_DEBUG_STRING_INFO, *LPOUTPUT_DEBUG_STRING_INFO;
END QUOTE

Wine contains http://rhlx01.fht-esslingen.de/~andi/wine_files/wine-cvs/include/winbase.h
BEGIN QUOTE
typedef struct _OUTPUT_DEBUG_STRING_INFO {
LPSTR lpDebugStringData;
WORD fUnicode;
WORD nDebugStringLength;
} OUTPUT_DEBUG_STRING_INFO;
END QUOTE

Is this a copyright violation?

Isaac

ungelesen,
06.03.2002, 07:20:2406.03.02
an

This is the question that I was hinting at when I asked about
copyrightable elements. I don't think the quoted elements
are copyrightable. To the extent that it's legal to clone
windows at all, duplicating interface elements exactly is a
necessity. But I also think that trying to prove the point
in court wouldn't be easy. There are probably plenty more
examples of identical data structures in the file; enough so that
a suit wouldn't be dismissed at a pre-trial stage even if ultimately
the court finds that the stuff copied wasn't creative expression
protectable by copyright.

Another problem is that different circuits in the US apply different
tests to determine what's protectable by copyright.

Isaac

Barry Margolin

ungelesen,
06.03.2002, 14:35:1906.03.02
an
In article <slrna8b6tt...@latveria.castledoom.org>,

Isaac <is...@latveria.castledoom.org> wrote:
>I'm not convinced that copyrightable elements of the compiler have
>been captured in the output file. After all, to some extent, normal
>compiler output is strongly related to the compiler's source code.

I think compiler output is usually considered to be derived from the
compiler itself, since a large part of the code generator is code templates
that are copied into the output file.

The GCC copyright notice has an explicit exemption stating that code
generated by it is not required to be GPLed. The need for this exemption
is the above assumption.

--
Barry Margolin, bar...@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

Michael DuPont

ungelesen,
06.03.2002, 16:28:2306.03.02
an
> This is the question that I was hinting at when I asked about

> copyrightable elements.
Ahh... Just because it says copyright, it can still be copied.... I
see.

>I don't think the quoted elements

> are copyrightable.
Because the quoting must be done by the user anyway,
just to use the thing to begin with.
The public interface can be quoted, so you can copyright it.

> To the extent that it's legal to clone

> windows at all, duplicating interface elements exactly is a

> necessity. But I also think that trying to prove the point

> in court wouldn't be easy.

> There are probably plenty more

> examples of identical data structures in the file;

Yes I guess that it is basically 1 to 1 mapping of the structures,
all of the functions and structure *HAVE* to have the same memory
layout in order to be compatable.

>enough so that

> a suit wouldn't be dismissed at a pre-trial stage even if ultimately

> the court finds that the stuff copied wasn't creative expression

> protectable by copyright.

Hmm, the function header is an expression, think about the creativity
that goes into the sort api function header in standard c. Some data
structures are real works of art!<grin>

But seriously,
That means the variables that are created from the a data structure in
the header file of the GCC can be dumped, and the structure is
quoteable.

The data contained in an instance of a data structure is are not
copyrighted just because they are instances of type of data structure
that is copyrighted by the gcc.

The data structure in memory or if the memory is dumped 1-1 to a file,
the file structure's structure, field names an types dictated by the
header file of the program that created it.

But that is just the layout, now lets say that the layout is so
dependent on the program that outputs it, your file format/memory
layout is now closed for usage from anyone else. This is not
enforcable, many widely used file formats can be decoded.

That is the crux of the discussion about the usage of the gcc dump
files from third party/closed source/other

So the only thing the the author of the file format can do is refuse
to help such efforts.

The problem with GPLed code is that it is open to modification
so that is will output the data in such a way that all the data can be
made available.
This cannot happen to normal closed source code so easily,
because it is very hard to patch code that is compiled into machine
language to add new dumping functions.
It is the achilles heel of the open source movement, it is so open
that it can be abused.

The concern of the GCC group is that the dumps of the gcc can be used
to create closed source front and back-ends to the gcc. Do you think
there is a way to exclude such a usage of the source code of the GPLed
program?
How can you differenciate between normal usage and abuse?

Can you state that all users of the software must be GPLd, that is the
original question that you said no to already.

Where is the limit of your freedom to use free software but without
limiting the freedom of others to use the software that you create
with that freedom?

Mike

Russ Allbery

ungelesen,
06.03.2002, 16:49:2206.03.02
an
Isaac <is...@latveria.castledoom.org> writes:

> This is the question that I was hinting at when I asked about
> copyrightable elements. I don't think the quoted elements are
> copyrightable.

There are some really hysterical examples of this sort of thing. One of
my favorites is /bin/clear on Solaris. (Warning: Two lines of
proprietary source code follows. *heh*)

#!/usr/bin/sh
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
# All Rights Reserved

# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
# The copyright notice above does not evidence any
# actual or intended publication of such source code.

#ident "@(#)clear.sh 1.8 96/10/14 SMI" /* SVr4.0 1.3 */
# Copyright (c) 1987, 1988 Microsoft Corporation
# All Rights Reserved

# This Module contains Proprietary Information of Microsoft
# Corporation and should be treated as Confidential.

# clear the screen with terminfo.
# if an argument is given, print the clear string for that tty type

/usr/bin/tput ${1:+-T$1} clear 2> /dev/null
exit

--
Russ Allbery (r...@stanford.edu) <http://www.eyrie.org/~eagle/>

Isaac

ungelesen,
06.03.2002, 17:47:5006.03.02
an
On 6 Mar 2002 13:28:23 -0800, Michael DuPont <mdupo...@yahoo.com> wrote:
>The concern of the GCC group is that the dumps of the gcc can be used
>to create closed source front and back-ends to the gcc. Do you think
>there is a way to exclude such a usage of the source code of the GPLed
>program?
>How can you differenciate between normal usage and abuse?

I'm not sure I understand the question. The problem might be that
you haven't divulged enough details about the gcc based tool to
help me focus my thinking. As best as I do understand the concern,
I just am not very sympathetic if what is really happening is just
a way to frustrate re-engineering.

Would the output of the tool be more helpful in constructing
a closed source front or back end than would be the readily available
source code? If so, is the information the same as would be gotten
simply by studying the source or examining a gcc running in action
via a debugger albeit with more difficulty? If the answer to either
of those questions is yes, then I think the GCC group's concern is
misguided even if copyright law does support their position.

Isaac

Isaac

ungelesen,
06.03.2002, 21:49:4406.03.02
an
On Wed, 06 Mar 2002 19:35:19 GMT, Barry Margolin <bar...@genuity.net> wrote:
>In article <slrna8b6tt...@latveria.castledoom.org>,
>Isaac <is...@latveria.castledoom.org> wrote:
>>I'm not convinced that copyrightable elements of the compiler have
>>been captured in the output file. After all, to some extent, normal
>>compiler output is strongly related to the compiler's source code.
>
>I think compiler output is usually considered to be derived from the
>compiler itself, since a large part of the code generator is code templates
>that are copied into the output file.
>
>The GCC copyright notice has an explicit exemption stating that code
>generated by it is not required to be GPLed. The need for this exemption
>is the above assumption.

I'm not prepared to argue against your conclusion, but isn't it possible
that the notice is intended to clarify the issue rather than to
disclaim an actual encumbrance? I wasn't able to find the gcc specific
gpl license without downloading the source for gcc, so I guess I'm
asking you to help me with my homework.

It's certainly important to most compiler vendors that the user be
free to use compiler output without encumbrances. Those vendors
often feel differently about their library code linked into the
user's executables, but I don't see vendors claiming that they
have rights in the object modules generated by their compilers.

Isaac

Michael DuPont

ungelesen,
07.03.2002, 02:52:5207.03.02
an
Issac,
We are getting closer to the truth.

There are at least 4-5 other projects doing similar things for various
purposes.
The GCC_XML for example does not even output the function bodies, just
the headers and public interfaces, and just of the input code, not of
the gcc structures used. That can hardly be seen as a copyright
violation of gcc.

> I'm not sure I understand the question. The problem might be that

> you haven't divulged enough details about the gcc based tool to

> help me focus my thinking.

The input data that is needed to generate code is stored in the tree
representation after the reading in of the code by the parser.

This tree representation has possible usages that we should be looking
at :

1. Can be used to create wrappers around functions.
This is like a head file and how the GCC_XML/CABLE program is working.
What are the parameters, field names and types. This is almost
harmless.

2. Can be used to translate the source code into another language
(like machine language)
This is what the GCC people are afraid of, closed source machine code
generators.

3. It can be transformed into a new structure that has more
functionality.
This is what I am looking into, creating programs that can add in more
functions by looking at thier own tree representation.
That is also where round trip reverse engineering CASE tools like
rational rose or togeather++ fit in.
My work over seven years ago for a small german company (Innovative
Software)that created such a tool (OEW) got me on the idea of using
GCC for parsing insead of writing our own. Of course we did not do
that, but the idea was interesting at the time.
There is a standard called XMI from the OMG that specifies the
information that Case tool can exchange with each other. If the
introspector outputed the existing programs in that format, would that
be such a violation?

4. The tree can be created by a third-party-program if the tree
structure is well documented, and fed into the compiler to generate
output.
This usage would replace the parser with a third party parser and use
gcc for targetting many machines backends.

>As best as I do understand the concern,

> I just am not very sympathetic if what is really happening is just

> a way to frustrate re-engineering.

Problem is that the usage that I am interested in is too close to the
unwanted usages.

>

> Would the output of the tool be more helpful in constructing

> a closed source front or back end than would be the readily available

> source code?
Yes, because it will be documented better and the possible values
better described.

>If so, is the information the same as would be gotten

> simply by studying the source or examining a gcc running in action

> via a debugger albeit with more difficulty?

Yes, The project is the result of exactly that study, and the creation
of the introspector was seen as needed to help cope with the mass of
data that was processed. I created a database of the internal data
structures because they can used in so many different ways, the
debugger cannot display them correctly.

>If the answer to either

> of those questions is yes, then I think the GCC group's concern is

> misguided even if copyright law does support their position.

That is the feeling that some people are starting to share.

Mike

Barry Margolin

ungelesen,
07.03.2002, 11:33:3207.03.02
an
In article <slrna8dla8...@latveria.castledoom.org>,

Isaac <is...@latveria.castledoom.org> wrote:
>On Wed, 06 Mar 2002 19:35:19 GMT, Barry Margolin <bar...@genuity.net> wrote:
>>In article <slrna8b6tt...@latveria.castledoom.org>,
>>Isaac <is...@latveria.castledoom.org> wrote:
>>>I'm not convinced that copyrightable elements of the compiler have
>>>been captured in the output file. After all, to some extent, normal
>>>compiler output is strongly related to the compiler's source code.
>>
>>I think compiler output is usually considered to be derived from the
>>compiler itself, since a large part of the code generator is code templates
>>that are copied into the output file.
>>
>>The GCC copyright notice has an explicit exemption stating that code
>>generated by it is not required to be GPLed. The need for this exemption
>>is the above assumption.
>
>I'm not prepared to argue against your conclusion, but isn't it possible
>that the notice is intended to clarify the issue rather than to
>disclaim an actual encumbrance? I wasn't able to find the gcc specific
>gpl license without downloading the source for gcc, so I guess I'm
>asking you to help me with my homework.

I don't have a copy of it handy, either.

But now that I think about it some more, I think it might be flex and bison
that have this "clarification", not GCC. A huge portion of the output of
these is the FSM that's part of the translator; the user's source code is
translated into the state table and action routines that are added to this.

Isaac

ungelesen,
07.03.2002, 13:16:1407.03.02
an
On Thu, 07 Mar 2002 16:33:32 GMT, Barry Margolin <bar...@genuity.net> wrote:
>In article <slrna8dla8...@latveria.castledoom.org>,
>Isaac <is...@latveria.castledoom.org> wrote:

>>I'm not prepared to argue against your conclusion, but isn't it possible
>>that the notice is intended to clarify the issue rather than to
>>disclaim an actual encumbrance? I wasn't able to find the gcc specific
>>gpl license without downloading the source for gcc, so I guess I'm
>>asking you to help me with my homework.
>
>I don't have a copy of it handy, either.
>
>But now that I think about it some more, I think it might be flex and bison
>that have this "clarification", not GCC. A huge portion of the output of

Bison definitely has it. Flex isn't gpled but i seem to recall a
fairly thorough disclaimer of any interest in flex output.

Doesn't prove you aren't right about compiler output though. I'll do
some homework.

Isaac

0 neue Nachrichten