ruby nio4r native extension compile fail

46 views
Skip to first unread message

rx.ze...@gmail.com

unread,
Nov 12, 2017, 7:11:18 AM11/12/17
to Ruby Socketry
I am using rubinus 3.86 and CentOS7(x86_64).
The installation directory is /var/home/ap/rubinius.

I attempted to install nio4r using the gem command and it failed.
The log at that time is as follows.

It is described as "method_missing", but what does it mean?

cat /var/home/ap/rubinius/gems/extensions/x86_64-linux/2.3/nio4r-2.1.0/gem_make.out

current directory: /var/home/ap/rubinius/gems/gems/nio4r-2.1.0/ext/nio4r
/var/home/ap/rubinius/bin/rbx -r ./siteconf20171112-15122-n0ryc2.rb extconf.rb
checking for unistd.h ... yes
checking for sys/select.h ... yes
checking for poll.h ... yes
checking for sys/epoll.h ... yes
checking for sys/event.h ... no
checking for port.h ... no
checking for sys/resource.h ... yes
                  main # Rubinius :: Loader at core/loader.rb: 861
                script # Rubinius :: Loader at core/loader.rb: 679
           load_script. Rubinius :: Code Loader at core/code_loader.rb: 590
           load_script # Rubinius :: Code Loader at core/code_loader.rb: 505
            __script__ # Object at extconf.rb: 21
   << (method_missing) # Kernel (NilClass) at core/zed.rb: 1413

undefined method `<< 'on nil: NilClass. (NoMethodError)

An exception occurred running extconf.rb
*** 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
        - rubby = /var/home/ap/rubinius/bin/rbx

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/home/ap/rubinius/gems/extensions/x86_64-linux/2.3/nio4r-2.1.0/mkmf.log

extconf failed, exit code 1

Tony Arcieri

unread,
Nov 12, 2017, 1:22:26 PM11/12/17
to rx.ze...@gmail.com, Ruby Socketry
On Sun, Nov 12, 2017 at 4:11 AM, <rx.ze...@gmail.com> wrote:
I am using rubinus 3.86 and CentOS7(x86_64).

Rubinius is not a supported platform for nio4r. That said, we might be able to figure out what's wrong.
 
checking for sys/resource.h ... yes
                  main # Rubinius :: Loader at core/loader.rb: 861
                script # Rubinius :: Loader at core/loader.rb: 679
           load_script. Rubinius :: Code Loader at core/code_loader.rb: 590
           load_script # Rubinius :: Code Loader at core/code_loader.rb: 505
            __script__ # Object at extconf.rb: 21
   << (method_missing) # Kernel (NilClass) at core/zed.rb: 1413

undefined method `<< 'on nil: NilClass. (NoMethodError)

This is some sort of null pointer/reference exception, which is not much to go on.
 
To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/home/ap/rubinius/gems/extensions/x86_64-linux/2.3/nio4r-2.1.0/mkmf.log

Please post the contents of this file. 

--
Tony Arcieri
Message has been deleted

rx.ze...@gmail.com

unread,
Nov 12, 2017, 7:36:53 PM11/12/17
to Ruby Socketry
Thank you for your reply.

Post the requested log file.
By the way, when I tried to use nio 4r version 2.0.0, I successfully installed it.

The following logs are requested logs.

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

for unistd.h... -------------------- yes

checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <unistd.h>
/* end */


4: {
5:   return 0;
6: }
/* end */

"cc -E -I/var/home/ap/rubinius/machine/include/capi -I/var/home/ap/rubinius/machine/include/capi/ruby/backward -I/var/home/ap/rubinius/machine/include/capi -I.  -g -O2 -I/var/home/ap/llvm/ruby/include/ruby-2.3.0 -fPIC  conftest.c -o conftest.i"
have_header: checking for sys/select.h... -------------------- yes

checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <sys/select.h>
/* end */

/ruby/backward -I/var/home/ap/rubinius/machine/include/capi -I.  -g -O2 -I/var/home/ap/llvm/ruby/include/ruby-2.3.0 -fPIC  conftest.c -o conftest.i"
have_header: checking for poll.h... -------------------- yes

checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <poll.h>
/* end */

e/capi/ruby/backward -I/var/home/ap/rubinius/machine/include/capi -I.  -g -O2 -I/var/home/ap/llvm/ruby/include/ruby-2.3.0 -fPIC  conftest.c -o conftest.i"
have_header: checking for sys/epoll.h... -------------------- yes

checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <sys/epoll.h>
/* end */

i/ruby/backward -I/var/home/ap/rubinius/machine/include/capi -I.  -g -O2 -I/var/home/ap/llvm/ruby/include/ruby-2.3.0 -fPIC  conftest.c -o conftest.i"
have_header: checking for sys/event.h... -------------------- no

checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <sys/event.h>
/* end */

i/ruby/backward -I/var/home/ap/rubinius/machine/include/capi -I.  -g -O2 -I/var/home/ap/llvm/ruby/include/ruby-2.3.0 -fPIC  conftest.c -o conftest.i"
conftest.c:3:23: fatal error: sys/event.h: No such file or directory
 #include <sys/event.h>
                       ^
compilation terminated.
have_header: checking for port.h... -------------------- no

checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <port.h>
/* end */

e/capi/ruby/backward -I/var/home/ap/rubinius/machine/include/capi -I.  -g -O2 -I/var/home/ap/llvm/ruby/include/ruby-2.3.0 -fPIC  conftest.c -o conftest.i"
conftest.c:3:18: fatal error: port.h: No such file or directory
 #include <port.h>
                  ^
compilation terminated.
have_header: checking for sys/resource.h... -------------------- yes

checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <sys/resource.h>
/* end */

uby/backward -I/var/home/ap/rubinius/machine/include/capi -I.  -g -O2 -I/var/home/ap/llvm/ruby/include/ruby-2.3.0 -fPIC  conftest.c -o conftest.i"

2017年11月12日日曜日 21時11分18秒 UTC+9 rx.ze...@gmail.com:

Tony Arcieri

unread,
Nov 15, 2017, 4:25:37 PM11/15/17
to rx.ze...@gmail.com, Ruby Socketry
I don't see anything particularly useful in this file. If I had to guess I'd say it's a Rubinius bug.

Have you confirmed nio4r will install on MRI on the same system?

On Sun, Nov 12, 2017 at 4:35 PM, <rx.ze...@gmail.com> wrote:
返信ありがとうございます。

依頼されたログファイルを投稿します。
ちなみに、nio4rのバージョン2.0.0を使うようにしたところ、正常にインストールを完了しました。

以下が依頼されたログになります。
I am using rubinus 3.86 and CentOS7(x86_64).

--
You received this message because you are subscribed to the Google Groups "Ruby Socketry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to socketry+unsubscribe@googlegroups.com.
To post to this group, send email to sock...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/socketry/3e84ce12-f725-4e8d-afe8-ea21d8098bae%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Tony Arcieri

rx.ze...@gmail.com

unread,
Nov 15, 2017, 8:22:19 PM11/15/17
to Ruby Socketry
Thank you for your reply.

It certainly installs MRI on the same system. However, we remove all those paths from environment variables.
Also, checking the installation log of nio4r is installed in the directory under rubinius, so I do not think that MRI is particularly affected by ...
Is there something else to check?

2017年11月16日木曜日 6時25分37秒 UTC+9 Tony Arcieri:
To unsubscribe from this group and stop receiving emails from it, send an email to socketry+u...@googlegroups.com.

To post to this group, send email to sock...@googlegroups.com.



--
Tony Arcieri

Tony Arcieri

unread,
Nov 15, 2017, 8:25:03 PM11/15/17
to rx.ze...@gmail.com, Ruby Socketry
On Wed, Nov 15, 2017 at 5:22 PM, <rx.ze...@gmail.com> wrote:
Thank you for your reply.

It certainly installs MRI on the same system. However, we remove all those paths from environment variables.
Also, checking the installation log of nio4r is installed in the directory under rubinius, so I do not think that MRI is particularly affected by ...
Is there something else to check?

Nope. I would suggest opening an issue with the Rubinius team. 

rx.ze...@gmail.com

unread,
Nov 15, 2017, 10:14:17 PM11/15/17
to Ruby Socketry
ok, understood.

2017年11月16日木曜日 10時25分03秒 UTC+9 Tony Arcieri:
Reply all
Reply to author
Forward
0 new messages