Skip to content

Failure when installing gem using the embedded ruby v 2.5.1p57 #2

@adamthedeveloper

Description

@adamthedeveloper
$ sudo /opt/td-agent/embedded/bin/gem install fluent-plugin-http-puma
Building native extensions.  This could take a while...
ERROR:  Error installing fluent-plugin-http-puma:
	ERROR: Failed to build gem native extension.

    current directory: /opt/td-agent/embedded/lib/ruby/gems/2.5.0/gems/msgpack-0.5.12/ext/msgpack
/opt/td-agent/embedded/bin/ruby -r ./siteconf20180713-20142-1s6zn9a.rb extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
checking for rb_intern_str() in ruby.h... yes
checking for rb_sym2str() in ruby.h... yes
checking for rb_str_intern() in ruby.h... yes
creating Makefile

current directory: /opt/td-agent/embedded/lib/ruby/gems/2.5.0/gems/msgpack-0.5.12/ext/msgpack
make "DESTDIR=" clean

current directory: /opt/td-agent/embedded/lib/ruby/gems/2.5.0/gems/msgpack-0.5.12/ext/msgpack
make "DESTDIR="
compiling buffer.c
compiling buffer_class.c
compiling core_ext.c
core_ext.c: In function ‘MessagePack_core_ext_module_init’:
core_ext.c:121:22: error: ‘rb_cFixnum’ undeclared (first use in this function)
     rb_define_method(rb_cFixnum, "to_msgpack", Fixnum_to_msgpack, -1);
                      ^
core_ext.c:121:22: note: each undeclared identifier is reported only once for each function it appears in
core_ext.c:122:22: error: ‘rb_cBignum’ undeclared (first use in this function)
     rb_define_method(rb_cBignum, "to_msgpack", Bignum_to_msgpack, -1);
                      ^
Makefile:241: recipe for target 'core_ext.o' failed
make: *** [core_ext.o] Error 1

make failed, exit code 2

I was able to work around this temporarily by setting a different ruby (#!/usr/local/bin/ruby) at the top of the /opt/td-agent/embedded/bin/gem file. My ruby -v is ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-linux]

Let me know if I can be more helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions