Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.15.0
-
None
-
None
-
> ruby -v ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-darwin20]
> gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 13.0.0 (clang-1300.0.29.3) Target: x86_64-apple-darwin20.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> ruby -v ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-darwin20] > gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 13.0.0 (clang-1300.0.29.3) Target: x86_64-apple-darwin20.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Description
I get a compile error when trying to install the gem thrift v0.15.0
I found one bugtracker mentioning the same problem and pointing to the flag -Wcompound-token-split-by-macro that seems to be enabled by default starting on the version 12 of clang.
The error output is:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/user/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/thrift-0.15.0/ext /Users/user/.asdf/installs/ruby/2.7.4/bin/ruby -I /Users/user/.asdf/installs/ruby/2.7.4/lib/ruby/2.7.0 -r ./siteconf20211018-75929-1w556gv.rb extconf.rb checking for strlcpy() in string.h... yes creating Makefilecurrent directory: /Users/user/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/thrift-0.15.0/ext make "DESTDIR=" cleancurrent directory: /Users/user/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/thrift-0.15.0/ext make "DESTDIR=" compiling binary_protocol_accelerated.c binary_protocol_accelerated.c:404:68: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] VALUE thrift_binary_protocol_class = rb_const_get(thrift_module, rb_intern("BinaryProtocol")); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:23: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:404:68: note: '{' token is here VALUE thrift_binary_protocol_class = rb_const_get(thrift_module, rb_intern("BinaryProtocol")); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' { \ ^ binary_protocol_accelerated.c:404:68: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] VALUE thrift_binary_protocol_class = rb_const_get(thrift_module, rb_intern("BinaryProtocol")); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' } ^ binary_protocol_accelerated.c:404:68: note: ')' token is here VALUE thrift_binary_protocol_class = rb_const_get(thrift_module, rb_intern("BinaryProtocol")); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:406:68: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] VERSION_1 = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_1"))); ^~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:23: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:406:68: note: '{' token is here VERSION_1 = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_1"))); ^~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' { \ ^ binary_protocol_accelerated.c:406:68: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] VERSION_1 = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_1"))); ^~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' } ^ binary_protocol_accelerated.c:406:68: note: ')' token is here VERSION_1 = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_1"))); ^~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:407:71: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] VERSION_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_MASK"))); ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:23: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:407:71: note: '{' token is here VERSION_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_MASK"))); ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' { \ ^ binary_protocol_accelerated.c:407:71: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] VERSION_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_MASK"))); ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' } ^ binary_protocol_accelerated.c:407:71: note: ')' token is here VERSION_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("VERSION_MASK"))); ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:408:68: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] TYPE_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("TYPE_MASK"))); ^~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:23: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:408:68: note: '{' token is here TYPE_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("TYPE_MASK"))); ^~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' { \ ^ binary_protocol_accelerated.c:408:68: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] TYPE_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("TYPE_MASK"))); ^~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' } ^ binary_protocol_accelerated.c:408:68: note: ')' token is here TYPE_MASK = rb_num2ll(rb_const_get(thrift_binary_protocol_class, rb_intern("TYPE_MASK"))); ^~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:459:18: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] rbuf_ivar_id = rb_intern("@rbuf"); ^~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:23: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ binary_protocol_accelerated.c:459:18: note: '{' token is here rbuf_ivar_id = rb_intern("@rbuf"); ^~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' { \ ^ binary_protocol_accelerated.c:459:18: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] rbuf_ivar_id = rb_intern("@rbuf"); ^~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' } ^ binary_protocol_accelerated.c:459:18: note: ')' token is here rbuf_ivar_id = rb_intern("@rbuf"); ^~~~~~~~~~~~~~~~~~ /Users/user/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ 10 errors generated. make: *** [binary_protocol_accelerated.o] Error 1make failed, exit code 2Gem files will remain installed in /Users/user/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/thrift-0.15.0 for inspection. Results logged to /Users/user/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-20/2.7.0/thrift-0.15.0/gem_make.out