Skip to content

3.3.4 fails to init due to mysql2 gem #78

Closed
@santiagocardin

Description

After a container restart today our Redmine 3.3.4 with MySQL backend is breaking due to the following error:


current directory: /usr/local/bundle/gems/mysql2-0.4.8/ext/mysql2
/usr/local/bin/ruby -r ./siteconf20170711-7-l14zoc.rb extconf.rb
checking for rb_absint_size()... *** 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/local/bin/$(RUBY_BASE_NAME)
/usr/local/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to
generate an executable file. (RuntimeError)
You have to install development tools first.
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:556:in `try_link'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:735:in `try_func'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:1020:in `block in have_func'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:321:in `open'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:321:in `open'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'
        from /usr/local/lib/ruby/2.2.0/mkmf.rb:1019:in `have_func'
        from extconf.rb:26:in `<main>'

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

  /usr/local/bundle/extensions/x86_64-linux/2.2.0/mysql2-0.4.8/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/bundle/gems/mysql2-0.4.8 for
inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux/2.2.0/mysql2-0.4.8/gem_make.out

An error occurred while installing mysql2 (0.4.8), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.4.8'` succeeds before bundling.

In Gemfile:
  mysql2

Redmine 3.3.3 (which uses a different myql2 gem version) still boots properly.

Seems mysql2 0.4.8 gem version has been recently released and is being now used by Redmine ("~> 0.4.6"). A Dockerfile update my be needed to include a new MySQL client dependency.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions