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

failed install on windows 11 with mysys64 #138

Open
rioda78 opened this issue Dec 3, 2023 · 2 comments
Open

failed install on windows 11 with mysys64 #138

rioda78 opened this issue Dec 3, 2023 · 2 comments

Comments

@rioda78
Copy link

rioda78 commented Dec 3, 2023

info enviroment

windows 11
ruby version 3.2.2
rails version 7.1.2

rails install with ruby installer
just try to install this gem on that machine but error appear with log :

`Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing trilogy:
ERROR: Failed to build gem native extension.

current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/trilogy-2.6.0/ext/trilogy-ruby

C:/Ruby32-x64/bin/ruby.exe extconf.rb
checking for CRYPTO_malloc() in -lcrypto... yes
checking for SSL_new() in -lssl... yes
checking for rb_interned_str() in ruby.h... yes
creating Makefile

current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/trilogy-2.6.0/ext/trilogy-ruby
make DESTDIR= sitearchdir=./.gem.20231203-27348-kv5wwy sitelibdir=./.gem.20231203-27348-kv5wwy clean

current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/trilogy-2.6.0/ext/trilogy-ruby
make DESTDIR= sitearchdir=./.gem.20231203-27348-kv5wwy sitelibdir=./.gem.20231203-27348-kv5wwy
generating cext-x64-mingw-ucrt.def
compiling trilogy.c
trilogy.c:2:10: fatal error: poll.h: No such file or directory
2 | #include <poll.h>
| ^~~~~~~~
compilation terminated.
make: *** [Makefile:248: trilogy.o] Error 1

make failed, exit code 2

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

@chadmyers
Copy link

chadmyers commented Apr 12, 2024

After doing some searching it appears that Windows doesn't support poll() or have a poll.h availabile in msys64/mingw32/64. I saw some other packages use WSAPoll and use compiler conditionals to choose poll.h/poll or WSAPool (#if defined(_WIN32))

@calvin2021y
Copy link

I guess provide a layer to allow user choice libuv/libev/libenent driver will be a good option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants