Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem install unicode_plot fails for ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux] #65

Open
rubyFeedback opened this issue Jan 21, 2025 · 1 comment

Comments

@rubyFeedback
Copy link

gem install unicode_plot

leads to:

Building native extensions. This could take a while...
ERROR:  Error installing unicode_plot:
        ERROR: Failed to build gem native extension.

    current directory: /root/.gem/gems/enumerable-statistics-2.0.8/ext/enumerable/statistics/extension
/usr/bin/ruby extconf.rb
checking for struct RRational... *** 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=${opt-dir}/include
        --without-opt-include
        --with-opt-lib=${opt-dir}/lib
        --without-opt-lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/$(RUBY_BASE_NAME)
/usr/lib/ruby/3.4.0/mkmf.rb:528:in 'MakeMakefile#try_do': The compiler failed to generate an executable     file. (RuntimeError)
You have to install development tools first.

        from /usr/lib/ruby/3.4.0/mkmf.rb:655:in 'MakeMakefile#try_compile'
        from /usr/lib/ruby/3.4.0/mkmf.rb:1350:in 'MakeMakefile#try_type'
        from /usr/lib/ruby/3.4.0/mkmf.rb:1378:in 'block in MakeMakefile#have_type'
        from /usr/lib/ruby/3.4.0/mkmf.rb:1070:in 'block in MakeMakefile#checking_for'
        from /usr/lib/ruby/3.4.0/mkmf.rb:370:in 'block (2 levels) in MakeMakefile::Logging.postpone'
        from /usr/lib/ruby/3.4.0/mkmf.rb:340:in 'MakeMakefile::Logging.open'
        from /usr/lib/ruby/3.4.0/mkmf.rb:370:in 'block in MakeMakefile::Logging.postpone'
        from /usr/lib/ruby/3.4.0/mkmf.rb:340:in 'MakeMakefile::Logging.open'
        from /usr/lib/ruby/3.4.0/mkmf.rb:366:in 'MakeMakefile::Logging.postpone'
        from /usr/lib/ruby/3.4.0/mkmf.rb:1069:in 'MakeMakefile#checking_for'
        from /usr/lib/ruby/3.4.0/mkmf.rb:1377:in 'MakeMakefile#have_type'
        from extconf.rb:3:in '<main>'

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

  /root/.gem/extensions/x86_64-linux/3.4.0-static/enumerable-statistics-2.0.8/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /root/.gem/gems/enumerable-statistics-2.0.8 for inspection.
Results logged to /root/.gem/extensions/x86_64-linux/3.4.0-static/enumerable-statistics-    2.0.8/gem_make.out

Could the main README mention what else is needed here? I tend to check github README first and often can not see what is going on and why something failed to install when mkmf.rb is involved.

@kou
Copy link
Member

kou commented Jan 21, 2025

What is your platform?

BTW, the error message has a hint:

/usr/lib/ruby/3.4.0/mkmf.rb:528:in 'MakeMakefile#try_do': The compiler failed to generate an executable     file. (RuntimeError)
You have to install development tools first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants