Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Apr 2, 2015 · 7 comments
Open

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

GoogleCodeExporter opened this issue Apr 2, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 23 Feb 2013 at 3:35

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 7 Jul 2013 at 11:58

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 14 Aug 2013 at 11:35

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 14 Aug 2013 at 7:51

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 15 Aug 2013 at 10:52

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 15 Aug 2013 at 8:00

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 30 Aug 2013 at 10:24

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant