mysql2 icon indicating copy to clipboard operation
mysql2 copied to clipboard

[Install][Redmine][Win] An error occurred while installing mysql2 (0.5.6), and Bundler cannot continue.

Open gajet5 opened this issue 1 year ago • 9 comments

PS C:\redmine> bundle install
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:
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/mysql2-0.5.6/ext/mysql2
C:/Ruby32-x64/bin/ruby.exe 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=C:/Ruby32-x64/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
C:/Ruby32-x64/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 C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `each'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `flat_map'
        from C:/Ruby32-x64/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:

C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.6/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/mysql2-0.5.6 for inspection.
Results logged to
C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.6/gem_make.out

  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:119:in `run'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:187:in `build_extension'
C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:221:in `block in
build_extensions'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in `each'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in `build_extensions'
  C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/installer.rb:846:in `build_extensions'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/rubygems_gem_installer.rb:76:in
`build_extensions'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/source/rubygems.rb:205:in
`install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/installer/gem_installer.rb:54:in
`install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/installer/parallel_installer.rb:132:in
`do_install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:62:in
`apply_func'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:57:in
`block in process_queue'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:54:in
`loop'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/bundler/worker.rb:54:in
`process_queue'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.6/lib/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

In to C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.6/mkmf.log

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

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Ruby32-x64\bin;C:\Users\gajet\AppData\Local\Microsoft\WindowsApps;C:\Users\gajet\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gajet\AppData\Local\GitHubDesktop\bin;C:\Users\gajet\.dotnet\tools;C:\Users\gajet\AppData\Roaming\npm" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return !!argv[argc];
8: }
/* end */

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Ruby32-x64\bin;C:\Users\gajet\AppData\Local\Microsoft\WindowsApps;C:\Users\gajet\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gajet\AppData\Local\GitHubDesktop\bin;C:\Users\gajet\.dotnet\tools;C:\Users\gajet\AppData\Roaming\npm" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: 
 6: /*top*/
 7: extern int t(void);
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     int (* volatile tp)(void)=(int (*)(void))&t;
12:     printf("%d", (*tp)());
13:   }
14: 
15:   return !!argv[argc];
16: }
17: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_absint_size; return !p; }
/* end */

--------------------

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

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Ruby32-x64\bin;C:\Users\gajet\AppData\Local\Microsoft\WindowsApps;C:\Users\gajet\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gajet\AppData\Local\GitHubDesktop\bin;C:\Users\gajet\.dotnet\tools;C:\Users\gajet\AppData\Roaming\npm" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: 
 6: /*top*/
 7: extern int t(void);
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     int (* volatile tp)(void)=(int (*)(void))&t;
12:     printf("%d", (*tp)());
13:   }
14: 
15:   return !!argv[argc];
16: }
17: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_absint_singlebit_p; return !p; }
/* end */

--------------------

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

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Ruby32-x64\bin;C:\Users\gajet\AppData\Local\Microsoft\WindowsApps;C:\Users\gajet\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gajet\AppData\Local\GitHubDesktop\bin;C:\Users\gajet\.dotnet\tools;C:\Users\gajet\AppData\Roaming\npm" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: 
 6: /*top*/
 7: extern int t(void);
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     int (* volatile tp)(void)=(int (*)(void))&t;
12:     printf("%d", (*tp)());
13:   }
14: 
15:   return !!argv[argc];
16: }
17: 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

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Ruby32-x64\bin;C:\Users\gajet\AppData\Local\Microsoft\WindowsApps;C:\Users\gajet\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gajet\AppData\Local\GitHubDesktop\bin;C:\Users\gajet\.dotnet\tools;C:\Users\gajet\AppData\Roaming\npm" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
conftest.c: In function 't':
conftest.c:17:57: error: 'rb_wait_for_single_fd' undeclared (first use in this function)
   17 | int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_wait_for_single_fd; return !p; }
      |                                                         ^~~~~~~~~~~~~~~~~~~~~
conftest.c:17:57: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: 
 6: /*top*/
 7: extern int t(void);
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     int (* volatile tp)(void)=(int (*)(void))&t;
12:     printf("%d", (*tp)());
13:   }
14: 
15:   return !!argv[argc];
16: }
17: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_wait_for_single_fd; return !p; }
/* end */

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Ruby32-x64\bin;C:\Users\gajet\AppData\Local\Microsoft\WindowsApps;C:\Users\gajet\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gajet\AppData\Local\GitHubDesktop\bin;C:\Users\gajet\.dotnet\tools;C:\Users\gajet\AppData\Roaming\npm" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: 
 6: /*top*/
 7: extern int t(void);
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     int (* volatile tp)(void)=(int (*)(void))&t;
12:     printf("%d", (*tp)());
13:   }
14: 
15:   return !!argv[argc];
16: }
17: extern void rb_wait_for_single_fd();
18: int t(void) { rb_wait_for_single_fd(); return 0; }
/* end */

--------------------

have_func: checking for rb_enc_interned_str() in ruby.h... -------------------- yes

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Ruby32-x64\bin;C:\Users\gajet\AppData\Local\Microsoft\WindowsApps;C:\Users\gajet\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gajet\AppData\Local\GitHubDesktop\bin;C:\Users\gajet\.dotnet\tools;C:\Users\gajet\AppData\Roaming\npm" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
conftest.c: In function 't':
conftest.c:18:57: error: 'rb_enc_interned_str' undeclared (first use in this function); did you mean 'rb_interned_str'?
   18 | int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enc_interned_str; return !p; }
      |                                                         ^~~~~~~~~~~~~~~~~~~
      |                                                         rb_interned_str
conftest.c:18:57: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: #include <ruby.h>
 6: 
 7: /*top*/
 8: extern int t(void);
 9: int main(int argc, char **argv)
10: {
11:   if (argc > 1000000) {
12:     int (* volatile tp)(void)=(int (*)(void))&t;
13:     printf("%d", (*tp)());
14:   }
15: 
16:   return !!argv[argc];
17: }
18: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enc_interned_str; return !p; }
/* end */

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Ruby32-x64\bin;C:\Users\gajet\AppData\Local\Microsoft\WindowsApps;C:\Users\gajet\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gajet\AppData\Local\GitHubDesktop\bin;C:\Users\gajet\.dotnet\tools;C:\Users\gajet\AppData\Roaming\npm" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: #include <ruby.h>
 6: 
 7: /*top*/
 8: extern int t(void);
 9: int main(int argc, char **argv)
10: {
11:   if (argc > 1000000) {
12:     int (* volatile tp)(void)=(int (*)(void))&t;
13:     printf("%d", (*tp)());
14:   }
15: 
16:   return !!argv[argc];
17: }
18: extern void rb_enc_interned_str();
19: int t(void) { rb_enc_interned_str(); return 0; }
/* end */
--------------------


gajet5 avatar Mar 15 '24 12:03 gajet5

This solution: https://github.com/brianmario/mysql2/issues/1210#issuecomment-965862944 does not work, it leads to an error: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8.

gajet5 avatar Mar 18 '24 08:03 gajet5

Have you solved this problem? I also encountered the same problem

BraveWhite avatar May 21 '24 05:05 BraveWhite

No, I haven't found a solution. I'm currently dealing with another problem, but this one is still hanging on me. I'm thinking of installing ubuntu and trying to deploy it.

gajet5 avatar May 21 '24 06:05 gajet5

I have the same issue on Ubuntu ! Please see at #1369

Any update ?

simogeo avatar Jun 04 '24 12:06 simogeo

I have the same issue on Ubuntu ! Please see at #1369

Any update ?

Windows, not ubuntu.

gajet5 avatar Jun 05 '24 03:06 gajet5

Indeed but the problem is similar ...

By the way, as you can see, I've solved it by modifying the Gemfile to specify the gem mysql2 version, which worked

simogeo avatar Jun 05 '24 06:06 simogeo

I have the same problem in windows 10: After the error for bundle install

Run: bundle exec rake generate_secret_token

c:\redmine-5.1.3>bundle exec rake generate_secret_token rake aborted! Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'. Gem Load Error is: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8. Backtrace for gem load error is: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in require' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in block in require' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:299:in load_dependency' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in require' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mysql2-0.5.6/lib/mysql2.rb:36:in <top (required)>' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:60:in require' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:60:in block (2 levels) in require' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:55:in each' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:55:in block in require' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:44:in each' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:44:in require' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler.rb:212:in require' c:/redmine-5.1.3/config/application.rb:18:in <top (required)>' c:/redmine-5.1.3/Rakefile:5:in require' c:/redmine-5.1.3/Rakefile:5:in <top (required)>' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/rake_module.rb:29:in load' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/rake_module.rb:29:in load_rakefile' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:740:in raw_load_rakefile' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:126:in block in load_rakefile' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:214:in standard_exception_handling' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:125:in load_rakefile' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:82:in block in run' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:214:in standard_exception_handling' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:80:in run' C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/exe/rake:27:in <top (required)>' C:/Ruby31-x64/bin/rake:33:in load' C:/Ruby31-x64/bin/rake:33:in <main>' Bundler Error Backtrace: c:/redmine-5.1.3/config/application.rb:18:in <top (required)>' c:/redmine-5.1.3/Rakefile:5:in require' c:/redmine-5.1.3/Rakefile:5:in <top (required)>'

Caused by: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8. c:/redmine-5.1.3/config/application.rb:18:in <top (required)>' c:/redmine-5.1.3/Rakefile:5:in require' c:/redmine-5.1.3/Rakefile:5:in `<top (required)>' (See full trace by running task with --trace)

mwdqaqc avatar Jul 30 '24 18:07 mwdqaqc