Description
I'm using:
$ gcc --version | head -1 gcc (GCC) 6.1.1 20160602
Failure is like so:
$ git clean -fdx build-support/thrift/ $ ./gradlew clean $ ./gradlew build ... thrift 0.9.1 Building C++ Library ......... : no Building C (GLib) Library .... : no Building Java Library ........ : no Building C# Library .......... : no Building Python Library ...... : no Building Ruby Library ........ : no Building Haskell Library ..... : no Building Perl Library ........ : no Building PHP Library ......... : no Building Erlang Library ...... : no Building Go Library .......... : no Building D Library ........... : no If something is missing that you think should be present, please skim the output of configure to find the missing component. Details are present in config.log. make[1]: Entering directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thrift-0.9.1' make all-recursive make[2]: Entering directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thrift-0.9.1' Making all in compiler/cpp make[3]: Entering directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thrift-0.9.1/compiler/cpp' make all-am make[4]: Entering directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thrift-0.9.1/compiler/cpp' g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -Wall -Wno-sign-compare -Wno-unused -g -O2 -c -o libparse_a-thrifty.o `test -f 'thrifty.cc' || echo './'`thrifty.cc g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -Wall -Wno-sign-compare -Wno-unused -g -O2 -c -o libparse_a-thriftl.o `test -f 'thriftl.cc' || echo './'`thriftl.cc g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -Wall -g -O2 -c -o thrift-main.o `test -f 'src/main.cc' || echo './'`src/main.cc gcc -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -g -O2 -c -o thrift-md5.o `test -f 'src/md5.c' || echo './'`src/md5.c thrifty.yy:664:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] thrifty.yy:971:25: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] thrifty.yy:982:23: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -Wall -g -O2 -c -o thrift-t_generator.o `test -f 'src/generate/t_generator.cc' || echo './'`src/generate/t_generator.cc g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -Wall -g -O2 -c -o thrift-parse.o `test -f 'src/parse/parse.cc' || echo './'`src/parse/parse.cc g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -Wall -g -O2 -c -o thrift-t_c_glib_generator.o `test -f 'src/generate/t_c_glib_generator.cc' || echo './'`src/generate/t_c_glib_generator.cc g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -Wall -g -O2 -c -o thrift-t_cpp_generator.o `test -f 'src/generate/t_cpp_generator.cc' || echo './'`src/generate/t_cpp_generator.cc g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I./src -Wall -g -O2 -c -o thrift-t_java_generator.o `test -f 'src/generate/t_java_generator.cc' || echo './'`src/generate/t_java_generator.cc src/generate/t_java_generator.cc: In member function ‘void t_java_generator::generate_process_async_function(t_service*, t_function*)’: src/generate/t_java_generator.cc:2830:14: error: operands to ?: have different types ‘bool’ and ‘std::basic_ostream<char>’ first ? first = false : indent(f_service_) << "else "; ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[4]: *** [Makefile:704: thrift-t_java_generator.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[4]: Leaving directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thrift-0.9.1/compiler/cpp' make[3]: Leaving directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thrift-0.9.1/compiler/cpp' make[3]: *** [Makefile:417: all] Error 2 make[2]: *** [Makefile:434: all-recursive] Error 1 make[2]: Leaving directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thrift-0.9.1' make[1]: *** [Makefile:355: all] Error 2 make[1]: Leaving directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thrift-0.9.1' make: *** [Makefile:50: thrift-0.9.1/compiler/cpp/thrift] Error 2 make: Leaving directory '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift' :api:generateThriftJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':api:generateThriftJava'. > Process 'command '/home/jsirois/dev/apache/jsirois-aurora/build-support/thrift/thriftw'' finished with non-zero exit value 2 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 1 mins 47.847 secs
The workaround is to use clang. I have:
$ clang --version | head -1 clang version 3.8.0 (tags/RELEASE_380/final)
And these work:
$ CC=clang CXX=clang++ ./gradlew build $ CC=clang CXX=clang++ ./build-support/release/verify-release-candidate 0.15.0-rc1