public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* How to stop GCC from searching for components in --prefix on Windows host?
@ 2004-09-22 16:59 E. Weddington
  2004-09-22 17:48 ` Dave Korn
  2004-09-22 20:46 ` Geoffrey Keating
  0 siblings, 2 replies; 12+ messages in thread
From: E. Weddington @ 2004-09-22 16:59 UTC (permalink / raw)
  To: gcc

Hello!

I regularly build GCC for the AVR target on a Windows host 
(--host=mingw32) usually with some configured --prefix=X. The binary 
toolset is redistributed to other users who typically don't install it 
in X. There have been some problems where X on the build machine is on a 
particular drive, and on the install machine X is on a drive with 
removable media, then GCC sometimes craps out and doesn't properly 
locate all the components. Is there some way to get GCC to *not* search 
for components in the configured prefix, but preserve its other search 
rules?

In looking through the manual, I found the GCC_EXEC_PREFIX environment 
variable. Though some users have reported that using this doesn't 
completely solve the problem (and personally I'm not totally convinced 
that it doesn't solve the problem). Is it correct that using 
GCC_EXEC_PREFIX will cause GCC to look there first and then continue 
with the rest of the search (--prefix, PATH, etc.)?

Is there something in the manuals that I'm overlooking?

If it requires patching the source, then could someone point out which 
source code module/functions to take a look at?


(Please CC me in your reply as it's difficult for me to reply to digest 
versions of the gcc list that I receive.)

Thanks for your time and help.
Eric

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

* RE: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 16:59 How to stop GCC from searching for components in --prefix on Windows host? E. Weddington
@ 2004-09-22 17:48 ` Dave Korn
  2004-09-22 17:56   ` E. Weddington
  2004-09-22 20:46 ` Geoffrey Keating
  1 sibling, 1 reply; 12+ messages in thread
From: Dave Korn @ 2004-09-22 17:48 UTC (permalink / raw)
  To: 'E. Weddington', 'gcc'

> -----Original Message-----
> From: gcc-owner On Behalf Of E. Weddington
> Sent: 22 September 2004 17:29

> Hello!
> 
> I regularly build GCC for the AVR target on a Windows host 
> (--host=mingw32) usually with some configured --prefix=X. The binary 
> toolset is redistributed to other users who typically don't 
> install it in X. 

  The error is with your users, not gcc!  Heh, well, it's fair enough to say
that it's a limitation of gcc that it gets hard-coded install paths built
into it.

> There have been some problems where X on the build machine is on a 
> particular drive, and on the install machine X is on a drive with 
> removable media, then GCC sometimes craps out and doesn't properly 
> locate all the components. Is there some way to get GCC to *not* search 
> for components in the configured prefix, but preserve its 
> other search rules?

  How about supplying a dummy path to the --prefix argument when you build
your releases, something that points to C:\ or whatever, something that's
pretty much guaranteed to be there on every system you need to support but
also pretty much guaranteed not to contain any executables that would get in
the way?

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 17:48 ` Dave Korn
@ 2004-09-22 17:56   ` E. Weddington
  2004-09-22 18:34     ` Ian Lance Taylor
  0 siblings, 1 reply; 12+ messages in thread
From: E. Weddington @ 2004-09-22 17:56 UTC (permalink / raw)
  To: Dave Korn; +Cc: 'gcc'

Dave Korn wrote:

>  The error is with your users, not gcc!  Heh, well, it's fair enough to say
>that it's a limitation of gcc that it gets hard-coded install paths built
>into it.
>
>  
>
Exactly. Having hard-coded install paths works fine for *nix systems, 
but, ...well everybody knows the general consensus for MS's stuff....

>>There have been some problems where X on the build machine is on a 
>>particular drive, and on the install machine X is on a drive with 
>>removable media, then GCC sometimes craps out and doesn't properly 
>>locate all the components. Is there some way to get GCC to *not* search 
>>for components in the configured prefix, but preserve its 
>>other search rules?
>>    
>>
>
>  How about supplying a dummy path to the --prefix argument when you build
>your releases, something that points to C:\ or whatever, something that's
>pretty much guaranteed to be there on every system you need to support but
>also pretty much guaranteed not to contain any executables that would get in
>the way?
>  
>

I wish I could guarantee that every system is going to have a C:\. In 
practice, most will, but sure as I say it, somebody's going to have a 
system that won't have it.

I'm certainly not afraid to patch this distribution to take out the 
search in --prefix for components as the current searching of PATH (or 
whatever it does after searching --prefix) works just fine. My questions 
would be: is this a sane thing to do (considering the problem)? Where 
would one do this in the code? Is it relatively localized? and... would 
this situation be considered a bug? should I fill out a bug report?

Thanks
Eric

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 17:56   ` E. Weddington
@ 2004-09-22 18:34     ` Ian Lance Taylor
  2004-09-22 18:37       ` E. Weddington
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Lance Taylor @ 2004-09-22 18:34 UTC (permalink / raw)
  To: E. Weddington; +Cc: 'gcc'

"E. Weddington" <ericw@evcohs.com> writes:

> I'm certainly not afraid to patch this distribution to take out the
> search in --prefix for components as the current searching of PATH (or
> whatever it does after searching --prefix) works just fine. My
> questions would be: is this a sane thing to do (considering the
> problem)? Where would one do this in the code? Is it relatively
> localized? and... would this situation be considered a bug? should I
> fill out a bug report?

That is a sane thing to do if there is no path which you are certain
exists (how about "/"?).  The code is in gcc/gcc.c; look for calls to
add_prefix().  It is relatively localized.  I don't personally
consider this situation to be a bug.

Ian

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 18:34     ` Ian Lance Taylor
@ 2004-09-22 18:37       ` E. Weddington
  2004-09-22 18:37         ` Ian Lance Taylor
  0 siblings, 1 reply; 12+ messages in thread
From: E. Weddington @ 2004-09-22 18:37 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: 'gcc'

Ian Lance Taylor wrote:

>"E. Weddington" <ericw@evcohs.com> writes:
>
>  
>
>>I'm certainly not afraid to patch this distribution to take out the
>>search in --prefix for components as the current searching of PATH (or
>>whatever it does after searching --prefix) works just fine. My
>>questions would be: is this a sane thing to do (considering the
>>problem)? Where would one do this in the code? Is it relatively
>>localized? and... would this situation be considered a bug? should I
>>fill out a bug report?
>>    
>>
>
>That is a sane thing to do if there is no path which you are certain
>exists (how about "/"?).  
>
That might be a way around it; I build in Cygwin (using --host=mingw32 
--build=mingw32) so installing it to that location after building won't 
be a problem.

>The code is in gcc/gcc.c; look for calls to
>add_prefix().  It is relatively localized.  
>
Thanks for the information.

>I don't personally
>consider this situation to be a bug.
>  
>
Would it be reasonable as an enhancement request, though?

Thanks
Eric

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 18:37       ` E. Weddington
@ 2004-09-22 18:37         ` Ian Lance Taylor
  2004-09-22 18:46           ` E. Weddington
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Lance Taylor @ 2004-09-22 18:37 UTC (permalink / raw)
  To: E. Weddington; +Cc: 'gcc'

"E. Weddington" <ericw@evcohs.com> writes:

> >I don't personally
> >consider this situation to be a bug.
> >
> Would it be reasonable as an enhancement request, though?

Sure, but, to be honest, it doesn't sound like something which anybody
who doesn't hvae the problem is particularly likely to pick up and
implement.  If you, or somebody else, submits it as a patch, I think
it might well get in.  I guess one way to do it would be to add a new
configure option, --disable-prefix or something like.

Ian

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 18:37         ` Ian Lance Taylor
@ 2004-09-22 18:46           ` E. Weddington
  0 siblings, 0 replies; 12+ messages in thread
From: E. Weddington @ 2004-09-22 18:46 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: 'gcc'

Ian Lance Taylor wrote:

>"E. Weddington" <ericw@evcohs.com> writes:
>
>  
>
>>>I don't personally
>>>consider this situation to be a bug.
>>>
>>>      
>>>
>>Would it be reasonable as an enhancement request, though?
>>    
>>
>
>Sure, but, to be honest, it doesn't sound like something which anybody
>who doesn't hvae the problem is particularly likely to pick up and
>implement.  If you, or somebody else, submits it as a patch, I think
>it might well get in.  I guess one way to do it would be to add a new
>configure option, --disable-prefix or something like.
>  
>

Sure, I understand mine is a corner case. I was thinking of adding the 
enhancement request to bugzilla more as to keep track of the issue. 
Thanks for the suggestion on where a solution might be implemented.

Eric

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 16:59 How to stop GCC from searching for components in --prefix on Windows host? E. Weddington
  2004-09-22 17:48 ` Dave Korn
@ 2004-09-22 20:46 ` Geoffrey Keating
  2004-09-22 21:56   ` Mark Mitchell
  1 sibling, 1 reply; 12+ messages in thread
From: Geoffrey Keating @ 2004-09-22 20:46 UTC (permalink / raw)
  To: E. Weddington; +Cc: gcc

"E. Weddington" <ericw@evcohs.com> writes:

> Hello!
> 
> I regularly build GCC for the AVR target on a Windows host
> (--host=mingw32) usually with some configured --prefix=X. The binary
> toolset is redistributed to other users who typically don't install it
> in X. There have been some problems where X on the build machine is on
> a particular drive, and on the install machine X is on a drive with
> removable media, then GCC sometimes craps out and doesn't properly
> locate all the components. Is there some way to get GCC to *not*
> search for components in the configured prefix, but preserve its other
> search rules?

GCC should already be looking in places based on its location first.
This is necessary for correct behaviour if you have one version of GCC
installed in $prefix and a different version with the same prefix
installed somewhere else.

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 20:46 ` Geoffrey Keating
@ 2004-09-22 21:56   ` Mark Mitchell
  2004-09-22 23:58     ` E. Weddington
  2004-09-23 12:14     ` Dave Korn
  0 siblings, 2 replies; 12+ messages in thread
From: Mark Mitchell @ 2004-09-22 21:56 UTC (permalink / raw)
  To: Geoffrey Keating; +Cc: E. Weddington, gcc

Geoffrey Keating wrote:

>"E. Weddington" <ericw@evcohs.com> writes:
>
>  
>
>>Hello!
>>
>>I regularly build GCC for the AVR target on a Windows host
>>(--host=mingw32) usually with some configured --prefix=X. The binary
>>toolset is redistributed to other users who typically don't install it
>>in X. There have been some problems where X on the build machine is on
>>a particular drive, and on the install machine X is on a drive with
>>removable media, then GCC sometimes craps out and doesn't properly
>>locate all the components. Is there some way to get GCC to *not*
>>search for components in the configured prefix, but preserve its other
>>search rules?
>>    
>>
>
>GCC should already be looking in places based on its location first.
>This is necessary for correct behaviour if you have one version of GCC
>installed in $prefix and a different version with the same prefix
>installed somewhere else.
>  
>
However, it will continue to search in its --prefix location, after its 
initial search.  (And, there are some things for which it searches for 
which it is normal not to find the thing in the installed location.)  
The really bad situation is when the prefix location exists, and 
contains the thing, but it is not the version you want.  In practice, we 
try to avoid this by using paths with "CodeSourcery" in them when 
building packages, but that's not 100% foolproof.

Therefore, I, too, think an option to have GCC not search $(prefix) -- 
relying purely on its own installed location -- would be a good thing.

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 21:56   ` Mark Mitchell
@ 2004-09-22 23:58     ` E. Weddington
  2004-09-23  1:29       ` Mark Mitchell
  2004-09-23 12:14     ` Dave Korn
  1 sibling, 1 reply; 12+ messages in thread
From: E. Weddington @ 2004-09-22 23:58 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: Geoffrey Keating, gcc

Mark Mitchell wrote:

> Geoffrey Keating wrote:
>
>> "E. Weddington" <ericw@evcohs.com> writes:
>>
>>  
>>
>>> Hello!
>>>
>>> I regularly build GCC for the AVR target on a Windows host
>>> (--host=mingw32) usually with some configured --prefix=X. The binary
>>> toolset is redistributed to other users who typically don't install it
>>> in X. There have been some problems where X on the build machine is on
>>> a particular drive, and on the install machine X is on a drive with
>>> removable media, then GCC sometimes craps out and doesn't properly
>>> locate all the components. Is there some way to get GCC to *not*
>>> search for components in the configured prefix, but preserve its other
>>> search rules?
>>>   
>>
>>
>> GCC should already be looking in places based on its location first.
>> This is necessary for correct behaviour if you have one version of GCC
>> installed in $prefix and a different version with the same prefix
>> installed somewhere else.
>>  
>>
> However, it will continue to search in its --prefix location, after 
> its initial search.  (And, there are some things for which it searches 
> for which it is normal not to find the thing in the installed 
> location.)  The really bad situation is when the prefix location 
> exists, and contains the thing, but it is not the version you want.  
> In practice, we try to avoid this by using paths with "CodeSourcery" 
> in them when building packages, but that's not 100% foolproof.
>
> Therefore, I, too, think an option to have GCC not search $(prefix) -- 
> relying purely on its own installed location -- would be a good thing.
>

Ok, based on this, it's now PR #17621 as an enhancement:
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17621>

BTW, would the IIRC recently taken out --enable-win32-registry=key 
configure flag helped in this situation? Or would it still be searching 
--prefix?

Eric

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

* Re: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 23:58     ` E. Weddington
@ 2004-09-23  1:29       ` Mark Mitchell
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Mitchell @ 2004-09-23  1:29 UTC (permalink / raw)
  To: E. Weddington; +Cc: Geoffrey Keating, gcc

E. Weddington wrote:

> Mark Mitchell wrote:
>
>> Geoffrey Keating wrote:
>>
>>> "E. Weddington" <ericw@evcohs.com> writes:
>>>
>>>  
>>>
>>>> Hello!
>>>>
>>>> I regularly build GCC for the AVR target on a Windows host
>>>> (--host=mingw32) usually with some configured --prefix=X. The binary
>>>> toolset is redistributed to other users who typically don't install it
>>>> in X. There have been some problems where X on the build machine is on
>>>> a particular drive, and on the install machine X is on a drive with
>>>> removable media, then GCC sometimes craps out and doesn't properly
>>>> locate all the components. Is there some way to get GCC to *not*
>>>> search for components in the configured prefix, but preserve its other
>>>> search rules?
>>>>   
>>>
>>>
>>>
>>> GCC should already be looking in places based on its location first.
>>> This is necessary for correct behaviour if you have one version of GCC
>>> installed in $prefix and a different version with the same prefix
>>> installed somewhere else.
>>>  
>>>
>> However, it will continue to search in its --prefix location, after 
>> its initial search.  (And, there are some things for which it 
>> searches for which it is normal not to find the thing in the 
>> installed location.)  The really bad situation is when the prefix 
>> location exists, and contains the thing, but it is not the version 
>> you want.  In practice, we try to avoid this by using paths with 
>> "CodeSourcery" in them when building packages, but that's not 100% 
>> foolproof.
>>
>> Therefore, I, too, think an option to have GCC not search $(prefix) 
>> -- relying purely on its own installed location -- would be a good 
>> thing.
>>
>
> Ok, based on this, it's now PR #17621 as an enhancement:
> <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17621>
>
> BTW, would the IIRC recently taken out --enable-win32-registry=key 
> configure flag helped in this situation? Or would it still be 
> searching --prefix? 

I do not think it would have helped.

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com

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

* RE: How to stop GCC from searching for components in --prefix on Windows host?
  2004-09-22 21:56   ` Mark Mitchell
  2004-09-22 23:58     ` E. Weddington
@ 2004-09-23 12:14     ` Dave Korn
  1 sibling, 0 replies; 12+ messages in thread
From: Dave Korn @ 2004-09-23 12:14 UTC (permalink / raw)
  To: 'Mark Mitchell', 'Geoffrey Keating'
  Cc: 'E. Weddington', gcc

> -----Original Message-----
> From: gcc-owner On Behalf Of Mark Mitchell
> Sent: 22 September 2004 21:49


> >"E. Weddington" writes:
> >>
> >>I regularly build GCC for the AVR target on a Windows host
> >>(--host=mingw32) usually with some configured --prefix=X. The binary
> >>toolset is redistributed to other users who typically don't 
> install it

> Therefore, I, too, think an option to have GCC not search 
> $(prefix) -- 
> relying purely on its own installed location -- would be a good thing.


  Ok, how about 

../gcc-src/configure --prefix=/dev/null  <remaining options here>

LOL.  Just don't expect too much from "make install" after you try it!

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

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

end of thread, other threads:[~2004-09-23 11:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 16:59 How to stop GCC from searching for components in --prefix on Windows host? E. Weddington
2004-09-22 17:48 ` Dave Korn
2004-09-22 17:56   ` E. Weddington
2004-09-22 18:34     ` Ian Lance Taylor
2004-09-22 18:37       ` E. Weddington
2004-09-22 18:37         ` Ian Lance Taylor
2004-09-22 18:46           ` E. Weddington
2004-09-22 20:46 ` Geoffrey Keating
2004-09-22 21:56   ` Mark Mitchell
2004-09-22 23:58     ` E. Weddington
2004-09-23  1:29       ` Mark Mitchell
2004-09-23 12:14     ` Dave Korn

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