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

Jazzy issues on MacOS (M1/ARM) #1259

Closed
0xWDG opened this issue Jul 2, 2021 · 6 comments
Closed

Jazzy issues on MacOS (M1/ARM) #1259

0xWDG opened this issue Jul 2, 2021 · 6 comments
Labels

Comments

@0xWDG
Copy link

0xWDG commented Jul 2, 2021

Hello,

I'm using Jazzy version 0.13.7

Firstly I got the error (from the ffi library)

wesley@Wesleys-MacBook-Air Aurora.swift % jazzy                           
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi/library.rb:275: [BUG] Bus Error at 0x0000000100580000
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

-- Control frame information -----------------------------------------------

which was fixed using

wesley@Wesleys-MacBook-Air Aurora.swift % sudo gem install ffi --platform=ruby 
Password:
Building native extensions. This could take a while...
Successfully installed ffi-1.15.3
Parsing documentation for ffi-1.15.3
Done installing documentation for ffi after 1 seconds
1 gem installed

After that it seems all working, but when jazzy started to generate the HTML output this error message showed up:

...

90% documentation coverage with 66 undocumented symbols
included 698 public or open symbols
skipped 216 private, fileprivate, or internal symbols (use `--min-acl` to specify a different minimum ACL)
building site
building search index
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/search_builder.rb:17: [BUG] Segmentation fault at 0xb9400100a9402448
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

-- Control frame information -----------------------------------------------
c:0011 p:---- s:0065 e:000064 CFUNC  :to_json
c:0010 p:0008 s:0061 e:000059 BLOCK  /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/search_builder.rb:17 [FINISH]
c:0009 p:---- s:0056 e:000055 CFUNC  :open
c:0008 p:0058 s:0050 e:000049 METHOD /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/search_builder.rb:16
c:0007 p:0105 s:0042 e:000041 METHOD /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/doc_builder.rb:132
c:0006 p:0080 s:0031 e:000030 METHOD /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/doc_builder.rb:165
c:0005 p:0127 s:0023 e:000022 METHOD /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/doc_builder.rb:85
c:0004 p:0161 s:0016 e:000015 TOP    /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/bin/jazzy:15 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC  :load
c:0002 p:0109 s:0008 E:000cb0 EVAL   /usr/local/bin/jazzy:23 [FINISH]
c:0001 p:0000 s:0003 E:000e70 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/jazzy:23:in `<main>'
/usr/local/bin/jazzy:23:in `load'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/bin/jazzy:15:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/doc_builder.rb:85:in `build'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/doc_builder.rb:165:in `build_docs_for_sourcekitten_output'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/doc_builder.rb:132:in `build_site'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/search_builder.rb:16:in `build'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/search_builder.rb:16:in `open'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/search_builder.rb:17:in `block in build'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/search_builder.rb:17:in `to_json'
@0xWDG
Copy link
Author

0xWDG commented Jul 2, 2021

Crash report: https://wesleydegroot.nl/ruby.crash

@johnfairh
Copy link
Collaborator

This is a crash in the Ruby runtime, in the C part of the JSON gem. There's a lot of words out there on problems using the system Ruby on Apple Silicon systems -- I don't have one so can't offer any certain advice. Quickly browsing the threads it sounds like some people had luck installing a freshly built Ruby, which is kind of what you did by reinstalling ffi 1.15.3.

@johnfairh johnfairh added the help label Jul 3, 2021
@flatboyseb
Copy link

flatboyseb commented Jul 8, 2021

I've got the same issue.
After the "sudo gem install ffi --platform=ruby" command, I tried "jazzy -h" and the output was correct.
Then I tried "jazzy -v" and the program crashed again.

jazzy -v                                               
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi/library.rb:275: [BUG] Bus Error at 0x0000000104ab8000
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

-- Control frame information -----------------------------------------------
c:0024 p:---- s:0136 e:000135 CFUNC  :attach
c:0023 p:0258 s:0130 e:000129 METHOD /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi/library.rb:275
c:0022 p:0023 s:0110 e:000109 METHOD /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:40
c:0021 p:0012 s:0105 e:000104 CLASS  /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:5
c:0020 p:0007 s:0102 e:000101 CLASS  /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:4
c:0019 p:0007 s:0099 e:000098 TOP    /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:3 [FINISH]
c:0018 p:---- s:0096 e:000095 CFUNC  :require_relative
c:0017 p:0247 s:0091 e:000090 CLASS  /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60
c:0016 p:0007 s:0087 e:000086 CLASS  /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:6
c:0015 p:0014 s:0084 e:000083 TOP    /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:5 [FINISH]
c:0014 p:---- s:0081 e:000080 CFUNC  :require_relative
c:0013 p:0021 s:0076 e:000075 TOP    /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31 [FINISH]
c:0012 p:---- s:0073 e:000072 CFUNC  :require
c:0011 p:0110 s:0068 e:000067 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0010 p:0027 s:0056 e:000055 TOP    /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/doc_builder.rb:4 [FINISH]
c:0009 p:---- s:0053 e:000052 CFUNC  :require
c:0008 p:0110 s:0048 e:000047 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0007 p:0013 s:0036 e:000035 TOP    /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy.rb:2 [FINISH]
c:0006 p:---- s:0033 e:000032 CFUNC  :require
c:0005 p:0110 s:0028 e:000027 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0004 p:0120 s:0016 e:000015 TOP    /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/bin/jazzy:13 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC  :load
c:0002 p:0109 s:0008 E:000890 EVAL   /usr/local/bin/jazzy:23 [FINISH]
c:0001 p:0000 s:0003 E:000920 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/jazzy:23:in `<main>'
/usr/local/bin/jazzy:23:in `load'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/bin/jazzy:13:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.7/lib/jazzy/doc_builder.rb:4:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:6:in `<module:SassC>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60:in `<module:Native>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60:in `require_relative'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:4:in `<module:SassC>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:5:in `<module:Native>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:40:in `attach_function'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi/library.rb:275:in `attach_function'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi/library.rb:275:in `attach'

@johnfairh
Copy link
Collaborator

See ffi/ffi#864 - there’s nothing we can do from the jazzy side.

@flatboyseb
Copy link

@johnfairh Thanks. I followed the instructions from your link and now I can use jazzy!

@johnfairh
Copy link
Collaborator

Closing, answered.

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

No branches or pull requests

3 participants