public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Several snapshots on the same system?
@ 2002-02-08  6:29 Tom Womack
  2002-02-09 18:24 ` Alexandre Oliva
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Womack @ 2002-02-08  6:29 UTC (permalink / raw)
  To: gcc; +Cc: Mike Stump

> > > Reading install.texi, I expected to be able to have several
> > > different snapshots of gcc-3.1 installed in /usr/local on the same
> > > system simultaneously, by changing --program-suffix when I configure
> > > each snapshot.
> >
> > --prefix works, I recommend it's use.  If you want, you can clarify
> > the manual to dissuade users from building gcc multiple times with the
> > same --prefix value, if they want to use both compilers.

[a complaint that I tried this and it didn't work]

Sorry. I'd claimed that I'd typed
"../gcc-SNAPSHOT/configure --prefix=/home/twomack/gcc-3.1/gcc-SNAPSHOT-obj -
-program-suffix=-3.1-SNAPSHOT", but in fact I'd said
"--prefix=~/gcc-3.1/..."

This seems to have caused significant trouble -- I found several directories
called "~" in the gcc-build directory, which were rather worrying to delete
(rm -f "~" is not a nerve-calming command).

This is repeatable -- I checked overnight by doing two builds from different
directories differing only in my specification of --prefix. My shell is
bash-2.05 as shipped by SuSE 7.3, if that matters. Reported as PR 5634.

Would it be worth putting a patch in gcc/doc/install.texi around line 362
suggesting that using tilde-style prefixes can cause trouble?

> And the installed snapshots both entirely fail to work, giving screeds of
> errors when parsing the standard include files.

This was a matter of the 'make install' process having failed when trying to
install libiberty and given up before the installation was complete.

Sorry to have worried people with paranoid mentions of parallel-build
problems.

--
Tom

... and how to convince your housemates that rebooting your computer to play
_Midtown Madness 2_, without syncing the discs first, in the middle of a
three-hour 'make bootstrap' run, is to be discouraged.

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

* Re: Several snapshots on the same system?
  2002-02-08  6:29 Several snapshots on the same system? Tom Womack
@ 2002-02-09 18:24 ` Alexandre Oliva
  2002-02-10  3:21   ` Phil Edwards
  0 siblings, 1 reply; 10+ messages in thread
From: Alexandre Oliva @ 2002-02-09 18:24 UTC (permalink / raw)
  To: Tom Womack; +Cc: gcc, Mike Stump

On Feb  8, 2002, "Tom Womack" <tom@womack.net> wrote:

> Sorry. I'd claimed that I'd typed
> "../gcc-SNAPSHOT/configure --prefix=/home/twomack/gcc-3.1/gcc-SNAPSHOT-obj -
> -program-suffix=-3.1-SNAPSHOT", but in fact I'd said
> "--prefix=~/gcc-3.1/..."

> This seems to have caused significant trouble -- I found several directories
> called "~" in the gcc-build directory, which were rather worrying to delete
> (rm -f "~" is not a nerve-calming command).

> Would it be worth putting a patch in gcc/doc/install.texi around line 362
> suggesting that using tilde-style prefixes can cause trouble?

I'm not sure the GCC docs are the proper place to teach about all
sorts of caveats of Unix shells.  The original Bourne shell does not
even handle ~ especially, and other shells such as ksh and bash only
handle ~ especially when it appears unquoted in the beginning of a
command-line argument.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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

* Re: Several snapshots on the same system?
  2002-02-09 18:24 ` Alexandre Oliva
@ 2002-02-10  3:21   ` Phil Edwards
  2002-02-10  8:19     ` Andreas Schwab
  0 siblings, 1 reply; 10+ messages in thread
From: Phil Edwards @ 2002-02-10  3:21 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Tom Womack, gcc, Mike Stump

On Sun, Feb 10, 2002 at 12:21:49AM -0200, Alexandre Oliva wrote:
> I'm not sure the GCC docs are the proper place to teach about all
> sorts of caveats of Unix shells.  The original Bourne shell does not
> even handle ~ especially, and other shells such as ksh and bash only
> handle ~ especially when it appears unquoted in the beginning of a
> command-line argument.

Recent versions of bash (I don't know what the minimum version number is)
only require the tilde to appear at the beginning of something that could
be a path, e.g.,

    --prefix=/this/is/a/~weird/patch

the tilde will not be expanded, but in

    --prefix=~/install

it will be.  Likwise for things like

    PATH=/usr/bin:/usr/local/bin:~/bin:/opt/bin

the tilde will be expanded here.  I was quite surprised when I first
discovered this; even tab completion will still work when typing such
constructs.

Users should definitely be writing $HOME other than ~ when specifying
--prefix arguments, however.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams

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

* Re: Several snapshots on the same system?
  2002-02-10  3:21   ` Phil Edwards
@ 2002-02-10  8:19     ` Andreas Schwab
  2002-02-11 11:33       ` Phil Edwards
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2002-02-10  8:19 UTC (permalink / raw)
  To: Phil Edwards; +Cc: Alexandre Oliva, Tom Womack, gcc, Mike Stump

Phil Edwards <phil@jaj.com> writes:

|> On Sun, Feb 10, 2002 at 12:21:49AM -0200, Alexandre Oliva wrote:
|> > I'm not sure the GCC docs are the proper place to teach about all
|> > sorts of caveats of Unix shells.  The original Bourne shell does not
|> > even handle ~ especially, and other shells such as ksh and bash only
|> > handle ~ especially when it appears unquoted in the beginning of a
|> > command-line argument.
|> 
|> Recent versions of bash (I don't know what the minimum version number is)
|> only require the tilde to appear at the beginning of something that could
|> be a path, e.g.,
|> 
|>     --prefix=/this/is/a/~weird/patch
|> 
|> the tilde will not be expanded, but in
|> 
|>     --prefix=~/install
|> 
|> it will be.

No, it won't.  The expansion only occurs as part of an assignment.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Several snapshots on the same system?
  2002-02-10  8:19     ` Andreas Schwab
@ 2002-02-11 11:33       ` Phil Edwards
  2002-02-12  8:54         ` Tom Womack
  0 siblings, 1 reply; 10+ messages in thread
From: Phil Edwards @ 2002-02-11 11:33 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Alexandre Oliva, Tom Womack, gcc, Mike Stump

On Sun, Feb 10, 2002 at 05:09:56PM +0100, Andreas Schwab wrote:
> Phil Edwards <phil@jaj.com> writes:
> |> the tilde will not be expanded, but in
> |> 
> |>     --prefix=~/install
> |> 
> |> it will be.
> 
> No, it won't.  The expansion only occurs as part of an assignment.

I do it all the time when I know that I /don't/ need to be portable...


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams

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

* Re: Several snapshots on the same system?
  2002-02-11 11:33       ` Phil Edwards
@ 2002-02-12  8:54         ` Tom Womack
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Womack @ 2002-02-12  8:54 UTC (permalink / raw)
  To: Phil Edwards; +Cc: gcc

> On Sun, Feb 10, 2002 at 05:09:56PM +0100, Andreas Schwab wrote:
> > Phil Edwards <phil@jaj.com> writes:
> > |> the tilde will not be expanded, but in
> > |>
> > |>     --prefix=~/install
> > |>
> > |> it will be.
> >
> > No, it won't.  The expansion only occurs as part of an assignment.
>
> I do it all the time when I know that I /don't/ need to be portable...

Depends on bash version: my friend with bash-1 thought I was talking
nonsense because "of course, echo --prefix=~/install works", whilst bash-2,
tcsh-6.09 and zsh-3.1.6 all fail to expand the ~.

I agree this is a knowledge-of-shell rather than knowledge-of-gcc issue; I'd
still put a line or two in the documentation about it because
knowledge-of-shell isn't really a prerequisite for playing with compilers
(though obviously I stay _well_ away from the makefile), and I expect I'm
not the only person who's wasted three hours because of it.

Tom, building 20020211 tonight

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

* Re: Several snapshots on the same system?
  2002-02-06 12:13 mike stump
@ 2002-02-07  6:24 ` Tom Womack
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Womack @ 2002-02-07  6:24 UTC (permalink / raw)
  To: mike stump; +Cc: gcc

> > Reading install.texi, I expected to be able to have several
> > different snapshots of gcc-3.1 installed in /usr/local on the same
> > system simultaneously, by changing --program-suffix when I configure
> > each snapshot.
>
> --prefix works, I recommend it's use.  If you want, you can clarify
> the manual to dissuade users from building gcc multiple times with the
> same --prefix value, if they want to use both compilers.

I tried last night to rebuild my snapshots: made directories
gcc-20011231-build and gcc-20020204-build, cd into them,

../gcc-SNAPSHOT/configure --prefix=/home/twomack/gcc-3.1/gcc-SNAPSHOT-obj --
program-suffix=-3.1-SNAPSHOT

and then "make bootstrap &" in each build directory, so I'm building the two
snapshots simultaneously.

At this point I went to bed; got up in the morning, su, make install &;
again, installing the two snapshots simultaneously in different places.

Add /home/twomack/gcc-3.1/gcc-SNAPSHOT-obj/bin to my $PATH.

And the installed snapshots both entirely fail to work, giving screeds of
errors when parsing the standard include files.

I didn't have time to complete a build before I went to work: have I made a
stupid mistake in the configure commands, or broken the build process by
trying two bootstraps in parallel, or what?

Tom

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

* Re: Several snapshots on the same system?
@ 2002-02-06 12:13 mike stump
  2002-02-07  6:24 ` Tom Womack
  0 siblings, 1 reply; 10+ messages in thread
From: mike stump @ 2002-02-06 12:13 UTC (permalink / raw)
  To: gcc, tom

> From: "Tom Womack" <tom@womack.net>
> To: <gcc@gcc.gnu.org>
> Date: Wed, 6 Feb 2002 00:24:43 -0000

> Reading install.texi, I expected to be able to have several
> different snapshots of gcc-3.1 installed in /usr/local on the same
> system simultaneously, by changing --program-suffix when I configure
> each snapshot.

--prefix works, I recommend it's use.  If you want, you can clarify
the manual to dissuade users from building gcc multiple times with the
same --prefix value, if they want to use both compilers.

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

* Re: Several snapshots on the same system?
  2002-02-06  1:55 Tom Womack
@ 2002-02-06  3:16 ` Andreas Jaeger
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Jaeger @ 2002-02-06  3:16 UTC (permalink / raw)
  To: Tom Womack; +Cc: gcc

"Tom Womack" <tom@womack.net> writes:

> Reading install.texi, I expected to be able to have several different
> snapshots of gcc-3.1 installed in /usr/local on the same system
> simultaneously, by changing --program-suffix when I configure each snapshot.

Several different versions can be used this way, but all GCC 3.1
snapshots are the same version and will use the same lib dir.

I advise to use separate directories using the --prefix argument.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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

* Several snapshots on the same system?
@ 2002-02-06  1:55 Tom Womack
  2002-02-06  3:16 ` Andreas Jaeger
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Womack @ 2002-02-06  1:55 UTC (permalink / raw)
  To: gcc

Reading install.texi, I expected to be able to have several different
snapshots of gcc-3.1 installed in /usr/local on the same system
simultaneously, by changing --program-suffix when I configure each snapshot.

This doesn't work (which is annoying, since gcc-3.1-20020204 miscompiles the
MRI program I've mentioned, and I was hoping to be able to revert without
the 90 minutes it takes to recompile the old snapshot). Is there any way it
could be made to work, say by appending program-suffix to the name of the
i686-pc-linux-gnu directory in /usr/local/lib/gcc-lib?

Tom


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-08  6:29 Several snapshots on the same system? Tom Womack
2002-02-09 18:24 ` Alexandre Oliva
2002-02-10  3:21   ` Phil Edwards
2002-02-10  8:19     ` Andreas Schwab
2002-02-11 11:33       ` Phil Edwards
2002-02-12  8:54         ` Tom Womack
  -- strict thread matches above, loose matches on Subject: below --
2002-02-06 12:13 mike stump
2002-02-07  6:24 ` Tom Womack
2002-02-06  1:55 Tom Womack
2002-02-06  3:16 ` Andreas Jaeger

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).