misshie / bioruby-ucsc-api

Ruby UCSC API: An API for the UCSC Genome Database
MIT License
19 stars 7 forks source link

Can't install with Ruby 3.1 #10

Closed kojix2 closed 2 years ago

kojix2 commented 2 years ago

Hi.

The installation of mysql2 seems to fail.

At this time, it is Ruby 2.4. Is it similar? https://github.com/misshie/bioruby-ucsc-api/issues/6

Here is the error log.

Fetching activemodel-4.2.11.3.gem
Fetching tzinfo-1.2.9.gem
Fetching arel-6.0.4.gem
Fetching activesupport-4.2.11.3.gem
Fetching i18n-0.9.5.gem
Fetching safe_attributes-1.0.10.gem
Fetching activerecord-4.2.11.3.gem
Fetching mysql2-0.4.10.gem
Fetching bio-ucsc-api-0.6.5.gem
Fetching bio-genomic-interval-0.1.2.gem
Fetching activerecord-deprecated_finders-1.0.4.gem
Successfully installed arel-6.0.4
Successfully installed tzinfo-1.2.9
Successfully installed i18n-0.9.5
Successfully installed activesupport-4.2.11.3
Successfully installed activemodel-4.2.11.3
Successfully installed activerecord-4.2.11.3
Successfully installed safe_attributes-1.0.10
Building native extensions. This could take a while...
ERROR:  Error installing bio-ucsc-api:
    ERROR: Failed to build gem native extension.

    current directory: /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mysql2-0.4.10/ext/mysql2
/home/kojix2/.rbenv/versions/3.1.0/bin/ruby -I /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0 -r ./siteconf20220114-62428-kqri37.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for rb_big_cmp()... 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=/home/kojix2/.rbenv/versions/3.1.0/bin/$(RUBY_BASE_NAME)
    --with-ruby-dir
    --without-ruby-dir
    --with-ruby-include
    --without-ruby-include=${ruby-dir}/include
    --with-ruby-lib
    --without-ruby-lib=${ruby-dir}/lib
    --with-mysql-dir
    --without-mysql-dir
    --with-mysql-include
    --without-mysql-include=${mysql-dir}/include
    --with-mysql-lib
    --without-mysql-lib=${mysql-dir}/lib
    --with-mysql-config
    --without-mysql-config
    --with-mysqlclient-dir
    --without-mysqlclient-dir
    --with-mysqlclient-include
    --without-mysqlclient-include=${mysqlclient-dir}/include
    --with-mysqlclient-lib
    --without-mysqlclient-lib=${mysqlclient-dir}/lib
    --with-mysqlclientlib
    --without-mysqlclientlib
/home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0/mkmf.rb:1086:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)

    paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
                                       ^^^^^^
    from /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0/mkmf.rb:1086:in `each'
    from /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0/mkmf.rb:1086:in `flat_map'
    from /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0/mkmf.rb:1086:in `find_library'
    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/kojix2/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/mysql2-0.4.10/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mysql2-0.4.10 for inspection.
Results logged to /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/mysql2-0.4.10/gem_make.out
kojix2 commented 2 years ago

I'm sorry. It might just be a misunderstanding. It may be because mysql is not installed in my environment. I'll close it.