metanorma / metanorma-standoc

Metanorma for Standoc documents
BSD 2-Clause "Simplified" License
5 stars 2 forks source link

Error: RubyInline-3.12.6/lib/inline.rb:606:in ``': No such file or directory #674

Closed Intelligent2013 closed 2 years ago

Intelligent2013 commented 2 years ago

Source issue: https://github.com/metanorma/metanorma-iso/issues/778#issuecomment-1238239423

I can't generate the XML for ISO 19135 on Windows 7. It seems something wrong in png or RubyInline gems.

Actions: git clone https://github.com/metanorma/iso-19135 cd iso-19135 bundle update cd sources\iso-19135-2021 bundle exec metanorma -t iso -x presentation document.adoc:

Traceback (most recent call last):
        36: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/bin/metanorma:23:in `<main>'
        35: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/bin/metanorma:23:in `load'
        34: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/exe/metanorma:43:in `<top (required)>'
        33: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/exe/metanorma:25:in `block in <top (required)>'
        32: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/cli.rb:34:in `start'
        31: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
        30: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
        29: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
        28: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-hollaback-0.2.1/lib/thor/hollaback.rb:68:in `run'
        27: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
        26: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/cli/command.rb:47:in `compile'
        25: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/cli/command.rb:47:in `each'
        24: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/cli/command.rb:47:in `block in compile'
        23: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/cli/command.rb:240:in `compile_document'
        22: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/cli.rb:17:in `load_flavors'
        21: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/flavor.rb:35:in `load_flavors'
        20: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/flavor.rb:47:in `load_flavors'
        19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/flavor.rb:47:in `each'
        18: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/flavor.rb:48:in `block in load_flavors'
        17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.24/lib/metanorma/flavor.rb:48:in `require'
        16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-iso-2.1.8/lib/metanorma-iso.rb:2:in `<top (required)>'
        15: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-iso-2.1.8/lib/metanorma-iso.rb:2:in `require_relative'
        14: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-iso-2.1.8/lib/metanorma/iso/converter.rb:2:in `<top (required)>'
        13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-iso-2.1.8/lib/metanorma/iso/converter.rb:2:in `require'
        12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-standoc-2.2.2.1/lib/metanorma-standoc.rb:3:in `<top (required)>'
        11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-standoc-2.2.2.1/lib/metanorma-standoc.rb:3:in `require_relative'
        10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-standoc-2.2.2.1/lib/metanorma/standoc/converter.rb:11:in `<top (required)>'
         9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-standoc-2.2.2.1/lib/metanorma/standoc/converter.rb:11:in `require_relative'
         8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-standoc-2.2.2.1/lib/metanorma/standoc/validate.rb:8:in `<top (required)>'
         7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/metanorma-standoc-2.2.2.1/lib/metanorma/standoc/validate.rb:8:in `require'
         6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/png-1.2.1/lib/png.rb:13:in `<top (required)>'
         5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/png-1.2.1/lib/png.rb:14:in `<class:String>'
         4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/RubyInline-3.12.6/lib/inline.rb:854:in `inline'
         3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/RubyInline-3.12.6/lib/inline.rb:606:in `build'
         2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/RubyInline-3.12.6/lib/inline.rb:606:in `chdir'
         1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/RubyInline-3.12.6/lib/inline.rb:606:in `block in build'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/RubyInline-3.12.6/lib/inline.rb:606:in ``': No such file or directory - x86_64-w64-mingw32-gcc -shared  -O3 -fno-fast-math -fstack-protector-strong -I C:/Ruby27-x64/include
/ruby-2.7.0 -I C:/Ruby27-x64/include/ruby-2.7.0/x64-mingw32 -I C:/Ruby27-x64/include "C:/Users/TestUser/.ruby_inline/ruby-2.7.0/Inline_String_9a6686966a50705d94442f198bc2c408.c"   -Wl,--enable-auto-import -LC:/R
uby27-x64/lib -lx64-msvcrt-ruby270 -o "C:/Users/TestUser/.ruby_inline/ruby-2.7.0/Inline_String_9a6686966a50705d94442f198bc2c408.so" -L. -pipe -s -fstack-protector-strong  (Errno::ENOENT)

On Windows 10 (Metanorma just installed):

C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/RubyInline-3.12.6/lib/inline.rb:606:in ``': No such file or directory - gcc -shared  -O3 -fno-fast-math -fstack-protector-strong -I C:/tools/ruby31/include/ruby-3.1.0 -I C:/tools/ruby31/include/ruby-3.1.0/x64-mingw-ucrt -I C:/tools/ruby31/include "C:/Users/TestUser/.ruby_inline/ruby-3.1.0/Inline_String_9a6686966a50705d94442f198bc2c408.c"   -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  (Errno::ENOENT)
from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/RubyInline-3.12.6/lib/inline.rb:606:in `block in build'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/RubyInline-3.12.6/lib/inline.rb:606:in `chdir'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/RubyInline-3.12.6/lib/inline.rb:606:in `build'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/RubyInline-3.12.6/lib/inline.rb:854:in `inline'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/png-1.2.1/lib/png.rb:14:in `<class:String>'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/gems/png-1.2.1/lib/png.rb:13:in `<top (required)>'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/metanorma-standoc-6e12b5f77fd5/lib/metanorma/standoc/validate.rb:8:in `require'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/metanorma-standoc-6e12b5f77fd5/lib/metanorma/standoc/converter.rb:11:in `require_relative'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/metanorma-standoc-6e12b5f77fd5/lib/metanorma/standoc/converter.rb:11:in `<top (required)>'
from C:/tools/ruby31/lib/ruby/gems/3.1.0/bundler/gems/metanorma-standoc-6e12b5f77fd5/lib/metanorma/standoc/validate.rb:8:in `<top (required)>'
opoudjis commented 2 years ago

It's an issue with PNG validation or data uris on Windows, https://github.com/metanorma/metanorma-standoc/issues/672

I'm no longer crashing if PNG fails to validate, so upcoming hotfix should address this.

ronaldtse commented 2 years ago

We do not need the "png" gem which uses rubyinline, which is crashing.

I believe @opoudjis has already removed the png gem and we can close this issue.

opoudjis commented 2 years ago

@Intelligent2013 We've finally released. Please confirm?

Intelligent2013 commented 2 years ago

No error Error: RubyInline. Thanks!