Closed jorgeas80 closed 5 years ago
It seems that mathematical is not correctly installed. What is the result when you reinstall mathematical?
Same problem. Uninstalled and installed mathematical again. But, like happens with asciidoctor-mathematical, installing it again just takes a couple of seconds. The first time I installed both libraries, it took several minutes. So, I suspect the gem is using compiled packages all the time. And I need to force a recompile.
Anyway, I installed another version of Ruby with rvm, and installed both libraries in the right order. It worked. So, I think it's fine (it was my fault).
I encountered the same error on Ubuntu 16.04.2, reinstalling the packages in a different order does not seem to help. What did help was the following:
sudo ln -s /var/lib/gems/2.3.0/gems/mathematical-1.6.9/ext/mathematical/lib/liblasem.so /usr/lib/liblasem.so
sudo ldconfig
Looks like the path to liblasem.so
is not configured properly for some reason.
The error occurs on Fedora 26, too. But it is an error in mathematical itself. tweenk's @tweenk approach works. Another approach would be change mathematical to hard code the shared object path: (https://github.com/gjtorikian/mathematical/blob/39167da8e364f840d176cedaf3cf68641da39953/ext/mathematical/extconf.rb#L91)
$LIBS << '-Wl,-rpath,#{LASEM_LIB_DIR} -llasem'
Would someone report directly to mathematical?
@gjtorikian Would you please check in mathematical?
I can make that $LIBS
change ('-Wl,-rpath,#{LASEM_LIB_DIR} -llasem'
) if you're certain it works. I don't have a Fedora machine to test with unfortunately.
@gjtorikian I have tested it on Fedora 26 and use LIBS << ' -Wl,-rpath,#{LASEM_LIB_DIR} -llasem'
does fix the problem by embeding the library path in mathematical.so. So would you please make a fix in mathematical?
Update on #32 asciidoctor-mathematical-0.2.2 will not recognize mathematical-1.6.9
Success. PDF renders latexmath and compiles without error.
ln -s /var/lib/gems/2.3.0/gems/mathematical-1.6.9/lib/mathematical/mathematical.so /usr/lib/mathematical.so ln -s /var/lib/gems/2.3.0/gems/mathematical-1.6.9/ext/mathematical/lib/liblasem.so /usr/lib/liblasem.so
I don't have a Fedora machine to test with unfortunately.
This is not really an excuse in the age of Docker:
docker run --entrypoint=bash -it --rm fedora
Yes, which is why this issue was fixed over a year ago.
In that event, a belated :tada: is in order! Thanks!
I installed the package via gem, as proposed. Now, trying to generate a PDF, I'm getting this error (in Ubuntu 16.04 with Ruby 2.3.1p112)
I installed mathematical after asciidoctor-mathematical, and I think that's the problem. I probably need to rebuild asciidoctor-mathematical again, against the installed mathematical package, but I can't do it. I uninstall and install again asciidoctor-mathematical, but it takes just a couple of seconds. So, I guess is using any type of cache. I also tried with gem cleanup, to clean that cache, and with gem build, using the .gem file in this repo, but no effect. Getting the same error.
By the way, the missing file, liblasem.so, already exists:
Any clues?