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

Iodine failing to compile with Ruby 3.2.0preview_2 #128

Closed
oldmoe opened this issue Sep 17, 2022 · 5 comments
Closed

Iodine failing to compile with Ruby 3.2.0preview_2 #128

oldmoe opened this issue Sep 17, 2022 · 5 comments

Comments

@oldmoe
Copy link

oldmoe commented Sep 17, 2022

ruby 3.2.0preview2 (2022-09-09 master 35cfc9a3bb) [x86_64-linux]

current directory: /usr/local/lib/ruby/gems/3.2.0+2/gems/iodine-0.7.49/ext/iodine
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.2.0+2 extconf.rb
detected epoll
checking for -lcrypto... yes
checking for -lssl... yes
detected OpenSSL library, testing for version and required functions.
confirmed OpenSSL to be version 1.1.0 or above (OpenSSL 3.0.2 15 Mar 2022)...

  • compiling with HAVE_OPENSSL.
    creating Makefile

current directory: /usr/local/lib/ruby/gems/3.2.0+2/gems/iodine-0.7.49/ext/iodine
make DESTDIR= sitearchdir=./.gem.20220918-1687372-9vnd9m sitelibdir=./.gem.20220918-1687372-9vnd9m clean

current directory: /usr/local/lib/ruby/gems/3.2.0+2/gems/iodine-0.7.49/ext/iodine
make DESTDIR= sitearchdir=./.gem.20220918-1687372-9vnd9m sitelibdir=./.gem.20220918-1687372-9vnd9m
compiling fio.c
In file included from fio.c:13:
./fio.h:346:5: warning: "FIO_FORCE_MALLOC" is not defined, evaluates to 0 [-Wundef]
346 | #if FIO_FORCE_MALLOC
| ^~~~~~~~~~~~~~~~
./fio.h:349:7: warning: "clang" is not defined, evaluates to 0 [-Wundef]
349 | #elif clang || GNUC > 4 || (GNUC == 4 && GNUC_MINOR > 8)
| ^~~~~~~~~
./fio.h:531:5: warning: "DEBUG" is not defined, evaluates to 0 [-Wundef]
531 | #if DEBUG
| ^~~~~
./fio.h:2228:5: warning: "BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef]
2228 | #if BIG_ENDIAN
| ^~~~~~~~~~~~~~
./fio.h:2465:5: warning: "FIO_USE_RISKY_HASH" is not defined, evaluates to 0 [-Wundef]
2465 | #if FIO_USE_RISKY_HASH
| ^~~~~~~~~~~~~~~~~~

and many similar lines follow until at the end

iodine_connection.c: In function ‘iodine_connection_init’:
iodine_connection.c:906:71: error: ‘rb_cData’ undeclared (first use in this function)
906 | ConnectionKlass = rb_define_class_under(IodineModule, "Connection", rb_cData);
| ^~~~~~~~
iodine_connection.c:906:71: note: each undeclared identifier is reported only once for each function it appears in
iodine_connection.c: 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
make: *** [Makefile:247: iodine_connection.o] Error 1

make failed, exit code 2

@boazsegev
Copy link
Owner

Hi @oldmoe ,

Thank you for opening this issue. I'm still on Ruby 3.0 so didn't notice that rb_cData was deprecated in the C API already.

I'll push a fix shortly.

Thanks again,
Bo.

@boazsegev
Copy link
Owner

Hi @oldmoe,

Sorry for the delay. I am still struggling to install Ruby 3.2.0-preview2 as I am getting an error related to a supposedly missing libyaml... once I pass the Ruby 3.2.0 compilation stage I will test the possible fix pushed.

Kindly,
Bo.

@janbiedermann
Copy link
Contributor

Hi oldmoe and Bo, check here, may cherry-pick:
d77a154
This is for 3.1, should work for 3.2 too, but i have not tested it with 3.2 yet.

@janbiedermann
Copy link
Contributor

Also needs this to compile on Windows: f5cabf2

@oldmoe
Copy link
Author

oldmoe commented Feb 26, 2023

Apologies for not closing this till now, I didn't realize I need to!

@oldmoe oldmoe closed this as completed Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants