public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* -I/usr/include (was: fixinc...)
@ 2001-06-18  8:48 Bruce Korb
  2001-06-18 11:35 ` Russ Allbery
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Korb @ 2001-06-18  8:48 UTC (permalink / raw)
  To: gcc, Daniel Elstner, Russ Allbery

Russ wrote:
> It's *never* been correct to add -I/usr/include.  I'm amazed
> that there are still packages making this mistake; like I said,
> I've hardly ever run into a package with this problem.

That seems a little strong.  If you ever run into a package
that uses:

   `guile-config compile`

on the command line, you will run into it.  It turns out that
package developers do not have complete control over their
command line options.  :-}  OTOH, I don't think it GCC's place
to correct Guile's problem.  But it is another data point.

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

* Re: -I/usr/include (was: fixinc...)
  2001-06-18  8:48 -I/usr/include (was: fixinc...) Bruce Korb
@ 2001-06-18 11:35 ` Russ Allbery
  2001-06-19 17:38   ` Zack Weinberg
  0 siblings, 1 reply; 7+ messages in thread
From: Russ Allbery @ 2001-06-18 11:35 UTC (permalink / raw)
  To: gcc

Bruce Korb <bkorb@veritas.com> writes:
> Russ wrote:

>> It's *never* been correct to add -I/usr/include.  I'm amazed that there
>> are still packages making this mistake; like I said, I've hardly ever
>> run into a package with this problem.

> That seems a little strong.

I really don't think it is.

> If you ever run into a package that uses:

>    `guile-config compile`

> on the command line, you will run into it.

No, actually, I wouldn't.  This works fine for me, because my Guile
package is installed in a /usr/local equivalent.

Of course, if you're installing something as part of the operating system,
something that only an operating system packager needs to do, then you
have to adjust expectations in the package aimed at being installed in a
/usr/local equivalent.  That's just part of the work one has to do when
packaging software as part of a distribution rather than as an add-on
package like it was designed.

I see that Debian gets this wrong too, but that's definitely a bug in
Debian's Guile package, not in Guile.  It may be a missing feature in
Guile, but most of those packages were just never written with
installation as part of the operating system in mind.

> It turns out that package developers do not have complete control over
> their command line options.  :-}

It's easy enough to filter out /usr/include the way that gtk-config does;
that's probably the most robust solution.

Anyway, I don't think this is a gcc problem.  gcc has not allowed
-I/usr/include for as long as I've been working with gcc; the breakage is
just becoming more and more obvious with time as fixincludes has to do
more and more.

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

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

* Re: -I/usr/include (was: fixinc...)
  2001-06-18 11:35 ` Russ Allbery
@ 2001-06-19 17:38   ` Zack Weinberg
  2001-06-20  4:10     ` Vladimir A Merzliakov
  0 siblings, 1 reply; 7+ messages in thread
From: Zack Weinberg @ 2001-06-19 17:38 UTC (permalink / raw)
  To: gcc

On Mon, Jun 18, 2001 at 11:35:06AM -0700, Russ Allbery wrote:
> 
> Anyway, I don't think this is a gcc problem.  gcc has not allowed
> -I/usr/include for as long as I've been working with gcc; the breakage is
> just becoming more and more obvious with time as fixincludes has to do
> more and more.

It would be easy to cause cpplib to ignore -I/usr/include (actually,
-I <STANDARD_INCLUDE_DIR> and maybe also -I <SYSTEM_INCLUDE_DIR> --
see cppdefault.c).

I hesitate to do that, though.  It is not in keeping with the
principle that the compiler should not second-guess the user.  There
may be an exotic but legitimate use for -I/usr/include.

zw

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

* Re: -I/usr/include (was: fixinc...)
  2001-06-19 17:38   ` Zack Weinberg
@ 2001-06-20  4:10     ` Vladimir A Merzliakov
  0 siblings, 0 replies; 7+ messages in thread
From: Vladimir A Merzliakov @ 2001-06-20  4:10 UTC (permalink / raw)
  To: gcc

> On Mon, Jun 18, 2001 at 11:35:06AM -0700, Russ Allbery wrote:
> It would be easy to cause cpplib to ignore -I/usr/include (actually,
> -I <STANDARD_INCLUDE_DIR> and maybe also -I <SYSTEM_INCLUDE_DIR> --
> see cppdefault.c).
> 
> I hesitate to do that, though.  It is not in keeping with the
> principle that the compiler should not second-guess the user.  There
> may be an exotic but legitimate use for -I/usr/include.
> 
> zw
> 
May be GCC can generate warrning at finding -I<STANDARD_INCLUDE_DIR> 
and -I<SYSTEM_INCLUDE_DIR>?

Vladimir



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

* Re: -I/usr/include (was: fixinc...)
  2001-06-21  1:39 ` Nathan Sidwell
@ 2001-06-22 11:34   ` Zack Weinberg
  0 siblings, 0 replies; 7+ messages in thread
From: Zack Weinberg @ 2001-06-22 11:34 UTC (permalink / raw)
  To: Nathan Sidwell; +Cc: Daniel Elstner, gcc, wanderer

On Thu, Jun 21, 2001 at 09:38:50AM +0100, Nathan Sidwell wrote:
> 
> Zack -- you approved the warning itself, but it kills -frepo.

Expand, please?  I know nothing about -frepo.

-- 
zw  I was saving quarters, but now I'm going home tomorrow, so I guess I have
    more money than I have.
    	-- Nathaniel Smith

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

* Re: -I/usr/include (was: fixinc...)
  2001-06-20 11:50 Daniel Elstner
@ 2001-06-21  1:39 ` Nathan Sidwell
  2001-06-22 11:34   ` Zack Weinberg
  0 siblings, 1 reply; 7+ messages in thread
From: Nathan Sidwell @ 2001-06-21  1:39 UTC (permalink / raw)
  To: Daniel Elstner, Zack Weinberg; +Cc: gcc, wanderer

Daniel Elstner wrote:
> 
> Hi,
> 
> > May be GCC can generate warrning at finding -I<STANDARD_INCLUDE_DIR>
> > and -I<SYSTEM_INCLUDE_DIR>?
> 
> Looks like a good idea.
> A warning on every invocation of gcc is hard to ignore ;)
I have code for such a warning, but it's not gone in yet as it pointed
out two failings in gcc's build itself, which have not yet been approved.
Now that gcc 3.0 is out of the way, I'll repost -- but not until next week.

Zack -- you approved the warning itself, but it kills -frepo.

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

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

* Re: -I/usr/include (was: fixinc...)
@ 2001-06-20 11:50 Daniel Elstner
  2001-06-21  1:39 ` Nathan Sidwell
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Elstner @ 2001-06-20 11:50 UTC (permalink / raw)
  To: gcc; +Cc: wanderer

Hi,

> May be GCC can generate warrning at finding -I<STANDARD_INCLUDE_DIR>
> and -I<SYSTEM_INCLUDE_DIR>?

Looks like a good idea.
A warning on every invocation of gcc is hard to ignore ;)

Bye,
--Daniel

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

end of thread, other threads:[~2001-06-22 11:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-18  8:48 -I/usr/include (was: fixinc...) Bruce Korb
2001-06-18 11:35 ` Russ Allbery
2001-06-19 17:38   ` Zack Weinberg
2001-06-20  4:10     ` Vladimir A Merzliakov
2001-06-20 11:50 Daniel Elstner
2001-06-21  1:39 ` Nathan Sidwell
2001-06-22 11:34   ` Zack Weinberg

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