Bug #406

O2 flag makes compilation fail beacause of Werror

Added by Ruben S. Montero over 10 years ago. Updated over 10 years ago.

Status:ClosedStart date:11/10/2010
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Core & System
Target version:Release 2.0.1
Resolution:fixed Pull request:
Affected Versions:

Description

This has been reported by George L. Emigh in the mailing list

So in my instance, CFLAGS is set to "-march=native -O2 -pipe -mfpmath=sse" 

and opennebula fails to build with:

gcc -o src/template/template_parser.o -c -march=native -O2 -pipe -mfpmath=sse
-rdynamic -g -Wall -Werror -DSQLITE_DB -DMYSQL_DB -DHAVE_ERRNO_AS_DEFINE=1 -
DUNIV_LINUX -Iinclude -I/usr/include -I/usr/include/mysql -
I/usr/include/libxml2 src/template/template_parser.c
cc1: warnings being treated as errors
template_parser.c: In function 'template_lex':
template_parser.l:89: error: ignoring return value of 'fwrite', declared with
attribute warn_unused_result
scons: *** [src/template/template_parser.o] Error 1
scons: building terminated because of errors.

If I remove the -O2 it builds fine, and I will just do that and move forward
for now, but opennebula should probably not fail to build with -O2

Associated revisions

Revision 631a4c02
Added by Ruben S. Montero over 10 years ago

bug #406: Removed default Werror option for compiling OpenNebula

Revision d6168d24
Added by Ruben S. Montero over 10 years ago

bug #406: Removed default Werror option for compiling OpenNebula
(cherry picked from commit 631a4c02f737ca8fcec40cd7af0f00abedb5b9a0)

Revision 3dc6be9c
Added by Abel Coronado almost 4 years ago

F #4894 Added terminate action with FAILURE state VMs in Sunstone (#406)

Revision 8f1870ad
Added by Abel Coronado almost 4 years ago

F #4894 Added terminate action with FAILURE state VMs in Sunstone (#406)

History

#1 Updated by Ruben S. Montero over 10 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

This error is in a lex generated file. We have decided to remove Werror for the default CFLAGS options. Werror is kept for testing builds

Also available in: Atom PDF