Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Windows: An error occurred while installing cool.io (1.8.0), and Bundler cannot continue. #4493

Closed
daipom opened this issue May 13, 2024 · 8 comments
Labels
CI Test/CI issues

Comments

@daipom
Copy link
Contributor

daipom commented May 13, 2024

Describe the bug

Currently, the CI for Windows fails.
It seems that cool.io(libev) could be the cause.
(Does it have something to do with native extensions for oj?)

Example: https://github.com/fluent/fluentd/actions/runs/9058744234/job/24884949835?pr=4492

...
Fetching oj 3.16.3
Installing oj 3.16.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/cool.io-1.8.0/ext/cool.io
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/bin/ruby.exe extconf.rb
checking for rb_io_descriptor()... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl()... yes
checking for rb_thread_alone()... yes
checking for rb_str_set_len()... yes
checking for clock_gettime() in -lrt... no
checking for ruby/io.h... yes
checking for ruby/thread.h... yes
checking for sys/select.h... no
checking for poll.h... no
checking for sys/epoll.h... no
checking for sys/event.h... no
checking for port.h... no
checking for sys/resource.h... no
checking for sysctlbyname() in sys/param.h,sys/sysctl.h... no
creating Makefile

current directory:
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/cool.io-1.8.0/ext/cool.io
make.exe DESTDIR\= sitearchdir\=./.gem.20240513-2580-ckbpai
sitelibdir\=./.gem.20240513-2580-ckbpai clean

current directory:
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/cool.io-1.8.0/ext/cool.io
make.exe DESTDIR\= sitearchdir\=./.gem.20240513-2580-ckbpai
sitelibdir\=./.gem.20240513-2580-ckbpai
generating cool.io_ext-x64-mingw-ucrt.def
compiling cool.io_ext.c
compiling iowatcher.c
compiling libev.c
In file included from libev.c:8:
../libev/ev.c:213:10: warning: "FD_SETSIZE" redefined
  213 | # define FD_SETSIZE 1024
      |          ^~~~~~~~~~
<command-line>: note: this is the location of the previous definition
../libev/ev.c:1839:31: warning: 'ev_default_loop_ptr' initialized and declared
'extern'
1839 |   EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be
initialised to make it a definition despite extern */
      |                               ^~~~~~~~~~~~~~~~~~~
../libev/ev.c: In function 'evpipe_write':
../libev/ev.c:2484:19: error: assignment to 'char *' from incompatible pointer
type 'WSABUF *' [-Wincompatible-pointer-types]
 2484 |           buf.buf = &buf;
      |                   ^
make: *** [Makefile:248: libev.o] Error 1

make failed, exit code 2

Gem files will remain installed in
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/cool.io-1.8.0
for inspection.
Results logged to
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/cool.io-1.8.0/gem_make.out

C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:119:in
`run'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:53:in
`block in make'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:45:in
`each'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:45:in
`make'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:42:in
`build'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:187:in
`build_extension'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:221:in
`block in build_extensions'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in
`each'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in
`build_extensions'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/installer.rb:846:in
`build_extensions'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/rubygems_gem_installer.rb:76:in
`build_extensions'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/source/rubygems.rb:205:in
`install'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/installer/gem_installer.rb:54:in
`install'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/installer/parallel_installer.rb:132:in
`do_install'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/worker.rb:62:in
`apply_func'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/worker.rb:57:in
`block in process_queue'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/worker.rb:54:in
`loop'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/worker.rb:54:in
`process_queue'
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'

An error occurred while installing cool.io (1.8.0), and Bundler cannot continue.

In Gemfile:
  fluentd was resolved to 1.17.0, which depends on
    cool.io
Error: Process completed with exit code 1.

To Reproduce

Currently, Windows CI always fails.

However, I can't reproduce it on my local. (Windows Home 10, Ruby 3.2.2)

Expected behavior

CI works, and the tests are executed.

Your Environment

- Fluentd version: 1.17
- TD Agent version:
- Operating system:
- Kernel version:

Your Configuration

None

Your Error Log

None

Additional context

No response

@daipom
Copy link
Contributor Author

daipom commented May 13, 2024

Hmm, I can't find the cause.

This worked before.
The version of cool.io has not changed since then.
It doesn't appear to be related to a specific Ruby version.
Not reproducible locally.

Has there been a change in the GitHub workflow environment?

@daipom
Copy link
Contributor Author

daipom commented May 13, 2024

The type issue has existed on libev before 4.25.
It was fixed on 4.25 (libev upstream):

http://cvs.schmorp.de/libev/ev.c?r1=1.484&r2=1.485&pathrev=rel-4_25

but it is not yet applied to cool.io.

Perhaps something changed in the CI environment, and it caused this problem to become an error.

@daipom
Copy link
Contributor Author

daipom commented May 13, 2024

@daipom
Copy link
Contributor Author

daipom commented May 17, 2024

I have tried -Wno-incompatible-pointer-types by using bundle config as follows, but it does not work.

bundle config --local build.cool.io --with-cflags=\"-Wno-incompatible-pointer-types\"
Installing cool.io 1.8.0 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/cool.io-1.8.0/ext/cool.io
C:/Ruby32-x64/bin/ruby.exe extconf.rb
--with-cflags\=\\-Wno-incompatible-pointer-types\\
checking for rb_io_descriptor()... *** 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)
C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:490:in `try_do': The compiler failed to
generate an executable file. (RuntimeError)
You have to install development tools first.

        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:583:in `try_link0'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:601:in `try_link'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:812:in `try_func'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1116:in `block in have_func'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:989:in `block in checking_for'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:354:in `block (2 levels) in postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:324:in `open'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:354:in `block in postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:324:in `open'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:350:in `postpone'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:988:in `checking_for'
        from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1115:in `have_func'
        from extconf.rb:7: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/cool.io-1.8.0/mkmf.log

extconf failed, exit code 1

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

  C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:119:in `run'
C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:27:in
`build'
C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:187:in
`build_extension'
C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:221:in `block
in build_extensions'
  C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:218:in `each'
C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/ext/builder.rb:218:in
`build_extensions'
C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/installer.rb:843:in
`build_extensions'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/source/rubygems.rb:198:in
`install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/installer/gem_installer.rb:54:in
`install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/installer/parallel_installer.rb:156:in
`do_install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/installer/parallel_installer.rb:147:in
`block in worker_pool'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:62:in
`apply_func'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:57:in
`block in process_queue'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:54:in
`loop'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:54:in
`process_queue'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'

An error occurred while installing cool.io (1.8.0), and Bundler cannot
continue.

mkmf.log

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

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\cmder\bin;C:\cmder\vendor\bin;C:\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\HashiCorp\Vagrant\bin;C:\Users\reang\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\reang\AppData\Local\Programs\Python\Python38\;C:\Users\reang\AppData\Local\Microsoft\WindowsApps;C:\Users\reang\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\reang\.dotnet\tools;C:\Program Files\Sublime Text 3;C:\mingw64\bin;C:\Program Files (x86)\Dr. Memory\bin\;C:\Ruby32-x64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.4\bin;C:\cmder\vendor\git-for-windows\cmd;C:\cmder\vendor\git-for-windows\usr\bin;C:\cmder\vendor\git-for-windows\mingw64\bin;C:\cmder;C:\Users\reang\Documents\WindowsPowerShell\Func;C:\mingw64\bin" "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:\cmder\bin;C:\cmder\vendor\bin;C:\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\HashiCorp\Vagrant\bin;C:\Users\reang\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\reang\AppData\Local\Programs\Python\Python38\;C:\Users\reang\AppData\Local\Microsoft\WindowsApps;C:\Users\reang\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\reang\.dotnet\tools;C:\Program Files\Sublime Text 3;C:\mingw64\bin;C:\Program Files (x86)\Dr. Memory\bin\;C:\Ruby32-x64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.4\bin;C:\cmder\vendor\git-for-windows\cmd;C:\cmder\vendor\git-for-windows\usr\bin;C:\cmder\vendor\git-for-windows\mingw64\bin;C:\cmder;C:\Users\reang\Documents\WindowsPowerShell\Func;C:\mingw64\bin" "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_io_descriptor' undeclared (first use in this function)
   17 | int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_io_descriptor; 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_io_descriptor; 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:\cmder\bin;C:\cmder\vendor\bin;C:\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\HashiCorp\Vagrant\bin;C:\Users\reang\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\reang\AppData\Local\Programs\Python\Python38\;C:\Users\reang\AppData\Local\Microsoft\WindowsApps;C:\Users\reang\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\reang\.dotnet\tools;C:\Program Files\Sublime Text 3;C:\mingw64\bin;C:\Program Files (x86)\Dr. Memory\bin\;C:\Ruby32-x64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.4\bin;C:\cmder\vendor\git-for-windows\cmd;C:\cmder\vendor\git-for-windows\usr\bin;C:\cmder\vendor\git-for-windows\mingw64\bin;C:\cmder;C:\Users\reang\Documents\WindowsPowerShell\Func;C:\mingw64\bin" "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_io_descriptor();
18: int t(void) { rb_io_descriptor(); return 0; }
/* end */

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

have_library: checking for main() in -lc... -------------------- no

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\cmder\bin;C:\cmder\vendor\bin;C:\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\HashiCorp\Vagrant\bin;C:\Users\reang\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\reang\AppData\Local\Programs\Python\Python38\;C:\Users\reang\AppData\Local\Microsoft\WindowsApps;C:\Users\reang\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\reang\.dotnet\tools;C:\Program Files\Sublime Text 3;C:\mingw64\bin;C:\Program Files (x86)\Dr. Memory\bin\;C:\Ruby32-x64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.4\bin;C:\cmder\vendor\git-for-windows\cmd;C:\cmder\vendor\git-for-windows\usr\bin;C:\cmder\vendor\git-for-windows\mingw64\bin;C:\cmder;C:\Users\reang\Documents\WindowsPowerShell\Func;C:\mingw64\bin" "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 -lc  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
C:/Ruby32-x64/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lc: No such file or directory
collect2.exe: error: ld returned 1 exit status
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 ((*)()))main; 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:\cmder\bin;C:\cmder\vendor\bin;C:\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\HashiCorp\Vagrant\bin;C:\Users\reang\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\reang\AppData\Local\Programs\Python\Python38\;C:\Users\reang\AppData\Local\Microsoft\WindowsApps;C:\Users\reang\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\reang\.dotnet\tools;C:\Program Files\Sublime Text 3;C:\mingw64\bin;C:\Program Files (x86)\Dr. Memory\bin\;C:\Ruby32-x64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.4\bin;C:\cmder\vendor\git-for-windows\cmd;C:\cmder\vendor\git-for-windows\usr\bin;C:\cmder\vendor\git-for-windows\mingw64\bin;C:\cmder;C:\Users\reang\Documents\WindowsPowerShell\Func;C:\mingw64\bin" "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 -lc  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
conftest.c:17:13: error: conflicting types for 'main'; have 'void()'
   17 | extern void main();
      |             ^~~~
conftest.c:8:5: note: previous definition of 'main' with type 'int(int,  char **)'
    8 | int main(int argc, char **argv)
      |     ^~~~
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 main();
18: int t(void) { main(); return 0; }
/* end */

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

have_macro: checking for HAVE_RB_IO_T in ruby/io.h... -------------------- yes

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\cmder\bin;C:\cmder\vendor\bin;C:\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\HashiCorp\Vagrant\bin;C:\Users\reang\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\reang\AppData\Local\Programs\Python\Python38\;C:\Users\reang\AppData\Local\Microsoft\WindowsApps;C:\Users\reang\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\reang\.dotnet\tools;C:\Program Files\Sublime Text 3;C:\mingw64\bin;C:\Program Files (x86)\Dr. Memory\bin\;C:\Ruby32-x64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.4\bin;C:\cmder\vendor\git-for-windows\cmd;C:\cmder\vendor\git-for-windows\usr\bin;C:\cmder\vendor\git-for-windows\mingw64\bin;C:\cmder;C:\Users\reang\Documents\WindowsPowerShell\Func;C:\mingw64\bin" "gcc -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 -m64  -c conftest.c"
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: #include <ruby/io.h>
 6: /*top*/
 7: #ifndef HAVE_RB_IO_T
 8: # error
 9: |:/ === HAVE_RB_IO_T undefined === /:|
10: #endif
/* end */

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

have_struct_member: checking for rb_io_t.fd in ruby/io.h... -------------------- yes

PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\Ruby32-x64\msys64\ucrt64\bin;C:\Ruby32-x64\msys64\usr\bin;C:\cmder\bin;C:\cmder\vendor\bin;C:\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\HashiCorp\Vagrant\bin;C:\Users\reang\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\reang\AppData\Local\Programs\Python\Python38\;C:\Users\reang\AppData\Local\Microsoft\WindowsApps;C:\Users\reang\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\reang\.dotnet\tools;C:\Program Files\Sublime Text 3;C:\mingw64\bin;C:\Program Files (x86)\Dr. Memory\bin\;C:\Ruby32-x64\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.4\bin;C:\cmder\vendor\git-for-windows\cmd;C:\cmder\vendor\git-for-windows\usr\bin;C:\cmder\vendor\git-for-windows\mingw64\bin;C:\cmder;C:\Users\reang\Documents\WindowsPowerShell\Func;C:\mingw64\bin" "gcc -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 -m64  -c conftest.c"
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: #include <ruby/io.h>
 6: 
 7: /*top*/
 8: int s = (char *)&((rb_io_t*)0)->fd - (char *)0;
 9: int main(int argc, char **argv)
10: {
11:   return !!argv[argc];
12: }
/* end */

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

@daipom
Copy link
Contributor Author

daipom commented May 17, 2024

I have made a PR for cool.io:

This has been merged!

@daipom
Copy link
Contributor Author

daipom commented May 17, 2024

It will be released as cool.io v1.8.1.
After that, this issue would be resolved automatically.

@daipom
Copy link
Contributor Author

daipom commented May 17, 2024

cool.io v1.8.1 has been released.
I'm checking the CI in

@daipom
Copy link
Contributor Author

daipom commented May 17, 2024

I have confirmed this issue is resolved in cool.io v1.8.1.

@daipom daipom closed this as completed May 17, 2024
@daipom daipom added CI Test/CI issues and removed bug Something isn't working labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Test/CI issues
Projects
None yet
Development

No branches or pull requests

1 participant