public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* order of switches
@ 1999-08-12 12:11 Igor Markov
  1999-08-12 13:11 ` Joe Buck
  1999-08-31 23:20 ` Igor Markov
  0 siblings, 2 replies; 28+ messages in thread
From: Igor Markov @ 1999-08-12 12:11 UTC (permalink / raw)
  To: gcc

  It appears that the order of switches that I give to g++
  is critical to how it works. It may silently ignore -I or -l
  if they aren't in the correct place. That seems weird and
  causes problems, e.g.,

[imarkov@localhost Ctainers1.8]$ make-gnu
g++ -g -DABKDEBUG -fPIC -fno-for-scope -Wall -pedantic -pipe -I
-I/home/userg/code/OUR/symlinks/ABKCommon -I. -c bitBoard.cxx
In file included from bitBoard.cxx:19:
bitBoard.h:27: abkassert.h: No such file or directory
bitBoard.h:28: abkio.h: No such file or directory
^C
make: *** wait: No child processes.  Stop.
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes.  Stop.

[imarkov@localhost Ctainers1.8]$ g++ -I/home/userg/code/OUR/symlinks/ABKCommon
-I. -c rbtree.cxx
[imarkov@localhost Ctainers1.8]$  

  I just grep'ed man g++ for "order" and it there were no matches.
 
  Any pointers/comments?

  thanks,
								Igor
-- 
  Igor Markov  office: (310) 206-0179   
  http://vlsicad.cs.ucla.edu/~imarkov

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

* Re: order of switches
  1999-08-12 12:11 order of switches Igor Markov
@ 1999-08-12 13:11 ` Joe Buck
  1999-08-12 13:23   ` Igor Markov
  1999-08-31 23:20   ` Joe Buck
  1999-08-31 23:20 ` Igor Markov
  1 sibling, 2 replies; 28+ messages in thread
From: Joe Buck @ 1999-08-12 13:11 UTC (permalink / raw)
  To: Igor Markov; +Cc: gcc

>   It appears that the order of switches that I give to g++
>   is critical to how it works. It may silently ignore -I or -l
>   if they aren't in the correct place. That seems weird and
>   causes problems, e.g.,

This is a beginner question.

gcc's behavior is the same as that of all Unix C compilers: the
order of the switches most definitely matters for include file
directories and libraries.  You are specifying the order in which
include directory paths and libraries are searched.  Libraries
are only searched for symbols that are undefined at a particular
point.  Similarly, for headers, the order of -I switches affects
handling of recursive includes.

>   I just grep'ed man g++ for "order" and it there were no matches.

The man pages are very minimal guides to the option flags.  The real
documentation of GCC is in the texinfo files.

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

* Re: order of switches
  1999-08-12 13:11 ` Joe Buck
@ 1999-08-12 13:23   ` Igor Markov
  1999-08-12 14:02     ` Mumit Khan
                       ` (4 more replies)
  1999-08-31 23:20   ` Joe Buck
  1 sibling, 5 replies; 28+ messages in thread
From: Igor Markov @ 1999-08-12 13:23 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

Joe Buck wrote:
> 
> >   It appears that the order of switches that I give to g++
> >   is critical to how it works. It may silently ignore -I or -l
> >   if they aren't in the correct place. That seems weird and
> >   causes problems, e.g.,
> 
> This is a beginner question.
> 
> gcc's behavior is the same as that of all Unix C compilers: 

   well... thank you very much, but I've been working with SunCC
   for 3+ years, am now porting to g++ and having problems
   (which is why the question arose)

> the order of the switches most definitely matters for include file
> directories and libraries. 

   yes, that relates to the order, but that *does* seem trivial
   (esp. that I am using the Makefiles which work with SunCC)   

   In one instance I had to move -l after the .o file 
   so that gcc does not silently ignore -l   

   In another instance I was bitten by both -Ixxx and -I being
   legal (I defined STL="" because g++ has a good STL inside)

   oh, well... it looks people like reading 50% of email and
   shoot a reply immediately. That's rarely useful.

> >   I just grep'ed man g++ for "order" and it there were no matches.
> 
> The man pages are very minimal guides to the option flags.  The real
> documentation of GCC is in the texinfo files.

    I get an impression of that this is some kind of conspiracy (gee !)
    .. not sure, but, perhaps, to cause people to buy support ?
    (yes, I understand one can look at this from difft angles ... but
     once I have my angle, it may be difficult to convince me otherwise)
	
								Igor
-- 
  Igor Markov  office: (310) 206-0179   
  http://vlsicad.cs.ucla.edu/~imarkov

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

* Re: order of switches
  1999-08-12 13:23   ` Igor Markov
@ 1999-08-12 14:02     ` Mumit Khan
  1999-08-31 23:20       ` Mumit Khan
  1999-08-12 14:08     ` Joe Buck
                       ` (3 subsequent siblings)
  4 siblings, 1 reply; 28+ messages in thread
From: Mumit Khan @ 1999-08-12 14:02 UTC (permalink / raw)
  To: gcc

Igor Markov <imarkov@cs.ucla.edu> writes:
> 
>    well... thank you very much, but I've been working with SunCC
>    for 3+ years, am now porting to g++ and having problems
>    (which is why the question arose)

Joe tries to help, and you come back with something that looks like
whining, but in fact I just don't understand what you are trying to
say.

GCC and SunCC are two different compilers, and even though both share
the standard "Unix-style" compiler switches, there can be and are subtle 
differences. And that's where the documentation comes in.

> > The man pages are very minimal guides to the option flags.  The real
> > documentation of GCC is in the texinfo files.
> 
>     I get an impression of that this is some kind of conspiracy (gee !)
>     .. not sure, but, perhaps, to cause people to buy support ?
>     (yes, I understand one can look at this from difft angles ... but
>      once I have my angle, it may be difficult to convince me otherwise)
> 	

GCC comes with documentation. You can choose to read it or not. 

If you choose to read the documentation and find it confusing and
lacking, there are many here who are willing to help (and you can
help fill the gaps in the documentation; in case you didn't know,
that's how free software works -- it's a two-way street). 

If you choose not to read it, don't come here whining. Please go away.

Regards,
Mumit

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

* Re: order of switches
  1999-08-12 13:23   ` Igor Markov
  1999-08-12 14:02     ` Mumit Khan
@ 1999-08-12 14:08     ` Joe Buck
  1999-08-12 14:26       ` Igor Markov
  1999-08-31 23:20       ` Joe Buck
  1999-08-12 14:27     ` Alexandre Oliva
                       ` (2 subsequent siblings)
  4 siblings, 2 replies; 28+ messages in thread
From: Joe Buck @ 1999-08-12 14:08 UTC (permalink / raw)
  To: Igor Markov; +Cc: gcc

Igor Markov writes:
>     I get an impression of that this is some kind of conspiracy (gee !)
>     .. not sure, but, perhaps, to cause people to buy support ?

Yes.  You've caught us.  We made -I and -l work just like Unix -I and
-l so you'd have to buy a support contract.

But the Cabal (there is no Cabal) has decided that you couldn't pay us
enough to make a support contract profitable, plus, any staff forced to
deal with you would leave.  So you've foiled our little plot.

(Seriously, I don't sell support).

>     (yes, I understand one can look at this from difft angles ... but
>      once I have my angle, it may be difficult to convince me otherwise)

I apologize to the list for encouraging Igor.  Unless there is a radical
change in his behavior and a profuse apology to everyone he has insulted,
I won't be answering further mail from him.

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

* Re: order of switches
  1999-08-12 14:08     ` Joe Buck
@ 1999-08-12 14:26       ` Igor Markov
  1999-08-12 22:13         ` Philipp Thomas
  1999-08-31 23:20         ` Igor Markov
  1999-08-31 23:20       ` Joe Buck
  1 sibling, 2 replies; 28+ messages in thread
From: Igor Markov @ 1999-08-12 14:26 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

  Joe,

   seriously ... not sure what you mean by a *radical change*.
   I am trying to do my work with g++ and report the problems
   that I am encountering. I did get some very good help from the
   list in most cases.
   
   OTOH, I will be perfectly happy with *your* not replying to my messages,
   primarily because you are seem to be typing them in hurry and the answers
   are rarely helpful.

   As to the Cabal and profuse apology... if someone took this seriously,
   I do apologize. I know that people are generally doing a good job, 
   mostly for free...

   The main thing that I've trying to convey (and many agreed to this already)
   is that the New Jersey approach is not a good approach for the late 90s,
   i.e., the balance between fundamental development and user convenience is
   significantly different.  If you haven't learnt anything from looking at
   the success of M$, the failing of OS/2 etc etc (or are saying that "we are
   different")... I really have nothing left to say. 

   The particular application of the above to the recent inquiries ---
   I do not know where exactly I was wrong and where the g++ developers
   forgot to plug something (e.g. man pages!). I know that I tried several
   things, in good faith, several times, giving it some thought .. etc etc.
   The replies that I got did not even honor reading my mail carefully.
   Hence, the attitude. Technically, it's cheaper to pay a hundred $$ for KAI
   and be happy with it, rather than waste time on such discussions.
 
   Cheers,
   
								Igor 
-- 
  Igor Markov  office: (310) 206-0179   
  http://vlsicad.cs.ucla.edu/~imarkov

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

* Re: order of switches
  1999-08-12 13:23   ` Igor Markov
  1999-08-12 14:02     ` Mumit Khan
  1999-08-12 14:08     ` Joe Buck
@ 1999-08-12 14:27     ` Alexandre Oliva
  1999-08-12 14:38       ` Igor Markov
  1999-08-31 23:20       ` Alexandre Oliva
  1999-08-12 20:55     ` Philipp Thomas
  1999-08-31 23:20     ` Igor Markov
  4 siblings, 2 replies; 28+ messages in thread
From: Alexandre Oliva @ 1999-08-12 14:27 UTC (permalink / raw)
  To: Igor Markov; +Cc: Joe Buck, gcc

On Aug 12, 1999, Igor Markov <imarkov@cs.ucla.edu> wrote:

>> the order of the switches most definitely matters for include file
>> directories and libraries. 

>    yes, that relates to the order, but that *does* seem trivial
>    (esp. that I am using the Makefiles which work with SunCC)   

>    In one instance I had to move -l after the .o file 
>    so that gcc does not silently ignore -l   

It doesn't.  It passes it to the linker, that opens the library but
figures out it doesn't need any symbol from it.  Then it gets to the
.o files.  Maybe SunCC reorders flags, or some implicit object file it
links in before any library imports the symbols you need from it.

>    In another instance I was bitten by both -Ixxx and -I being
>    legal (I defined STL="" because g++ has a good STL inside)

`-I dir' is legal because some compilers accept it, SunCC included.
You're the one causing the difference, by setting STL="", misled by
whoever designed the Makefile in a way that makes it hard for one to
disable the flag to search for STL.  You could probably make it work
with STL="unneeded"

>> >   I just grep'ed man g++ for "order" and it there were no matches.

>> The man pages are very minimal guides to the option flags.  The real
>> documentation of GCC is in the texinfo files.

>     I get an impression of that this is some kind of conspiracy (gee !)
>     .. not sure, but, perhaps, to cause people to buy support ?

texinfo has always been the documentation format recommended for GNU
projects, and GCC's man-page points to the info files as the official
documentation.  texinfo is *much* easier to write than troff, and info
files are as easy to read as man-pages (or easier, if you're a convert
:-).  You just need the proper tool (`info' or `emacs').  Or, if you
prefer, you can use the printed version, generated from the texinfo
files with `texinfo'.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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

* Re: order of switches
  1999-08-12 14:27     ` Alexandre Oliva
@ 1999-08-12 14:38       ` Igor Markov
  1999-08-12 14:57         ` Jeffrey A Law
                           ` (2 more replies)
  1999-08-31 23:20       ` Alexandre Oliva
  1 sibling, 3 replies; 28+ messages in thread
From: Igor Markov @ 1999-08-12 14:38 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Joe Buck, gcc

Alexandre Oliva wrote:
> >    In one instance I had to move -l after the .o file
> >    so that gcc does not silently ignore -l
> 
> It doesn't.  It passes it to the linker, that opens the library but
> figures out it doesn't need any symbol from it. 
> Then it gets to the .o files.  Maybe SunCC reorders flags, or some implicit
> object file it links in before any library imports the symbols you need from
> it.
 
  Well.. I can say that with SunCC, when using shared libs,
  I never get "undefined" symbols due to bad ordering. 
  (It's not as nice with static libs though). I think that,
  at minimum, it processes all libs and all object files in
  just two pieces, rather than "some libs first, then some
  object files, then more libs, more obj"...
  I can see that this may be somewhat limiting, but in practice
  it's much more convenient.

> >    In another instance I was bitten by both -Ixxx and -I being
> >    legal (I defined STL="" because g++ has a good STL inside)
> 
> `-I dir' is legal because some compilers accept it, SunCC included.
> You're the one causing the difference, by setting STL="", misled by
> whoever designed the Makefile in a way that makes it hard for one to
> disable the flag to search for STL.  You could probably make it work
> with STL="unneeded"

   that's right

> >> >   I just grep'ed man g++ for "order" and it there were no matches.
> 
> >> The man pages are very minimal guides to the option flags.  The real
> >> documentation of GCC is in the texinfo files.

   hmm...man g++ never mentions textinfo
   (I saw other man pages doing that).
   To be honest, I am not a big fan of textinfo 
   (I am a vi-head, and textinfo causes emacs)
   but at least I can browse HTML versions of all textinfo
   pages on RH6.0

   Alexandre, don't take the conspiracy theory too close to your
   heart ;-)    

								Igor
-- 
  Igor Markov  office: (310) 206-0179   
  http://vlsicad.cs.ucla.edu/~imarkov

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

* Re: order of switches
  1999-08-12 14:38       ` Igor Markov
@ 1999-08-12 14:57         ` Jeffrey A Law
  1999-08-12 15:12           ` Alex Buell
                             ` (2 more replies)
  1999-08-12 16:22         ` Alexandre Oliva
  1999-08-31 23:20         ` Igor Markov
  2 siblings, 3 replies; 28+ messages in thread
From: Jeffrey A Law @ 1999-08-12 14:57 UTC (permalink / raw)
  To: Igor Markov; +Cc: Alexandre Oliva, Joe Buck, gcc

  In message < 37B33F81.E79F135D@cs.ucla.edu >you write:
  >   Well.. I can say that with SunCC, when using shared libs,
  >   I never get "undefined" symbols due to bad ordering. 
  >   (It's not as nice with static libs though). I think that,
  >   at minimum, it processes all libs and all object files in
  >   just two pieces, rather than "some libs first, then some
  >   object files, then more libs, more obj"...
  >   I can see that this may be somewhat limiting, but in practice
  >   it's much more convenient.
Catch a clue.  Read the manuals.  Joe, Alexandre and others are correct, you
are wrong.  Unix linkers have worked this way for nearly 30 years.

jeff

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

* Re: order of switches
  1999-08-12 14:57         ` Jeffrey A Law
@ 1999-08-12 15:12           ` Alex Buell
  1999-08-31 23:20             ` Alex Buell
  1999-08-12 20:56           ` patrick
  1999-08-31 23:20           ` Jeffrey A Law
  2 siblings, 1 reply; 28+ messages in thread
From: Alex Buell @ 1999-08-12 15:12 UTC (permalink / raw)
  To: Jeffrey A Law; +Cc: gcc

On Thu, 12 Aug 1999, Jeffrey A Law wrote:

> Catch a clue.  Read the manuals.  Joe, Alexandre and others are
> correct, you are wrong.  Unix linkers have worked this way for nearly
> 30 years.

I've been watching this fuckwit troll the gcc mailing list, and I'm
rapidly forming the opinion that he's obviously a troll.

Cheers, 
Alex 
-- 

Legalise cannabis today!

http://www.tahallah.demon.co.uk

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

* Re: order of switches
  1999-08-12 14:38       ` Igor Markov
  1999-08-12 14:57         ` Jeffrey A Law
@ 1999-08-12 16:22         ` Alexandre Oliva
  1999-08-31 23:20           ` Alexandre Oliva
  1999-08-31 23:20         ` Igor Markov
  2 siblings, 1 reply; 28+ messages in thread
From: Alexandre Oliva @ 1999-08-12 16:22 UTC (permalink / raw)
  To: Igor Markov; +Cc: Joe Buck, gcc

On Aug 12, 1999, Igor Markov <imarkov@cs.ucla.edu> wrote:

>   Well.. I can say that with SunCC, when using shared libs,
>   I never get "undefined" symbols due to bad ordering. 

Then use shared libraries with gcc too.  The way a linker processes
shared libraries is completely different from static ones.

>   I can see that this may be somewhat limiting, but in practice
>   it's much more convenient.

It's only more convenient for those that don't know the rules, and it
would impose a severe limitation to those that do.

>    hmm...man g++ never mentions textinfo

man gcc does.  I didn't even know there was a g++ man-page :-)

We'd welcome a patch for g++.1 that copies from gcc.1 the paragraph
pointing to the info document.  g++.1 lives in gcc-2.95/gcc/cp; gcc.1
lives in gcc-2.95/gcc.  Thanks in advance.

>    (I am a vi-head, and textinfo causes emacs)

There are stand-alone text- and x-based `info' browser, you don't need
emacs for browsing info.  In fact, I seldom use it for info browsing.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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

* Re: order of switches
  1999-08-12 13:23   ` Igor Markov
                       ` (2 preceding siblings ...)
  1999-08-12 14:27     ` Alexandre Oliva
@ 1999-08-12 20:55     ` Philipp Thomas
  1999-08-31 23:20       ` Philipp Thomas
  1999-08-31 23:20     ` Igor Markov
  4 siblings, 1 reply; 28+ messages in thread
From: Philipp Thomas @ 1999-08-12 20:55 UTC (permalink / raw)
  To: Igor Markov; +Cc: gcc

On Thu, 12 Aug 1999 13:26:35 -0700, Igor Markov <imarkov@cs.ucla.edu>
wrote:

>   well... thank you very much, but I've been working with SunCC
>   for 3+ years, am now porting to g++ and having problems
>   (which is why the question arose)

Well how about telling so in your first mail? 

>   oh, well... it looks people like reading 50% of email and
>   shoot a reply immediately. That's rarely useful.

And it won't help you a bit accusing those that try to help you.

>> The man pages are very minimal guides to the option flags.  The real
>> documentation of GCC is in the texinfo files.
>
>    I get an impression of that this is some kind of conspiracy (gee !)
>    .. not sure, but, perhaps, to cause people to buy support ?

You really have a way to make friends. First its our job to supply you with
binaries, now we conspire to get you to pay for support. Seems to have been
some heavy stuff that you smoked.
Get real, man! Texinfo is the only official FSF form of documentation. If
*that* wasn't supplied, you would have a reason to complain.

>    (yes, I understand one can look at this from difft angles ... but
>     once I have my angle, it may be difficult to convince me otherwise)

Why should we want to convince you? Why should we care what you think?
There are lots of other people that know better and that appreciate the
efforts to supply them with a free compiler and also the efforts to help
them with problems here on the list.



Philipp

-- 
Nothing would please me more than being able to hire ten programmers
and deluge the hobby market with good software.
                                            -- Bill Gates, 1976

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

* Re: order of switches
  1999-08-12 14:57         ` Jeffrey A Law
  1999-08-12 15:12           ` Alex Buell
@ 1999-08-12 20:56           ` patrick
  1999-08-31 23:20             ` patrick
  1999-08-31 23:20           ` Jeffrey A Law
  2 siblings, 1 reply; 28+ messages in thread
From: patrick @ 1999-08-12 20:56 UTC (permalink / raw)
  To: law; +Cc: gcc list (aka egcs)

Sometime in the late 1900s it was said:

>   In message < 37B33F81.E79F135D@cs.ucla.edu >you write:
>   >   Well.. I can say that with SunCC, when using shared libs,
>   >   I never get "undefined" symbols due to bad ordering. 
>   >   (It's not as nice with static libs though). I think that,
>   >   at minimum, it processes all libs and all object files in
>   >   just two pieces, rather than "some libs first, then some
>   >   object files, then more libs, more obj"...
>   >   I can see that this may be somewhat limiting, but in practice
>   >   it's much more convenient.
> Catch a clue.  Read the manuals.  Joe, Alexandre and others are correct, you
> are wrong.  Unix linkers have worked this way for nearly 30 years.
> 
> jeff


my gosh ... that is a scary statement that you just made jeff.



patrick

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

* Re: order of switches
  1999-08-12 14:26       ` Igor Markov
@ 1999-08-12 22:13         ` Philipp Thomas
  1999-08-31 23:20           ` Philipp Thomas
  1999-08-31 23:20         ` Igor Markov
  1 sibling, 1 reply; 28+ messages in thread
From: Philipp Thomas @ 1999-08-12 22:13 UTC (permalink / raw)
  To: Igor Markov; +Cc: gcc

>   OTOH, I will be perfectly happy with *your* not replying to my messages,
>   primarily because you are seem to be typing them in hurry and the answers
>   are rarely helpful.

Now you *really* owe Joe an apology. He did understand you perfectly well
and tried to answer you correctly. But you seem to have a neat way of
ignoring the answers that don't suit you. Or you are really trying to
troll. But then again, nah, that would imply you have a clue.

>   Hence, the attitude. Technically, it's cheaper to pay a hundred $$ for KAI
>   and be happy with it, rather than waste time on such discussions.

Excellent! Do that and most of us will be glad. One clueless ignorant less
on the list.

And don't bother to answer this mail, as you're now one of the very few
entries in my kill file.



Philipp

-- 
Nothing would please me more than being able to hire ten programmers
and deluge the hobby market with good software.
                                            -- Bill Gates, 1976

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

* Re: order of switches
  1999-08-12 14:26       ` Igor Markov
  1999-08-12 22:13         ` Philipp Thomas
@ 1999-08-31 23:20         ` Igor Markov
  1 sibling, 0 replies; 28+ messages in thread
From: Igor Markov @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

  Joe,

   seriously ... not sure what you mean by a *radical change*.
   I am trying to do my work with g++ and report the problems
   that I am encountering. I did get some very good help from the
   list in most cases.
   
   OTOH, I will be perfectly happy with *your* not replying to my messages,
   primarily because you are seem to be typing them in hurry and the answers
   are rarely helpful.

   As to the Cabal and profuse apology... if someone took this seriously,
   I do apologize. I know that people are generally doing a good job, 
   mostly for free...

   The main thing that I've trying to convey (and many agreed to this already)
   is that the New Jersey approach is not a good approach for the late 90s,
   i.e., the balance between fundamental development and user convenience is
   significantly different.  If you haven't learnt anything from looking at
   the success of M$, the failing of OS/2 etc etc (or are saying that "we are
   different")... I really have nothing left to say. 

   The particular application of the above to the recent inquiries ---
   I do not know where exactly I was wrong and where the g++ developers
   forgot to plug something (e.g. man pages!). I know that I tried several
   things, in good faith, several times, giving it some thought .. etc etc.
   The replies that I got did not even honor reading my mail carefully.
   Hence, the attitude. Technically, it's cheaper to pay a hundred $$ for KAI
   and be happy with it, rather than waste time on such discussions.
 
   Cheers,
   
								Igor 
-- 
  Igor Markov  office: (310) 206-0179   
  http://vlsicad.cs.ucla.edu/~imarkov

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

* order of switches
  1999-08-12 12:11 order of switches Igor Markov
  1999-08-12 13:11 ` Joe Buck
@ 1999-08-31 23:20 ` Igor Markov
  1 sibling, 0 replies; 28+ messages in thread
From: Igor Markov @ 1999-08-31 23:20 UTC (permalink / raw)
  To: gcc

  It appears that the order of switches that I give to g++
  is critical to how it works. It may silently ignore -I or -l
  if they aren't in the correct place. That seems weird and
  causes problems, e.g.,

[imarkov@localhost Ctainers1.8]$ make-gnu
g++ -g -DABKDEBUG -fPIC -fno-for-scope -Wall -pedantic -pipe -I
-I/home/userg/code/OUR/symlinks/ABKCommon -I. -c bitBoard.cxx
In file included from bitBoard.cxx:19:
bitBoard.h:27: abkassert.h: No such file or directory
bitBoard.h:28: abkio.h: No such file or directory
^C
make: *** wait: No child processes.  Stop.
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes.  Stop.

[imarkov@localhost Ctainers1.8]$ g++ -I/home/userg/code/OUR/symlinks/ABKCommon
-I. -c rbtree.cxx
[imarkov@localhost Ctainers1.8]$  

  I just grep'ed man g++ for "order" and it there were no matches.
 
  Any pointers/comments?

  thanks,
								Igor
-- 
  Igor Markov  office: (310) 206-0179   
  http://vlsicad.cs.ucla.edu/~imarkov

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

* Re: order of switches
  1999-08-12 13:11 ` Joe Buck
  1999-08-12 13:23   ` Igor Markov
@ 1999-08-31 23:20   ` Joe Buck
  1 sibling, 0 replies; 28+ messages in thread
From: Joe Buck @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Igor Markov; +Cc: gcc

>   It appears that the order of switches that I give to g++
>   is critical to how it works. It may silently ignore -I or -l
>   if they aren't in the correct place. That seems weird and
>   causes problems, e.g.,

This is a beginner question.

gcc's behavior is the same as that of all Unix C compilers: the
order of the switches most definitely matters for include file
directories and libraries.  You are specifying the order in which
include directory paths and libraries are searched.  Libraries
are only searched for symbols that are undefined at a particular
point.  Similarly, for headers, the order of -I switches affects
handling of recursive includes.

>   I just grep'ed man g++ for "order" and it there were no matches.

The man pages are very minimal guides to the option flags.  The real
documentation of GCC is in the texinfo files.

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

* Re: order of switches
  1999-08-12 14:08     ` Joe Buck
  1999-08-12 14:26       ` Igor Markov
@ 1999-08-31 23:20       ` Joe Buck
  1 sibling, 0 replies; 28+ messages in thread
From: Joe Buck @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Igor Markov; +Cc: gcc

Igor Markov writes:
>     I get an impression of that this is some kind of conspiracy (gee !)
>     .. not sure, but, perhaps, to cause people to buy support ?

Yes.  You've caught us.  We made -I and -l work just like Unix -I and
-l so you'd have to buy a support contract.

But the Cabal (there is no Cabal) has decided that you couldn't pay us
enough to make a support contract profitable, plus, any staff forced to
deal with you would leave.  So you've foiled our little plot.

(Seriously, I don't sell support).

>     (yes, I understand one can look at this from difft angles ... but
>      once I have my angle, it may be difficult to convince me otherwise)

I apologize to the list for encouraging Igor.  Unless there is a radical
change in his behavior and a profuse apology to everyone he has insulted,
I won't be answering further mail from him.

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

* Re: order of switches
  1999-08-12 16:22         ` Alexandre Oliva
@ 1999-08-31 23:20           ` Alexandre Oliva
  0 siblings, 0 replies; 28+ messages in thread
From: Alexandre Oliva @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Igor Markov; +Cc: Joe Buck, gcc

On Aug 12, 1999, Igor Markov <imarkov@cs.ucla.edu> wrote:

>   Well.. I can say that with SunCC, when using shared libs,
>   I never get "undefined" symbols due to bad ordering. 

Then use shared libraries with gcc too.  The way a linker processes
shared libraries is completely different from static ones.

>   I can see that this may be somewhat limiting, but in practice
>   it's much more convenient.

It's only more convenient for those that don't know the rules, and it
would impose a severe limitation to those that do.

>    hmm...man g++ never mentions textinfo

man gcc does.  I didn't even know there was a g++ man-page :-)

We'd welcome a patch for g++.1 that copies from gcc.1 the paragraph
pointing to the info document.  g++.1 lives in gcc-2.95/gcc/cp; gcc.1
lives in gcc-2.95/gcc.  Thanks in advance.

>    (I am a vi-head, and textinfo causes emacs)

There are stand-alone text- and x-based `info' browser, you don't need
emacs for browsing info.  In fact, I seldom use it for info browsing.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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

* Re: order of switches
  1999-08-12 14:27     ` Alexandre Oliva
  1999-08-12 14:38       ` Igor Markov
@ 1999-08-31 23:20       ` Alexandre Oliva
  1 sibling, 0 replies; 28+ messages in thread
From: Alexandre Oliva @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Igor Markov; +Cc: Joe Buck, gcc

On Aug 12, 1999, Igor Markov <imarkov@cs.ucla.edu> wrote:

>> the order of the switches most definitely matters for include file
>> directories and libraries. 

>    yes, that relates to the order, but that *does* seem trivial
>    (esp. that I am using the Makefiles which work with SunCC)   

>    In one instance I had to move -l after the .o file 
>    so that gcc does not silently ignore -l   

It doesn't.  It passes it to the linker, that opens the library but
figures out it doesn't need any symbol from it.  Then it gets to the
.o files.  Maybe SunCC reorders flags, or some implicit object file it
links in before any library imports the symbols you need from it.

>    In another instance I was bitten by both -Ixxx and -I being
>    legal (I defined STL="" because g++ has a good STL inside)

`-I dir' is legal because some compilers accept it, SunCC included.
You're the one causing the difference, by setting STL="", misled by
whoever designed the Makefile in a way that makes it hard for one to
disable the flag to search for STL.  You could probably make it work
with STL="unneeded"

>> >   I just grep'ed man g++ for "order" and it there were no matches.

>> The man pages are very minimal guides to the option flags.  The real
>> documentation of GCC is in the texinfo files.

>     I get an impression of that this is some kind of conspiracy (gee !)
>     .. not sure, but, perhaps, to cause people to buy support ?

texinfo has always been the documentation format recommended for GNU
projects, and GCC's man-page points to the info files as the official
documentation.  texinfo is *much* easier to write than troff, and info
files are as easy to read as man-pages (or easier, if you're a convert
:-).  You just need the proper tool (`info' or `emacs').  Or, if you
prefer, you can use the printed version, generated from the texinfo
files with `texinfo'.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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

* Re: order of switches
  1999-08-12 20:56           ` patrick
@ 1999-08-31 23:20             ` patrick
  0 siblings, 0 replies; 28+ messages in thread
From: patrick @ 1999-08-31 23:20 UTC (permalink / raw)
  To: law; +Cc: gcc list (aka egcs)

Sometime in the late 1900s it was said:

>   In message < 37B33F81.E79F135D@cs.ucla.edu >you write:
>   >   Well.. I can say that with SunCC, when using shared libs,
>   >   I never get "undefined" symbols due to bad ordering. 
>   >   (It's not as nice with static libs though). I think that,
>   >   at minimum, it processes all libs and all object files in
>   >   just two pieces, rather than "some libs first, then some
>   >   object files, then more libs, more obj"...
>   >   I can see that this may be somewhat limiting, but in practice
>   >   it's much more convenient.
> Catch a clue.  Read the manuals.  Joe, Alexandre and others are correct, you
> are wrong.  Unix linkers have worked this way for nearly 30 years.
> 
> jeff


my gosh ... that is a scary statement that you just made jeff.



patrick

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

* Re: order of switches
  1999-08-12 14:57         ` Jeffrey A Law
  1999-08-12 15:12           ` Alex Buell
  1999-08-12 20:56           ` patrick
@ 1999-08-31 23:20           ` Jeffrey A Law
  2 siblings, 0 replies; 28+ messages in thread
From: Jeffrey A Law @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Igor Markov; +Cc: Alexandre Oliva, Joe Buck, gcc

  In message < 37B33F81.E79F135D@cs.ucla.edu >you write:
  >   Well.. I can say that with SunCC, when using shared libs,
  >   I never get "undefined" symbols due to bad ordering. 
  >   (It's not as nice with static libs though). I think that,
  >   at minimum, it processes all libs and all object files in
  >   just two pieces, rather than "some libs first, then some
  >   object files, then more libs, more obj"...
  >   I can see that this may be somewhat limiting, but in practice
  >   it's much more convenient.
Catch a clue.  Read the manuals.  Joe, Alexandre and others are correct, you
are wrong.  Unix linkers have worked this way for nearly 30 years.

jeff

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

* Re: order of switches
  1999-08-12 20:55     ` Philipp Thomas
@ 1999-08-31 23:20       ` Philipp Thomas
  0 siblings, 0 replies; 28+ messages in thread
From: Philipp Thomas @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Igor Markov; +Cc: gcc

On Thu, 12 Aug 1999 13:26:35 -0700, Igor Markov <imarkov@cs.ucla.edu>
wrote:

>   well... thank you very much, but I've been working with SunCC
>   for 3+ years, am now porting to g++ and having problems
>   (which is why the question arose)

Well how about telling so in your first mail? 

>   oh, well... it looks people like reading 50% of email and
>   shoot a reply immediately. That's rarely useful.

And it won't help you a bit accusing those that try to help you.

>> The man pages are very minimal guides to the option flags.  The real
>> documentation of GCC is in the texinfo files.
>
>    I get an impression of that this is some kind of conspiracy (gee !)
>    .. not sure, but, perhaps, to cause people to buy support ?

You really have a way to make friends. First its our job to supply you with
binaries, now we conspire to get you to pay for support. Seems to have been
some heavy stuff that you smoked.
Get real, man! Texinfo is the only official FSF form of documentation. If
*that* wasn't supplied, you would have a reason to complain.

>    (yes, I understand one can look at this from difft angles ... but
>     once I have my angle, it may be difficult to convince me otherwise)

Why should we want to convince you? Why should we care what you think?
There are lots of other people that know better and that appreciate the
efforts to supply them with a free compiler and also the efforts to help
them with problems here on the list.



Philipp

-- 
Nothing would please me more than being able to hire ten programmers
and deluge the hobby market with good software.
                                            -- Bill Gates, 1976

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

* Re: order of switches
  1999-08-12 13:23   ` Igor Markov
                       ` (3 preceding siblings ...)
  1999-08-12 20:55     ` Philipp Thomas
@ 1999-08-31 23:20     ` Igor Markov
  4 siblings, 0 replies; 28+ messages in thread
From: Igor Markov @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

Joe Buck wrote:
> 
> >   It appears that the order of switches that I give to g++
> >   is critical to how it works. It may silently ignore -I or -l
> >   if they aren't in the correct place. That seems weird and
> >   causes problems, e.g.,
> 
> This is a beginner question.
> 
> gcc's behavior is the same as that of all Unix C compilers: 

   well... thank you very much, but I've been working with SunCC
   for 3+ years, am now porting to g++ and having problems
   (which is why the question arose)

> the order of the switches most definitely matters for include file
> directories and libraries. 

   yes, that relates to the order, but that *does* seem trivial
   (esp. that I am using the Makefiles which work with SunCC)   

   In one instance I had to move -l after the .o file 
   so that gcc does not silently ignore -l   

   In another instance I was bitten by both -Ixxx and -I being
   legal (I defined STL="" because g++ has a good STL inside)

   oh, well... it looks people like reading 50% of email and
   shoot a reply immediately. That's rarely useful.

> >   I just grep'ed man g++ for "order" and it there were no matches.
> 
> The man pages are very minimal guides to the option flags.  The real
> documentation of GCC is in the texinfo files.

    I get an impression of that this is some kind of conspiracy (gee !)
    .. not sure, but, perhaps, to cause people to buy support ?
    (yes, I understand one can look at this from difft angles ... but
     once I have my angle, it may be difficult to convince me otherwise)
	
								Igor
-- 
  Igor Markov  office: (310) 206-0179   
  http://vlsicad.cs.ucla.edu/~imarkov

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

* Re: order of switches
  1999-08-12 15:12           ` Alex Buell
@ 1999-08-31 23:20             ` Alex Buell
  0 siblings, 0 replies; 28+ messages in thread
From: Alex Buell @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Jeffrey A Law; +Cc: gcc

On Thu, 12 Aug 1999, Jeffrey A Law wrote:

> Catch a clue.  Read the manuals.  Joe, Alexandre and others are
> correct, you are wrong.  Unix linkers have worked this way for nearly
> 30 years.

I've been watching this fuckwit troll the gcc mailing list, and I'm
rapidly forming the opinion that he's obviously a troll.

Cheers, 
Alex 
-- 

Legalise cannabis today!

http://www.tahallah.demon.co.uk

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

* Re: order of switches
  1999-08-12 14:02     ` Mumit Khan
@ 1999-08-31 23:20       ` Mumit Khan
  0 siblings, 0 replies; 28+ messages in thread
From: Mumit Khan @ 1999-08-31 23:20 UTC (permalink / raw)
  To: gcc

Igor Markov <imarkov@cs.ucla.edu> writes:
> 
>    well... thank you very much, but I've been working with SunCC
>    for 3+ years, am now porting to g++ and having problems
>    (which is why the question arose)

Joe tries to help, and you come back with something that looks like
whining, but in fact I just don't understand what you are trying to
say.

GCC and SunCC are two different compilers, and even though both share
the standard "Unix-style" compiler switches, there can be and are subtle 
differences. And that's where the documentation comes in.

> > The man pages are very minimal guides to the option flags.  The real
> > documentation of GCC is in the texinfo files.
> 
>     I get an impression of that this is some kind of conspiracy (gee !)
>     .. not sure, but, perhaps, to cause people to buy support ?
>     (yes, I understand one can look at this from difft angles ... but
>      once I have my angle, it may be difficult to convince me otherwise)
> 	

GCC comes with documentation. You can choose to read it or not. 

If you choose to read the documentation and find it confusing and
lacking, there are many here who are willing to help (and you can
help fill the gaps in the documentation; in case you didn't know,
that's how free software works -- it's a two-way street). 

If you choose not to read it, don't come here whining. Please go away.

Regards,
Mumit

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

* Re: order of switches
  1999-08-12 22:13         ` Philipp Thomas
@ 1999-08-31 23:20           ` Philipp Thomas
  0 siblings, 0 replies; 28+ messages in thread
From: Philipp Thomas @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Igor Markov; +Cc: gcc

>   OTOH, I will be perfectly happy with *your* not replying to my messages,
>   primarily because you are seem to be typing them in hurry and the answers
>   are rarely helpful.

Now you *really* owe Joe an apology. He did understand you perfectly well
and tried to answer you correctly. But you seem to have a neat way of
ignoring the answers that don't suit you. Or you are really trying to
troll. But then again, nah, that would imply you have a clue.

>   Hence, the attitude. Technically, it's cheaper to pay a hundred $$ for KAI
>   and be happy with it, rather than waste time on such discussions.

Excellent! Do that and most of us will be glad. One clueless ignorant less
on the list.

And don't bother to answer this mail, as you're now one of the very few
entries in my kill file.



Philipp

-- 
Nothing would please me more than being able to hire ten programmers
and deluge the hobby market with good software.
                                            -- Bill Gates, 1976

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

* Re: order of switches
  1999-08-12 14:38       ` Igor Markov
  1999-08-12 14:57         ` Jeffrey A Law
  1999-08-12 16:22         ` Alexandre Oliva
@ 1999-08-31 23:20         ` Igor Markov
  2 siblings, 0 replies; 28+ messages in thread
From: Igor Markov @ 1999-08-31 23:20 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Joe Buck, gcc

Alexandre Oliva wrote:
> >    In one instance I had to move -l after the .o file
> >    so that gcc does not silently ignore -l
> 
> It doesn't.  It passes it to the linker, that opens the library but
> figures out it doesn't need any symbol from it. 
> Then it gets to the .o files.  Maybe SunCC reorders flags, or some implicit
> object file it links in before any library imports the symbols you need from
> it.
 
  Well.. I can say that with SunCC, when using shared libs,
  I never get "undefined" symbols due to bad ordering. 
  (It's not as nice with static libs though). I think that,
  at minimum, it processes all libs and all object files in
  just two pieces, rather than "some libs first, then some
  object files, then more libs, more obj"...
  I can see that this may be somewhat limiting, but in practice
  it's much more convenient.

> >    In another instance I was bitten by both -Ixxx and -I being
> >    legal (I defined STL="" because g++ has a good STL inside)
> 
> `-I dir' is legal because some compilers accept it, SunCC included.
> You're the one causing the difference, by setting STL="", misled by
> whoever designed the Makefile in a way that makes it hard for one to
> disable the flag to search for STL.  You could probably make it work
> with STL="unneeded"

   that's right

> >> >   I just grep'ed man g++ for "order" and it there were no matches.
> 
> >> The man pages are very minimal guides to the option flags.  The real
> >> documentation of GCC is in the texinfo files.

   hmm...man g++ never mentions textinfo
   (I saw other man pages doing that).
   To be honest, I am not a big fan of textinfo 
   (I am a vi-head, and textinfo causes emacs)
   but at least I can browse HTML versions of all textinfo
   pages on RH6.0

   Alexandre, don't take the conspiracy theory too close to your
   heart ;-)    

								Igor
-- 
  Igor Markov  office: (310) 206-0179   
  http://vlsicad.cs.ucla.edu/~imarkov

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

end of thread, other threads:[~1999-08-31 23:20 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-12 12:11 order of switches Igor Markov
1999-08-12 13:11 ` Joe Buck
1999-08-12 13:23   ` Igor Markov
1999-08-12 14:02     ` Mumit Khan
1999-08-31 23:20       ` Mumit Khan
1999-08-12 14:08     ` Joe Buck
1999-08-12 14:26       ` Igor Markov
1999-08-12 22:13         ` Philipp Thomas
1999-08-31 23:20           ` Philipp Thomas
1999-08-31 23:20         ` Igor Markov
1999-08-31 23:20       ` Joe Buck
1999-08-12 14:27     ` Alexandre Oliva
1999-08-12 14:38       ` Igor Markov
1999-08-12 14:57         ` Jeffrey A Law
1999-08-12 15:12           ` Alex Buell
1999-08-31 23:20             ` Alex Buell
1999-08-12 20:56           ` patrick
1999-08-31 23:20             ` patrick
1999-08-31 23:20           ` Jeffrey A Law
1999-08-12 16:22         ` Alexandre Oliva
1999-08-31 23:20           ` Alexandre Oliva
1999-08-31 23:20         ` Igor Markov
1999-08-31 23:20       ` Alexandre Oliva
1999-08-12 20:55     ` Philipp Thomas
1999-08-31 23:20       ` Philipp Thomas
1999-08-31 23:20     ` Igor Markov
1999-08-31 23:20   ` Joe Buck
1999-08-31 23:20 ` Igor Markov

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