Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While I'm compiling a open source project on Cent OS 5.5 I'm getting error "cc1plus warnings being treated as errors". Why and how to solve this problem.

share|improve this question
You will need to provide a good deal more information than this in order to get a decent answer. What software are you compiling? What commands are you following? What warnings/errors are being produced? – Caleb Jun 23 '11 at 10:32
up vote 2 down vote accepted

There is probably a -Werror flag being given somewhere. Assuming you have a project using automake/autoconf/make/configure, you can see if you find it somewhere in "configure" or "Makefile.am" or possibly in one of your environment variables.

Compiling programs with the -Werror flag is not a problem in itself, as the warnings are usually valid concerns about the quality of the sourcecode.

Try finding and removing the -Werror flag, possibly adding -fpermissive instead, and the code might perhaps compile. A lot more information is needed in order to be able to pinpoint why the source code you have (whatever it is) does not compile "by default".

share|improve this answer
You can try also './configure CFLAGS=-w' – Anton Barkovsky Jun 23 '11 at 11:12
Trying "./waf configure CFLAGS=-w" and "./waf CFLAGS=-w" is giving error like no such command found and even tried CXXFLAGS but the result is the same. And I know that the issue is because of -Werror but how to eradicate the -Werror thing guys. – y ramesh rao Jun 24 '11 at 11:25
More information is needed. Knowing that you're using waf is a start. Knowing which open source project this is, would help a lot. When it comes to waf, sometimes installing waf and running the installed version solves compilation issues, depending on how old the version of waf that comes with the project is. And, have you looked through the "wscript" file, if there is such a file? – Alexander Jun 24 '11 at 15:00
This is the open source project url github.com/wayfinder/Wayfinder-Server – y ramesh rao Jun 29 '11 at 8:19
And Finally You suggestions solved issue Man. Thanks a ton guys. – y ramesh rao Jun 29 '11 at 11:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.