ayudaev / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

cc1plus: error: -Werror=vla: No option -Wvla #518

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checkout breakpad on OS X (10.8)
2. run ./configure && make

What is the expected output? What do you see instead?

cc1plus: error: -Werror=vla: No option -Wvla

Please use labels and text to provide additional information.

Original issue reported on code.google.com by gha...@gmail.com on 23 Feb 2013 at 3:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Also having this issue when running:
breakpad/android/run-checks.sh --no-device --verbose --verbose

On OS X (10.8).

End of the log:
    g++ -DHAVE_CONFIG_H -I. -I/Users/jess/Projects/GIT/CricHQ-Android/CricHQ/src/main/jni/breakpad/android/.. -I./src  -I/Users/jess/Projects/GIT/CricHQ-Android/CricHQ/src/main/jni/breakpad/android/../src   -Werror=missing-braces -Werror=non-virtual-dtor -Werror=overloaded-virtual -Werror=reorder -Werror=sign-compare -Werror=unused-variable -Werror=vla  -g -O2 -MT src/processor/exploitability_win.o -MD -MP -MF $depbase.Tpo -c -o src/processor/exploitability_win.o /Users/jess/Projects/GIT/CricHQ-Android/CricHQ/src/main/jni/breakpad/android/../src/processor/exploitability_win.cc &&\
    mv -f $depbase.Tpo $depbase.Po
cc1plus: error: -Werror=vla: No option -Wvlacc1plus: error: -Werror=vla: No 
option -Wvlacc1plus: error: -Werror=vla: No option -Wvla
cc1plus: error: -Werror=vla: No option -Wvla
cc1plus: error: -Werror=vla: No option -Wvla
cc1plus: error: -Werror=vla: No option -Wvla
cc1plus: error: -Werror=vla: No option -Wvla
make: *** [src/processor/basic_code_modules.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [src/processor/basic_source_line_resolver.o] Error 1
make: *** [src/processor/call_stack.o] Error 1
cc1plus: error: -Werror=vla: No option -Wvla
make: *** [src/processor/cfi_frame_info.o] Error 1
make: *** [src/processor/exploitability_win.o] Error 1
make: *** [src/processor/exploitability.o] Error 1
make: *** [src/processor/disassembler_x86.o] Error 1
make: *** [src/processor/binarystream.o] Error 1
ERROR: Can't build host binaries!
Cleaning up: /tmp/run-checks.sh.9kTFRBS8

Original comment by zam...@gmail.com on 7 Jul 2013 at 11:58

GoogleCodeExporter commented 9 years ago
I'm seeing the same issue, here's a bit more information on the version of the 
compiler I'm working with:

╰─○ g++ --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) 
(LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And the full run of make:

╰─○ make
depbase=`echo src/processor/basic_code_modules.o | sed 
's|[^/]*$|.deps/&|;s|\.o$||'`;\
    g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -Werror=missing-braces -Werror=non-virtual-dtor -Werror=overloaded-virtual -Werror=reorder -Werror=sign-compare -Werror=unused-variable -Werror=vla  -g -O2 -MT src/processor/basic_code_modules.o -MD -MP -MF $depbase.Tpo -c -o src/processor/basic_code_modules.o src/processor/basic_code_modules.cc &&\
    mv -f $depbase.Tpo $depbase.Po
cc1plus: error: -Werror=vla: No option -Wvla
make: *** [src/processor/basic_code_modules.o] Error 1

Original comment by boush...@gmail.com on 14 Aug 2013 at 11:35

GoogleCodeExporter commented 9 years ago
What version of Xcode is that from? Or not from Xcode at all? A version of g++ 
with a 2007 copyright date looks awfully old.

Original comment by thestig@chromium.org on 14 Aug 2013 at 7:51

GoogleCodeExporter commented 9 years ago
looks like I have Xcode version 4.6.3, So it's not Xcode 5, but it's not 
ancient.

And looking at where that binary links to:
/usr/bin/g++ -> llvm-g++-4.2
/usr/bin/llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/llvm-g++-4.2

Looks like this is the directory where Xcode installs it's "command line 
tools", so this should be the standard version for someone using OSX 10.8

Original comment by boush...@gmail.com on 15 Aug 2013 at 10:52

GoogleCodeExporter commented 9 years ago
I checked out r1205 here, and I have Xcode 4.5.2. ./configure && make works for 
me.

./configure detected the presence of clang/clang++ and used them instead of 
gcc/g++.

Original comment by thestig@chromium.org on 15 Aug 2013 at 8:00

GoogleCodeExporter commented 9 years ago
Had the same issue. You need to make sure you are using the right gcc.

Install gcc with homebrew:

brew install gcc46 --enable-cxx

Make symbolic links for gcc 4.6 binaries in /usr/local/bin

ln -s cpp-4.6 cpp
ln -s c++-4.6 c++
ln -s g++-4.6 g++
ln -s gcc-4.6 gcc
ln -s gcov-4.6 gcov

Open a new terminal window and check each command with which, they should all 
be:

/usr/local/bin

You are done now go and compile. :D

Original comment by grimmk...@gmail.com on 30 Aug 2013 at 10:24