sass / sassc-rails

Integrate SassC-Ruby with Rails!
MIT License
707 stars 104 forks source link

unable to resolve type 'size_t' on Apple Silicon Macs #158

Closed wlipa closed 3 years ago

wlipa commented 3 years ago

We have a rails app which is throwing the following exception on startup on Apple Silicon Macs. The same codebase works on Intel Macs.

$ rails c
Traceback (most recent call last):
    42: from ./bin/rails:4:in `<main>'
    41: from ./bin/rails:4:in `require'
    40: from /Users/user/.gem/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/commands.rb:18:in `<top (required)>'
    39: from /Users/user/.gem/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/command.rb:46:in `invoke'
    38: from /Users/user/.gem/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/command/base.rb:69:in `perform'
    37: from /Users/user/.gem/ruby/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
    36: from /Users/user/.gem/ruby/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
    35: from /Users/user/.gem/ruby/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
    34: from /Users/user/.gem/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/commands/console/console_command.rb:101:in `perform'
    33: from /Users/user/.gem/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
    32: from /Users/user/.gem/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/command/actions.rb:22:in `require_application!'
    31: from /Users/user/.gem/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/command/actions.rb:22:in `require'
    30: from /Users/user/Code/appname/config/application.rb:7:in `<top (required)>'
    29: from /opt/local/lib/ruby2.7/2.7.0/bundler.rb:174:in `require'
    28: from /opt/local/lib/ruby2.7/2.7.0/bundler/runtime.rb:58:in `require'
    27: from /opt/local/lib/ruby2.7/2.7.0/bundler/runtime.rb:58:in `each'
    26: from /opt/local/lib/ruby2.7/2.7.0/bundler/runtime.rb:69:in `block in require'
    25: from /opt/local/lib/ruby2.7/2.7.0/bundler/runtime.rb:69:in `each'
    24: from /opt/local/lib/ruby2.7/2.7.0/bundler/runtime.rb:74:in `block (2 levels) in require'
    23: from /opt/local/lib/ruby2.7/2.7.0/bundler/runtime.rb:74:in `require'
    22: from /Users/user/.gem/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc-rails.rb:3:in `<top (required)>'
    21: from /Users/user/.gem/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc-rails.rb:3:in `require_relative'
    20: from /Users/user/.gem/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc/rails.rb:5:in `<top (required)>'
    19: from /Users/user/.gem/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
    18: from /Users/user/.gem/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
    17: from /Users/user/.gem/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
    16: from /Users/user/.gem/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
    15: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `<top (required)>'
    14: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'
    13: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native.rb:5:in `<top (required)>'
    12: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native.rb:6:in `<module:SassC>'
    11: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native.rb:16:in `<module:Native>'
    10: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native.rb:16:in `require_relative'
     9: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native/sass_value.rb:3:in `<top (required)>'
     8: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native/sass_value.rb:4:in `<module:SassC>'
     7: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native/sass_value.rb:52:in `<module:Native>'
     6: from /Users/user/.gem/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native/sass_value.rb:53:in `<class:SassList>'
     5: from /Users/user/.gem/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/struct.rb:217:in `layout'
     4: from /Users/user/.gem/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/struct.rb:311:in `array_layout'
     3: from /Users/user/.gem/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/struct.rb:271:in `find_field_type'
     2: from /Users/user/.gem/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/struct.rb:277:in `find_type'
     1: from /Users/user/.gem/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/library.rb:589:in `find_type'
/Users/user/.gem/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/types.rb:69:in `find_type': unable to resolve type 'size_t' (TypeError)
ahorek commented 3 years ago

https://github.com/ffi/ffi/issues/841

wlipa commented 3 years ago

Works now with a ffi gem update.