public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Installation proposal
@ 2002-02-27 10:11 Mark Mitchell
  2002-02-27 10:25 ` H . J . Lu
                   ` (12 more replies)
  0 siblings, 13 replies; 51+ messages in thread
From: Mark Mitchell @ 2002-02-27 10:11 UTC (permalink / raw)
  To: gcc

Read this unless you are willing to let me change the build process around
somewhat dramatically without knowing what I'm going to do.

I got to thinking about the idea that I brought up yesterday regarding
installation.

In particular, here's what I had in mind:

1. Create a subdirectory of the objdir called "install".

2. Treat install as if it were the final prefix during building --
   put everything in there.  That means that there will be directories
   like "install/bin", "install/lib", and so forth.  So, "make" would
   just drop everything in these directories.

3. At install time, run a single script which copies everything in
   install into prefix.

What's good about this?

1. The testing we do is much more like the testing the user will do.

   In particular, to test, say, g++, we would just run
   "install/bin/g++", not "g++ -B... -nostdinc++ -I..."

2. The testsuites could forget about multilibs.  They will now just
   work the way they do when users actually use the compiler.  (Right
   now, the testsuites have to futz around with the -I paths and -L
   paths to find everything correctly.  Thus this logic is duplicated
   between the compiler and the testsuite.)

3. We would test that our installations are really location-independent,
   which they supposedly are.  (They certainly should be; other vendors
   have done this with their compilers for a decade, and its very
   handy.)

4. It's much easier to ensure consistent permissions and such in the
   final installation if there's only one place where installations
   are happening.  You can make sure that everything has the same
   ownership, same modes, etc.  It's also easy to use something
   faster than install-sh when you have it because there's only one
   place you need to do it.

Now, I thought that this would be a horrific pain because I'd have to
change all the make rules everywhere to drop their outputs in the
"install" directory.

But, I realized that we can put that off, even though it would be good
to do at some point.

We can just have the top-level configure set the prefix for all of the
child configures to "install".  Then, have the top-level "make" and
"make bootstrap" do what they do now, plus "make install" in all of
the children.  Then, have the top-level "make install" do the copying
step.  Sounds like one day's work to get it working, and another one
to debug the fallout.

I would like to implement this and check it in for GCC 3.2.

I can't believe there won't be debate.  Still, if nobody objects in a
few days, this is what I'll do.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com

^ permalink raw reply	[flat|nested] 51+ messages in thread
* Re: Installation proposal
@ 2002-02-27 10:48 Mark Mitchell
  0 siblings, 0 replies; 51+ messages in thread
From: Mark Mitchell @ 2002-02-27 10:48 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

> 	Or, are you saying that you somehow want GCC to recognize the
> directory into which it was installed and access all files with relative
> paths so that $prefix no longer would be built into the compiler and only
> used for installation?

Yes -- but I think that it is a no-op.  IIRC, patches to make this work
already went in.

If not, consider my proposal to assume that this works.  If it does not,
I may try to implement it.

(The way that, in general, such schemes work is:

a) Use an environment variable.

b) OS-dependent magic to find the binary that is currently executing.

c) Search the PATH to find argv[0], if argv[0] is not absolute.

There are ways to fool this logic (various uses of links, and such), but
the environment variable gives you a fallback, and in practice such schemes
work very nicely.)

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

^ permalink raw reply	[flat|nested] 51+ messages in thread
* Re: Installation proposal
@ 2002-02-27 11:07 Benjamin Kosnik
  0 siblings, 0 replies; 51+ messages in thread
From: Benjamin Kosnik @ 2002-02-27 11:07 UTC (permalink / raw)
  To: gcc


I've long been a fan of any attempt to make the build procedure more
sane. Staging the libraries, includes, and binaries in an install
directory seems to make a great deal of sense.

Are you planning on posting the patches to implement this for comment
before they are checked in?

-benjamin

^ permalink raw reply	[flat|nested] 51+ messages in thread
* Re: Installation proposal
@ 2002-02-27 13:22 mike stump
  0 siblings, 0 replies; 51+ messages in thread
From: mike stump @ 2002-02-27 13:22 UTC (permalink / raw)
  To: guerby, mark; +Cc: gcc

> Date: Wed, 27 Feb 2002 20:03:05 +0100
> From: Laurent Guerby <guerby@acm.org>
> To: Mark Mitchell <mark@codesourcery.com>
> CC: gcc@gcc.gnu.org

> Testing anything but the installed compiler is a mistake,

I disagree.  When developing, being able to test early, and often and
with low latency is useful.  During normal development I only do a
make install once every few months.  After we have a system that
builds an incremental install tree directly, we can revisit this.

^ permalink raw reply	[flat|nested] 51+ messages in thread
* Re: Installation proposal
@ 2002-02-28 11:51 mike stump
  2002-02-28 12:56 ` Mark Mitchell
  2002-02-28 14:04 ` Alexandre Oliva
  0 siblings, 2 replies; 51+ messages in thread
From: mike stump @ 2002-02-28 11:51 UTC (permalink / raw)
  To: mark, per; +Cc: gcc

> Date: Thu, 28 Feb 2002 09:04:06 -0800
> From: Per Bothner <per@bothner.com>
> To: Mark Mitchell <mark@codesourcery.com>
> CC: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>

> My suggestion:

> (1) configure creates a 'build' sub-directory at the top-level,
> parallel to 'gcc', libstdc++', etc.  The Makefiles call this
> directory $build_prefix.

I like this approach.  One can do as small a job as they want, and it
will be self-consistent.  A multitude of people can work in parallel.
The semantics of make all and make install are clear and unchanged.
One can start this at any level and do as much or as little a job as
they care to.  The risk of this approach is lower, and the end result
I think it the same or superior.  Do the objections against the
original apply to this methodology?  Any new objections against this
methodology?

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2002-02-28 23:16 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-27 10:11 Installation proposal Mark Mitchell
2002-02-27 10:25 ` H . J . Lu
2002-02-27 10:26 ` David Edelsohn
2002-02-27 10:59   ` Jim Wilson
2002-02-27 13:05   ` Michael Meissner
2002-02-27 10:50 ` Paul Koning
2002-02-27 11:02 ` Stan Shebs
2002-02-27 11:04 ` Joseph S. Myers
2002-02-27 11:25   ` Mark Mitchell
2002-02-27 12:10     ` Joseph S. Myers
2002-02-27 11:05 ` Joel Sherrill
2002-02-27 11:53   ` Joseph S. Myers
2002-02-27 11:07 ` Tom Tromey
2002-02-27 11:26   ` Mark Mitchell
2002-02-27 14:55   ` Richard Henderson
2002-02-27 17:38     ` Alexandre Oliva
2002-02-27 17:45       ` Richard Henderson
2002-02-27 18:27         ` Alexandre Oliva
2002-02-28  0:04           ` Richard Henderson
2002-02-28  2:02       ` Joseph S. Myers
2002-02-28  2:25         ` Alexandre Oliva
2002-02-27 11:13 ` Laurent Guerby
2002-02-27 12:11   ` Zack Weinberg
2002-02-27 12:17   ` Jim Wilson
2002-02-27 14:43     ` Laurent Guerby
2002-02-27 12:52   ` Neil Booth
2002-02-27 11:18 ` Jim Wilson
2002-02-27 14:56   ` Daniel Jacobowitz
2002-02-27 17:18   ` Mark Mitchell
2002-02-27 17:20     ` Richard Henderson
2002-02-27 17:59       ` Mark Mitchell
     [not found]       ` <mailpost.1014859095.10690@news-sj1-1>
2002-02-27 18:16         ` cgd
2002-02-27 11:23 ` Per Bothner
2002-02-28  1:39   ` Akim Demaille
2002-02-27 14:56 ` Nathan Sidwell
2002-02-27 16:11 ` Loren James Rittle
2002-02-27 17:47 ` Alexandre Oliva
2002-02-27 18:00   ` Daniel Jacobowitz
2002-02-28 14:06     ` Alexandre Oliva
2002-02-27 18:33   ` Mark Mitchell
2002-02-28  9:18     ` Per Bothner
2002-02-28  9:42       ` Mark Mitchell
2002-02-28  1:13   ` Akim Demaille
2002-02-27 10:48 Mark Mitchell
2002-02-27 11:07 Benjamin Kosnik
2002-02-27 13:22 mike stump
2002-02-28 11:51 mike stump
2002-02-28 12:56 ` Mark Mitchell
2002-02-28 14:04 ` Alexandre Oliva
2002-02-28 14:28   ` Per Bothner
2002-02-28 16:32   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).