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

Support for ruby 2.7.4p191 [x86_64-darwin21] #164

Open
iain opened this issue Oct 27, 2021 · 2 comments
Open

Support for ruby 2.7.4p191 [x86_64-darwin21] #164

iain opened this issue Oct 27, 2021 · 2 comments

Comments

@iain
Copy link

iain commented Oct 27, 2021

I'm having trouble installing liquid-c on Ruby 2.7.4 on macOS Monterey.

It installs correctly on Ruby 3.0.2 on the same machine.

I've tried switching to using the main branch on github as a source in bundler and that works too.

I have completely reinstalled xcode, homebrew and ruby (via asdf), hoping that would help, but to no avail.

Some output from gem env:

RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.29
  - RUBY VERSION: 2.7.4 (2021-07-07 patchlevel 191) [x86_64-darwin21]
  - INSTALLATION DIRECTORY: /Users/iain/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0
  - USER INSTALLATION DIRECTORY: /Users/iain/.gem/ruby/2.7.0
  - RUBY EXECUTABLE: /Users/iain/.asdf/installs/ruby/2.7.4/bin/ruby
  - GIT EXECUTABLE: /usr/local/bin/git
  - EXECUTABLE DIRECTORY: /Users/iain/.asdf/installs/ruby/2.7.4/bin
  - SPEC CACHE DIRECTORY: /Users/iain/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/iain/.asdf/installs/ruby/2.7.4/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-darwin-21

Below is the full output of gem install liquid-c:

Building native extensions. This could take a while...
ERROR:  Error installing liquid-c:
	ERROR: Failed to build gem native extension.

    current directory: /Users/iain/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/liquid-c-4.0.0/ext/liquid_c
/Users/iain/.asdf/installs/ruby/2.7.4/bin/ruby -I /Users/iain/.asdf/installs/ruby/2.7.4/lib/ruby/site_ruby/2.7.0 -r ./siteconf20211027-38778-123e3iq.rb extconf.rb
creating Makefile

current directory: /Users/iain/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/liquid-c-4.0.0/ext/liquid_c
make DESTDIR\= clean

current directory: /Users/iain/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/liquid-c-4.0.0/ext/liquid_c
make DESTDIR\=
compiling block.c
block.c:128:48: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_raise_missing_variable_terminator = rb_intern("raise_missing_variable_terminator");
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:128:48: note: '{' token is here
    intern_raise_missing_variable_terminator = rb_intern("raise_missing_variable_terminator");
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:128:48: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_raise_missing_variable_terminator = rb_intern("raise_missing_variable_terminator");
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:128:48: note: ')' token is here
    intern_raise_missing_variable_terminator = rb_intern("raise_missing_variable_terminator");
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:129:43: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_raise_missing_tag_terminator = rb_intern("raise_missing_tag_terminator");
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:129:43: note: '{' token is here
    intern_raise_missing_tag_terminator = rb_intern("raise_missing_tag_terminator");
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:129:43: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_raise_missing_tag_terminator = rb_intern("raise_missing_tag_terminator");
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:129:43: note: ')' token is here
    intern_raise_missing_tag_terminator = rb_intern("raise_missing_tag_terminator");
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:130:23: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_nodelist = rb_intern("@nodelist");
                      ^~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:130:23: note: '{' token is here
    intern_nodelist = rb_intern("@nodelist");
                      ^~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:130:23: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_nodelist = rb_intern("@nodelist");
                      ^~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:130:23: note: ')' token is here
    intern_nodelist = rb_intern("@nodelist");
                      ^~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:131:20: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_blank = rb_intern("@blank");
                   ^~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:131:20: note: '{' token is here
    intern_blank = rb_intern("@blank");
                   ^~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:131:20: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_blank = rb_intern("@blank");
                   ^~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:131:20: note: ')' token is here
    intern_blank = rb_intern("@blank");
                   ^~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:132:23: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_is_blank = rb_intern("blank?");
                      ^~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:132:23: note: '{' token is here
    intern_is_blank = rb_intern("blank?");
                      ^~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:132:23: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_is_blank = rb_intern("blank?");
                      ^~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:132:23: note: ')' token is here
    intern_is_blank = rb_intern("blank?");
                      ^~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:133:20: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_clear = rb_intern("clear");
                   ^~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:133:20: note: '{' token is here
    intern_clear = rb_intern("clear");
                   ^~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:133:20: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_clear = rb_intern("clear");
                   ^~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:133:20: note: ')' token is here
    intern_clear = rb_intern("clear");
                   ^~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:134:30: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_registered_tags = rb_intern("registered_tags");
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:134:30: note: '{' token is here
    intern_registered_tags = rb_intern("registered_tags");
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:134:30: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_registered_tags = rb_intern("registered_tags");
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:134:30: note: ')' token is here
    intern_registered_tags = rb_intern("registered_tags");
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:135:20: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_parse = rb_intern("parse");
                   ^~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:135:20: note: '{' token is here
    intern_parse = rb_intern("parse");
                   ^~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:135:20: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_parse = rb_intern("parse");
                   ^~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:135:20: note: ')' token is here
    intern_parse = rb_intern("parse");
                   ^~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:136:30: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_square_brackets = rb_intern("[]");
                             ^~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:136:30: note: '{' token is here
    intern_square_brackets = rb_intern("[]");
                             ^~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
block.c:136:30: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_square_brackets = rb_intern("[]");
                             ^~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
block.c:136:30: note: ')' token is here
    intern_square_brackets = rb_intern("[]");
                             ^~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                                                       ^
block.c:137:30: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    intern_set_line_number = rb_intern("line_number=");
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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))) : \
                      ^
block.c:137:30: note: '{' token is here
    intern_set_line_number = rb_intern("line_number=");
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/iain/.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/iain/.asdf/installs/ruby/2.7.4/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [block.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/iain/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/liquid-c-4.0.0 for inspection.
Results logged to /Users/iain/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-21/2.7.0/liquid-c-4.0.0/gem_make.out
thisisdano added a commit to uswds/uswds-site that referenced this issue Nov 16, 2021
This solves an installation issue I was having with liquid-c similar to Shopify/liquid-c#164
@ianeli1
Copy link

ianeli1 commented Nov 19, 2021

Issue appears to be related to ruby/ruby#4504

Switching to llvm@11 solved it.

@ankit-prajapati-26
Copy link

ankit-prajapati-26 commented Nov 30, 2021

Getting same issue, I am able to install liquid-c with following command

gem install liquid-c -- --with-cflags="-Wno-compound-token-split-by-macro" 

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

3 participants