Gcc, why so serious?

Hi, Joe Kampus, and all here at Endeavour OS, I hope all are well and the year looks good ahead!

Joe, I need advise from well-equipped Linux users like yourself and those amongst EndeavourOS and the forum corridors…

I dropped Arch, nothing happened negatively relating to why, in all honesty, I rather disliked the “indirectly laid hints” that everyone is either using their software to continue the Arch Linux ecosystems existence, in a manner that, you cant really do much, except, create a PKGBUILD, etc… and/or Edit one to have it “mildly” fit some criteria, without it actually fitting your interests/intention close to 50% of your need… customised, yes, to an extent… custom, within reason.

So, I am using Gentoo, love it! It’s been my sole software cave for this entire time since I last posted here. But now I have a question, more “curiousity” than anything else…

In my logs, for evaluation of compiler flags and the works happening during compiling, I noticed this (not recently, a while back, however, I am unable to find clear meaning surrounding why and to what purpose)

Example - some random log:

gcc: error: unrecognized command line option ‘-V’
(More text, blah)

I am just interested in knowing, why is this done? In the Makefiles? Seems like there is “purpose” more than “mistake” behind it…

Thanks Gents and Ladies :slight_smile:

That error just means something is trying to pass gcc a command line option that is wrong.

That is more a question for gentoo experts or to whoever maintains the thing you are trying to build.

If you get that error every time you build anything it is probably on your end. If you are only getting it when you build a certain thing, that would mean the problem is with that thing or the options on your end.

There really isn’t enough info here for someone to help you…

Hi Dalto, hope you well…

Okay, I see what you’re saying.
With regards to it being a possible error my side, I have done the same recompile using Gentoo default flags, my own (although redundant flags are scrutinized lol, I am aware of the implication… and its for learning purposes mostly)

However, the -
gcc: error: unrecognized command line option ‘-V’

Isn’t for all, only a few jobs moreso… that line is followed by a “assist text” (for lack of better explanation)

Text following the gcc error -
“Did you mean -qversion or -v”

So, it’s saying during Gcc being invoked by portage, or not?, a commandline “option” is being specific to the quering of “gcc version” being run, right from the start… but I can’t tell if it’s purposefully done (in the Makefile) or why it’s actually happening?.. like, my compiling still ends successfully (although, should it, if started like that?)… anyway, I would ask on Gentoo side… buut… last time I had a query, the EndeavourOS community was helpful, hence… I started here ^_^… (Gentoo sure is too, but, call me old-fashioned haha)

1 Like

Dalto, what could I provide for you, to possibly give a more in-depth idea as to what I see… I will gladly? :smiley:

gcc -V isn’t valid. It is definitely a mistake “somewhere”.

Where that “somewhere” is the harder part. It could be something being inserted where it doesn’t belong. It could be a bad upstream makefile. It could be something that changed between versions. It could be your custom flags, etc, etc, etc.

While we are glad to be helpful this strikes me as an issue that someone familiar with Gentoo could be a lot more helpful with.

At the very least, I would recommend providing them with the specific packages it happens with.


from man gcc :slight_smile: -v Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper.

That’s lowercase -v, the OP is inquiring about uppercase -V, which is not a valid command line option for GCC.