My favorites | Sign in
Project Home Wiki Issues Source Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 737: dart build fails in two places with "variable ... set but not used" error
3 people starred this issue and may be notified of changes. Back to list
Status:  AssumedStale
Owner:  ----
Closed:  Aug 2013


Sign in to add a comment
 
Reported by sean.pho...@gmail.com, Dec 7, 2011
What steps will reproduce the problem?
1. Follow wiki instructions for "GettingTheSource" and "Building" 
2. cd to dart directory - execute ./tools/build.py --arch=ia32 to build everything

What is the expected output? What do you see instead?
First error:
runtime/third_party/double-conversion/src/double-conversion.cc:607:8: error: variable ‘fractional_part’ set but not used [-Werror=unused-but-set-variable]

Second error:
runtime/vm/dart_api_impl_test.cc:1342:15: error: variable ‘result’ set but not used [-Werror=unused-but-set-variable]

In both cases, the build fails at that point with:
cc1plus: all warnings being treated as errors
...
make: *** Waiting for unfinished jobs....
BUILD FAILED

What version of the product are you using? On what operating system?
gclient sync was performed against the repository several hours ago into a clean directory.  This was my first build of dart, on Ubuntu 11.10 on a 32-bit Toshiba QOSMIO laptop.

Please provide any additional information below.
I commented out the two instances of the unused variable to get past the first error, and to get past the second error I wrapped the 'result' variable in an assertion so that the compiler would see that it was used.  I would not go so far as to call these fixes, as I was just trying to get the build to complete.
Dec 8, 2011
#1 ladicek@gmail.com
Ran into this too. I'm using GCC 4.6.1, which is (I guess) newer than Google people use. My workaround is to remove '-Werror' from compiler flags (in tools/gyp/configurations_make.gypi).

I'm a big fan of static analysis, but it makes no sense to abort compilation because of some warnings that developers never saw, as they are using an older version of the compiler.
Dec 8, 2011
#2 drfibonacci@google.com
(No comment was entered for this change.)
Status: Triaged
Labels: Area-Build OpSys-Linux
Dec 12, 2011
#3 prujohn
See the comments in the Building Dart document: https://code.google.com/p/dart/wiki/Building

The way I handle this is to have the older compiler installed and then...

export CXX=g++-4.4 CC=gcc-4.4

...before running the build.  
Aug 22, 2013
Project Member #4 lrn@google.com
(No comment was entered for this change.)
Status: AssumedStale
Nov 20, 2013
Project Member #5 sandholm@google.com
(No comment was entered for this change.)
Labels: -Area-Build Area-Infrastructure
Sign in to add a comment

Powered by Google Project Hosting