Project

General

Profile

redmine 4.2.3 installation failure

Added by Mike Welson about 3 years ago

I'm trying to setup redmine 4.2.3 on CentOS 8 with following setup:

ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]
mysql 8.0
rails 6.1

#bundle install --without development test

[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'development test'`, and stop using this flag

..... (ignoring the normal output)

Installing mysql2 0.5.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /usr/local/rvm/gems/ruby-2.7.4/gems/mysql2-0.5.3/ext/mysql2
/usr/local/rvm/rubies/ruby-2.7.4/bin/ruby -I /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0 -r ./siteconf20211012-22460-ngapox.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... 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.

/usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/mkmf.rb:1050:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)
from /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/mkmf.rb:1050:in `collect'
from /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/mkmf.rb:1050:in `find_library'
from extconf.rb:87:in `<main>'

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

/usr/local/rvm/gems/ruby-2.7.4/extensions/x86_64-linux/2.7.0/mysql2-0.5.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.7.4/gems/mysql2-0.5.3 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.7.4/extensions/x86_64-linux/2.7.0/mysql2-0.5.3/gem_make.out

An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.

In Gemfile:
mysql2

the file content for: /usr/local/rvm/gems/ruby-2.7.4/extensions/x86_64-linux/2.7.0/mysql2-0.5.3/mkmf.log ===============================================================================================================

have_func: checking for rb_absint_size()... -------------------- yes

"gcc -o conftest -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0/x86_64-linux -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0/ruby/backward -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -L. -L/usr/local/rvm/rubies/ruby-2.7.4/lib -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L/usr/local/rvm/rubies/ruby-2.7.4/lib -lruby -lm -lc"
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/
end */

"gcc -o conftest -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0/x86_64-linux -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0/ruby/backward -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -L. -L/usr/local/rvm/rubies/ruby-2.7.4/lib -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L/usr/local/rvm/rubies/ruby-2.7.4/lib -lruby -lm -lc"
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: /*top
/
4: extern int t(void);
5: int main(int argc, char *argv)
6: {
7: if (argc > 1000000) {
8: int (
volatile tp)(void)=(int ()(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: int t(void) { void ((*volatile p)()); p = (void ((
)()))rb_absint_size; return !p; }
/* end */


have_func: checking for rb_absint_singlebit_p()... -------------------- yes

"gcc -o conftest -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0/x86_64-linux -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0/ruby/backward -I/usr/local/rvm/rubies/ruby-2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -L. -L/usr/local/rvm/rubies/ruby-2.7.4/lib -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L/usr/local/rvm/rubies/ruby-2.7.4/lib -lruby -lm -lc"
checked program was:
/* begin /
1: #include "ruby.h"
2:
3: /*top
/
4: extern int t(void);
5: int main(int argc, char *argv)
6: {
7: if (argc > 1000000) {
8: int (
volatile tp)(void)=(int ()(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: int t(void) { void ((*volatile p)()); p = (void ((
)()))rb_absint_singlebit_p; return !p; }
/* end */


file content for: /usr/local/rvm/gems/ruby-2.7.4/extensions/x86_64-linux/2.7.0/mysql2-0.5.3/gem_make.out ==================================================================================================================
current directory: /usr/local/rvm/gems/ruby-2.7.4/gems/mysql2-0.5.3/ext/mysql2
/usr/local/rvm/rubies/ruby-2.7.4/bin/ruby -I /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0 -r ./siteconf20211012-32681-tlp3cx.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... 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/local/rvm/rubies/ruby-2.7.4/bin/$(RUBY_BASE_NAME)
--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
/usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/mkmf.rb:1050:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)
from /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/mkmf.rb:1050:in `collect'
from /usr/local/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/mkmf.rb:1050:in `find_library'
from extconf.rb:87:in `<main>'

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

/usr/local/rvm/gems/ruby-2.7.4/extensions/x86_64-linux/2.7.0/mysql2-0.5.3/mkmf.log

extconf failed, exit code 1


Replies (1)

RE: redmine 4.2.3 installation failure - Added by Mike Welson about 3 years ago

the following command resolved the problem: sudo yum install mysql-devel

    (1-1/1)