LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-03-2009, 01:23 AM   #1
bitzsk
LQ Newbie
 
Registered: Apr 2009
Posts: 15

Rep: Reputation: 0
gcc: warnings being treated as errors ,how to close it ?


when i compile xen source use "sudo make world".
it generate following error:

gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -m32 -Wdeclaration-after-statement -o symbols symbols.c
cc1: warnings being treated as errors

how do i close it? let warnings not being treated as errors?

my linux dist is Ubuntu 9.04, gcc vertion is 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ,xen vertion is 3.2

Last edited by bitzsk; 05-03-2009 at 01:26 AM.
 
Old 05-03-2009, 01:49 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,037

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Quote:
Originally Posted by bitzsk View Post
when i compile xen source use "sudo make world".
it generate following error:

gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -m32 -Wdeclaration-after-statement -o symbols symbols.c
cc1: warnings being treated as errors

how do i close it? let warnings not being treated as errors?

my linux dist is Ubuntu 9.04, gcc vertion is 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ,xen vertion is 3.2
Remove '-Werror' .

OTOH, better understand why you have warnings and fix the root cause - '-Werror' was most likely put for a reason.
 
Old 05-04-2009, 05:55 AM   #3
bitzsk
LQ Newbie
 
Registered: Apr 2009
Posts: 15

Original Poster
Rep: Reputation: 0
thank you for your answer!

but how do i remove the -Werror option? as the following message displayed automaticly when i run "make world".


gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -m32 -Wdeclaration-after-statement -o symbols symbols.c
cc1: warnings being treated as errors

OTOH,when i use other linux edition such as ubuntu 7.10 or 8.04 there is no such error , just ignor warning when compile xen. is there different default setting in gcc between ubuntu 9.04 and ubuntu 8.04?

Last edited by bitzsk; 05-04-2009 at 06:00 AM.
 
Old 05-04-2009, 06:10 AM   #4
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,037

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Quote:
Originally Posted by bitzsk View Post
thank you for your answer!

but how do i remove the -Werror option? as the following message displayed automaticly when i run "make world".


gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -m32 -Wdeclaration-after-statement -o symbols symbols.c
cc1: warnings being treated as errors

OTOH,when i use other linux edition such as ubuntu 7.10 or 8.04 there is no such error , just ignor warning when compile xen. is there different default setting in gcc between ubuntu 9.04 and ubuntu 8.04?
Look into Makefile's and files included into them (if any) and find where -Werror is added to gcc flags.

Typically it's in CCFLAGS and/or CXXFLAGS variables.
 
Old 04-05-2010, 11:30 PM   #5
jalbrizio
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by Sergei Steshenko View Post
Look into Makefile's and files included into them (if any) and find where -Werror is added to gcc flags.

Typically it's in CCFLAGS and/or CXXFLAGS variables.

thanks this helped with my issue I was having with google gears. I did a grep -R Werror ./*
and found the culprit.
you guys rock.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ld : warnings and errors rajesh_b Programming 2 01-22-2007 08:50 AM
Warnings treated as errors smallfire Fedora 4 07-17-2006 01:08 AM
Warnings treated as errors(help) smallfire Programming 12 07-17-2006 01:04 AM
Turn off "Warnings treated as errors" lucky6969b Programming 2 03-15-2006 09:34 AM
Errors and warnings when I exit X cragwolf Slackware 5 09-01-2004 02:52 AM


All times are GMT -5. The time now is 03:04 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration