issue when trying to install redmine-5.1.5 on debian 12
Added by Adrian Meier 3 days ago
Hello all
I'm stuck when trying to install a new redmine instance, due to mysql2 gem :
I'm trying ruby 3.2.6 (2024-10-30 revision 63aeb018eb) [x86_64-linux] on Debian 12 and I get this error when trying to install mysql2.
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Installing mysql2 0.5.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /opt/redmine-5.1.5/vendor/bundle/ruby/3.2.0/gems/mysql2-0.5.6/ext/mysql2
/root/.rbenv/versions/3.2.6/bin/ruby extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_gc_mark_movable()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enc_interned_str() in ruby.h... 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=/root/.rbenv/versions/3.2.6/bin/$(RUBY_BASE_NAME)
--with-openssl-dir
--without-openssl-dir
--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
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/mkmf.rb:1083:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)
paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
^^^^^^
from /root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/mkmf.rb:1083:in `each'
from /root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/mkmf.rb:1083:in `flat_map'
from /root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/mkmf.rb:1083:in `find_library'
from extconf.rb:131:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/opt/redmine-5.1.5/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/mysql2-0.5.6/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /opt/redmine-5.1.5/vendor/bundle/ruby/3.2.0/gems/mysql2-0.5.6 for inspection.
Results logged to /opt/redmine-5.1.5/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/mysql2-0.5.6/gem_make.out
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/ext/builder.rb:119:in `run'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/ext/builder.rb:187:in `build_extension'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/ext/builder.rb:221:in `block in build_extensions'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in `each'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in `build_extensions'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/rubygems/installer.rb:846:in `build_extensions'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/rubygems_gem_installer.rb:28:in `install'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/source/rubygems.rb:202:in `install'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/installer/gem_installer.rb:54:in `install'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/installer/parallel_installer.rb:156:in `do_install'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/installer/parallel_installer.rb:147:in `block in worker_pool'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/worker.rb:62:in `apply_func'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/worker.rb:57:in `block in process_queue'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/worker.rb:54:in `loop'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/worker.rb:54:in `process_queue'
/root/.rbenv/versions/3.2.6/lib/ruby/3.2.0/bundler/worker.rb:90:in `block (2 levels) in create_threads'
An error occurred while installing mysql2 (0.5.6), and Bundler cannot continue.
In Gemfile:
mysql2
The content of mkmf.log is not helping much:
have_func: checking for rb_absint_size()... -------------------- yes
LD_LIBRARY_PATH=.:/root/.rbenv/versions/3.2.6/lib "gcc -o conftest -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/x86_64-linux -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/ruby/backward -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/root/.rbenv/versions/3.2.6/lib -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L/root/.rbenv/versions/3.2.6/lib -lruby -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
LD_LIBRARY_PATH=.:/root/.rbenv/versions/3.2.6/lib "gcc -o conftest -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/x86_64-linux -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/ruby/backward -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/root/.rbenv/versions/3.2.6/lib -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L/root/.rbenv/versions/3.2.6/lib -lruby -lm -lpthread -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
LD_LIBRARY_PATH=.:/root/.rbenv/versions/3.2.6/lib "gcc -o conftest -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/x86_64-linux -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/ruby/backward -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/root/.rbenv/versions/3.2.6/lib -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L/root/.rbenv/versions/3.2.6/lib -lruby -lm -lpthread -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 */
--------------------
have_func: checking for rb_gc_mark_movable()... -------------------- yes
LD_LIBRARY_PATH=.:/root/.rbenv/versions/3.2.6/lib "gcc -o conftest -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/x86_64-linux -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/ruby/backward -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/root/.rbenv/versions/3.2.6/lib -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L/root/.rbenv/versions/3.2.6/lib -lruby -lm -lpthread -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_gc_mark_movable; return !p; }
/* end */
--------------------
have_func: checking for rb_wait_for_single_fd()... -------------------- yes
LD_LIBRARY_PATH=.:/root/.rbenv/versions/3.2.6/lib "gcc -o conftest -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/x86_64-linux -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/ruby/backward -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/root/.rbenv/versions/3.2.6/lib -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L/root/.rbenv/versions/3.2.6/lib -lruby -lm -lpthread -lc"
conftest.c: In function 't':
conftest.c:14:57: error: 'rb_wait_for_single_fd' undeclared (first use in this function)
14 | int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_wait_for_single_fd; return !p; }
| ^~~~~~~~~~~~~~~~~~~~~
conftest.c:14:57: note: each undeclared identifier is reported only once for each function it appears in
At top level:
cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-constant-logical-operand' may have been intended to silence earlier diagnostics
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_wait_for_single_fd; return !p; }
/* end */
LD_LIBRARY_PATH=.:/root/.rbenv/versions/3.2.6/lib "gcc -o conftest -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/x86_64-linux -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/ruby/backward -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/root/.rbenv/versions/3.2.6/lib -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L/root/.rbenv/versions/3.2.6/lib -lruby -lm -lpthread -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: extern void rb_wait_for_single_fd();
15: int t(void) { rb_wait_for_single_fd(); return 0; }
/* end */
--------------------
have_func: checking for rb_enc_interned_str() in ruby.h... -------------------- yes
LD_LIBRARY_PATH=.:/root/.rbenv/versions/3.2.6/lib "gcc -o conftest -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/x86_64-linux -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/ruby/backward -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/root/.rbenv/versions/3.2.6/lib -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L/root/.rbenv/versions/3.2.6/lib -lruby -lm -lpthread -lc"
conftest.c: In function 't':
conftest.c:16:57: error: 'rb_enc_interned_str' undeclared (first use in this function); did you mean 'rb_interned_str'?
16 | int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enc_interned_str; return !p; }
| ^~~~~~~~~~~~~~~~~~~
| rb_interned_str
conftest.c:16:57: note: each undeclared identifier is reported only once for each function it appears in
At top level:
cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-constant-logical-operand' may have been intended to silence earlier diagnostics
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: int (* volatile tp)(void)=(int (*)(void))&t;
11: printf("%d", (*tp)());
12: }
13:
14: return !!argv[argc];
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enc_interned_str; return !p; }
/* end */
LD_LIBRARY_PATH=.:/root/.rbenv/versions/3.2.6/lib "gcc -o conftest -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/x86_64-linux -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0/ruby/backward -I/root/.rbenv/versions/3.2.6/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L/root/.rbenv/versions/3.2.6/lib -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/root/.rbenv/versions/3.2.6/lib -L/root/.rbenv/versions/3.2.6/lib -lruby -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: int (* volatile tp)(void)=(int (*)(void))&t;
11: printf("%d", (*tp)());
12: }
13:
14: return !!argv[argc];
15: }
16: extern void rb_enc_interned_str();
17: int t(void) { rb_enc_interned_str(); return 0; }
/* end */
--------------------