asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
49 stars 44 forks source link

liblasem.so error: cannot open shared object file #28

Closed aurabindo closed 7 years ago

aurabindo commented 7 years ago

I tried compiling the sample.adoc in the repo with the command asciidoctor-pdf -r asciidoctor-mathematical -o test.pdf sample.adoc --trace, and I get the following error:

/usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require': liblasem.so: cannot open shared object file: No such file or directory - /usr/lib/ruby/gems/2.4.0/gems/mathematical-1.6.8/lib/mathematical/mathematical.so (LoadError)
    from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/lib/ruby/gems/2.4.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /usr/lib/ruby/gems/2.4.0/gems/mathematical-1.6.8/lib/mathematical.rb:1:in `<top (required)>'
    from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/lib/ruby/gems/2.4.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-mathematical-0.2.2/lib/asciidoctor-mathematical/extension.rb:23:in `process'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor/document.rb:479:in `[]'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor/document.rb:479:in `block in parse'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor/document.rb:478:in `each'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor/document.rb:478:in `parse'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb:1347:in `load'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb:1465:in `convert'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/invoker.rb:95:in `block in invoke!'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/invoker.rb:87:in `each'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/invoker.rb:87:in `invoke!'
    from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-pdf-1.5.0.alpha.15/bin/asciidoctor-pdf:31:in `<top (required)>'
    from /usr/bin/asciidoctor-pdf:22:in `load'
    from /usr/bin/asciidoctor-pdf:22:in `<main>'

However, I do have liblasem.so, since whereis liblasem.so returns liblasem: /usr/local/lib/liblasem.so

Also, file /usr/lib/ruby/gems/2.4.0/gems/mathematical-1.6.8/lib/mathematical/mathematical.so gives:

/usr/lib/ruby/gems/2.4.0/gems/mathematical-1.6.8/lib/mathematical/mathematical.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=e6486c2bae1ffc8f3c5793ae3ef32e1c8c1cc068, not stripped, with debug_info

Asciidoctor-pdf verison:

Asciidoctor PDF 1.5.0.alpha.15 using Asciidoctor 1.5.5 [http://asciidoctor.org]
Runtime Environment (ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

Asciidoctor version:

Asciidoctor 1.5.5 [http://asciidoctor.org]
Runtime Environment (ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

Kindly suggest some workarounds

ProgramFan commented 7 years ago

Would you please try reinstall mathematical?

aurabindo commented 7 years ago

I did, still getting same, error. During installation, I have lots of warnings like:

unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-1.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-2.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-3.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/buildrel-1.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/issue877.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/issue937.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overbrace-1.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overbracket-1.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overset-1.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/sideset-1.html, skipping
unknown encoding name "'application/x-tex'>" for ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/stackrel-1.html, skipping

Full log here: https://paste.gnome.org/pwamjtvat

ProgramFan commented 7 years ago

What is the result if you export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH before running asciidoctor-pdf?

ProgramFan commented 7 years ago

I am also curious why your asciidoctor locates in /usr/lib while your liblasem locates in /usr/local/lib, shouldn't it be in /usr/lib too?

aurabindo commented 7 years ago

@ProgramFan Surprisingly setting the LD_LIBRARY_PATH like you suggested fixed the issue! I'm confused, my ldconfig for /usr/local/lib is not being respected. There are other libs I locally installed as well, and they work well. Its just for liblasem.so that it doesnt seem to work.

Thanks!

ProgramFan commented 7 years ago

Glad to see it solved. 😄