rubensworks / ScholarMarkdown

A framework for writing markdown-based scholarly articles.
MIT License
41 stars 9 forks source link

Error on bundle install (therubyracer) #33

Closed tfrancart closed 1 year ago

tfrancart commented 1 year ago

When I try to bundle install I get an error

Fetching therubyracer 0.12.3
Installing therubyracer 0.12.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/3.0.0/gems/therubyracer-0.12.3/ext/v8
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230209-58544-inwiw4.rb extconf.rb
checking for -lpthread... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/$(RUBY_BASE_NAME)3.0
    --with-pthread-dir
    --without-pthread-dir
    --with-pthread-include
    --without-pthread-include=${pthread-dir}/include
    --with-pthread-lib
    --without-pthread-lib=${pthread-dir}/lib
    --with-pthreadlib
    --without-pthreadlib
    --enable-debug
    --disable-debug
/var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/class_loader.rb:99:in `find': Tried to load unspecified class: Libv8::Location::Vendor (Psych::DisallowedClass)
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/class_loader.rb:28:in `load'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/to_ruby.rb:426:in `resolve_class'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/to_ruby.rb:215:in `visit_Psych_Nodes_Mapping'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/visitor.rb:30:in `visit'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/visitor.rb:6:in `accept'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/to_ruby.rb:35:in `accept'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/to_ruby.rb:320:in `visit_Psych_Nodes_Document'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/visitor.rb:30:in `visit'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/visitor.rb:6:in `accept'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych/visitors/to_ruby.rb:35:in `accept'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych.rb:334:in `safe_load'
    from /var/lib/gems/3.0.0/gems/psych-4.0.6/lib/psych.rb:369:in `load'
    from /var/lib/gems/3.0.0/gems/libv8-3.16.14.19-x86_64-linux/ext/libv8/location.rb:16:in `block in load!'
    from /var/lib/gems/3.0.0/gems/libv8-3.16.14.19-x86_64-linux/ext/libv8/location.rb:15:in `open'
    from /var/lib/gems/3.0.0/gems/libv8-3.16.14.19-x86_64-linux/ext/libv8/location.rb:15:in `load!'
    from /var/lib/gems/3.0.0/gems/libv8-3.16.14.19-x86_64-linux/lib/libv8.rb:6:in `configure_makefile'
    from extconf.rb:32:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/therubyracer-0.12.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/3.0.0/gems/therubyracer-0.12.3 for inspection.
Results logged to /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/therubyracer-0.12.3/gem_make.out

An error occurred while installing therubyracer (0.12.3), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.12.3' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  scholarmarkdown was resolved to 2.10.1, which depends on
    therubyracer

Any help would be appreciated as I am not a ruby developer and I can't regenrate my already written article (ScholarMarkdown was working 8 months ago on another machine) What could possibly go wrong ? I am on Ubuntu 22, ruby -v gives me

ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]

Thanks for your help

rubensworks commented 1 year ago

scholarmarkdown was resolved to 2.10.1

It looks like you're using an outdated version. We stopped using therubyracer in https://github.com/rubensworks/ScholarMarkdown/commit/aa1f3d1b3c9b9f2a7554662e40df80e6e419e3d2 Updating to the latest scholarmarkdown version should fix the problem.

tfrancart commented 1 year ago

Thank you !