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

Problems compiling r2corba with ruby 2.5 and newer on Windows #69

Closed
jwillemsen opened this issue Feb 17, 2021 · 2 comments
Closed

Problems compiling r2corba with ruby 2.5 and newer on Windows #69

jwillemsen opened this issue Feb 17, 2021 · 2 comments

Comments

@jwillemsen
Copy link
Member

jwillemsen commented Feb 17, 2021

On Windows using ruby 2.5 or newer the compilation of the C extensions fail with the error below. This comes by the fact that r2corba defines RUBY_WIN32_H at

#define RUBY_WIN32_H
which causes rb_w32_select not to be defined, this is done through ruby.h

g++ -Wnon-virtual-dtor -O3 -mthreads -mtune=generic -fno-strict-aliasing -Wall -Wextra -Wpointer-arith -pipe -DNDEBUG -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -Wno-unknown-pragmas -DNDEBUG -ID:/a/r2corba/r2corba/ACE/ACE -DACE_NDEBUG -DACE_NO_INLINE -ID:/a/r2corba/r2corba/ACE/ACE -ID:/a/r2corba/r2corba/ACE/TAO -IC:/hostedtoolcache/windows/Ruby/2.6.6/x64/include/ruby-2.6.0 -IC:/hostedtoolcache/windows/Ruby/2.6.6/x64/include/ruby-2.6.0/x64-mingw32 -I. -DRUBY_VER_MAJOR=2 -DRUBY_VER_MINOR=6 -DRUBY_VER_RELEASE=6 -DR2TAO_BUILD_DLL  -c  -o .shobj/any.o /d/a/r2corba/r2corba/ext/libr2tao/any.cpp
In file included from C:/hostedtoolcache/windows/Ruby/2.6.6/x64/include/ruby-2.6.0/ruby/ruby.h:2111,
                 from C:/hostedtoolcache/windows/Ruby/2.6.6/x64/include/ruby-2.6.0/ruby.h:33,
                 from D:/a/r2corba/r2corba/ext/libr2tao/required.h:30,
                 from D:/a/r2corba/r2corba/ext/libr2tao/any.cpp:13:
C:/hostedtoolcache/windows/Ruby/2.6.6/x64/include/ruby-2.6.0/ruby/intern.h: In function 'int rb_fd_select(int, rb_fdset_t*, rb_fdset_t*, rb_fdset_t*, timeval*)':
C:/hostedtoolcache/windows/Ruby/2.6.6/x64/include/ruby-2.6.0/ruby/intern.h:373:12: error: 'rb_w32_select' was not declared in this scope; did you mean 'rb_fd_select'?
  373 |     return rb_w32_select(n,
      |            ^~~~~~~~~~~~~
      |            rb_fd_select
@jwillemsen
Copy link
Member Author

Been able to fix these compile errors with some changes in r2corba and ACE, see https://github.com/jwillemsen/r2corba/tree/jwi-ruby26, that compiles, but has the runtime issue as reported in #65 using Ruby 2.4 and newer

@jwillemsen
Copy link
Member Author

Fixed

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

1 participant