replit / upm

⠕ Universal Package Manager - Python, Node.js, Ruby, Emacs Lisp.
https://repl.it
Other
1.05k stars 89 forks source link

Bundle install is throwing error in case of ruby! #189

Closed gopalmani closed 8 months ago

gopalmani commented 8 months ago

I was trying to compile a jekyll based ruby static site on replit when i run into the issue below. I am unable to run

bundle install 

and getting error below. I am attaching all of the console here :

~/jekyll-website$ bundle install
Fetching gem metadata from https://rubygems.org/............
Resolving dependencies...
Using bundler 2.4.10
Using concurrent-ruby 1.2.2
Using forwardable-extended 2.6.0
Using rb-fsevent 0.11.2
Using rexml 3.2.6
Using http_parser.rb 0.8.0
Using mercenary 0.3.6
Using rouge 3.30.0
Using safe_yaml 1.0.5
Using i18n 1.14.1
Using kramdown 2.4.0
Using pathutil 0.16.2
Using liquid 4.0.4
Using colorator 1.1.0
Using public_suffix 5.0.4
Using addressable 2.8.6
Installing eventmachine 1.2.7 with native extensions
Installing ffi 1.16.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/runner/jekyll-website/.bundle/ruby/3.2.0/gems/eventmachine-1.2.7/ext
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/bin/ruby extconf.rb
checking for -lcrypto... *** 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=/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/bin/$(RUBY_BASE_NAME)
    --with-ssl-dir
    --without-ssl-dir
    --with-ssl-include
    --without-ssl-include=${ssl-dir}/include
    --with-ssl-lib
    --without-ssl-lib=${ssl-dir}/lib
    --with-openssl-dir
    --without-openssl-dir
    --with-openssl-include
    --without-openssl-include=${openssl-dir}/include
    --with-openssl-lib
    --without-openssl-lib=${openssl-dir}/lib
    --with-openssl-config
    --without-openssl-config
    --with-pkg-config
    --without-pkg-config
    --with-crypto-dir
    --without-crypto-dir
    --with-crypto-include
    --without-crypto-include=${crypto-dir}/include
    --with-crypto-lib
    --without-crypto-lib=${crypto-dir}/lib
    --with-cryptolib
    --without-cryptolib
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:490:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.

from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:583:in
`try_link0'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:601:in
`try_link'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:819:in
`try_func'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:1062:in
`block in have_library'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:989:in
`block in checking_for'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:354:in
`block (2 levels) in postpone'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:324:in
`open'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:354:in
`block in postpone'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:324:in
`open'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:350:in
`postpone'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:988:in
`checking_for'
from
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/mkmf.rb:1057:in
`have_library'
    from extconf.rb:8:in `block in check_libs'
    from extconf.rb:8:in `all?'
    from extconf.rb:8:in `check_libs'
    from extconf.rb:95:in `<main>'

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

/home/runner/jekyll-website/.bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/eventmachine-1.2.7/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/home/runner/jekyll-website/.bundle/ruby/3.2.0/gems/eventmachine-1.2.7 for
inspection.
Results logged to
/home/runner/jekyll-website/.bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/eventmachine-1.2.7/gem_make.out

/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/rubygems/ext/builder.rb:120:in
`run'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:28:in
`build'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/rubygems/ext/builder.rb:188:in
`build_extension'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/rubygems/ext/builder.rb:222:in
`block in build_extensions'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/rubygems/ext/builder.rb:219:in
`each'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/rubygems/ext/builder.rb:219:in
`build_extensions'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/rubygems/installer.rb:839:in
`build_extensions'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/rubygems_gem_installer.rb:28:in
`install'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/source/rubygems.rb:200:in
`install'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/installer/gem_installer.rb:54:in
`install'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/installer/parallel_installer.rb:156:in
`do_install'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/installer/parallel_installer.rb:147:in
`block in worker_pool'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/worker.rb:62:in
`apply_func'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/worker.rb:57:in
`block in process_queue'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/worker.rb:54:in
`loop'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/worker.rb:54:in
`process_queue'
/nix/store/cym9m41909x2fihq7xrzv5vivjjf60gj-ruby-3.2.2/lib/ruby/3.2.0/bundler/worker.rb:90:in
`block (2 levels) in create_threads'

An error occurred while installing eventmachine (1.2.7), and Bundler
cannot continue.

In Gemfile:
  no-style-please was resolved to 0.4.7, which depends on
    jekyll-feed was resolved to 0.15.1, which depends on
      jekyll was resolved to 3.9.3, which depends on
        em-websocket was resolved to 0.5.3, which depends on
          eventmachine
Screenshot 2023-12-19 at 12 46 37
blast-hardcheese commented 8 months ago

Hey @gopalmani, this repo is for upm, one of the tools underpinning Replit. Questions like this are better served by https://ask.replit.com/ .

Since you're here though, you may have success adding the following packages to your replit.nix, here you can run nix-editor directly in your repl shell:

$ nix-editor --add pkgs.ruby --add pkgs.clang --add pkgs.openssl

Hopefully this helps!