Skip to content

Unable to install on td-agent #3

Description

@ppreyas

Getting the below error while trying to install this via td-agent-gem install command. Below is the error that I get:

./td-agent-gem install fluent-plugin-better-timestamp-timekey
Building native extensions. This could take a while...
ERROR: Error installing fluent-plugin-better-timestamp-timekey:
ERROR: Failed to build gem native extension.

current directory: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/msgpack-0.5.12/ext/msgpack

/opt/td-agent/embedded/bin/ruby -r ./siteconf20200812-5181-14gim2m.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.4.0/gems/msgpack-0.5.12/ext/msgpack
make "DESTDIR=" clean

current directory: /opt/td-agent/embedded/lib/ruby/gems/2.4.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);
^
make: *** [core_ext.o] Error 1

make failed, exit code 2

Gem files will remain installed in /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/msgpack-0.5.12 for inspection.
Results logged to /opt/td-agent/embedded/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/msgpack-0.5.12/gem_make.out

However, when I try to install it without any dependencies, the installation goes through successfully without any issues as below:

./td-agent-gem install fluent-plugin-better-timestamp-timekey --ignore-dependencies
Fetching: fluent-plugin-better-timestamp-timekey-0.1.2.gem (100%)
Successfully installed fluent-plugin-better-timestamp-timekey-0.1.2
Parsing documentation for fluent-plugin-better-timestamp-timekey-0.1.2
Installing ri documentation for fluent-plugin-better-timestamp-timekey-0.1.2
Done installing documentation for fluent-plugin-better-timestamp-timekey after 0 seconds
1 gem installed

When, I then try to start the td-agent service, it gives me an warning as below and doesnt seem to work:

2020-08-12 11:17:42 +0100 [warn]: #0 fluent/log.rb:348:warn: emit transaction failed: error_class=RuntimeError error="BUG: use router.emit instead of Engine.emit" location="/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.11.1/lib/fluent/engine.rb:124:in emit'" tag="siebel-bre" 2020-08-12 11:17:42 +0100 [warn]: #0 fluent/event_router.rb:96:emit_stream: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.11.1/lib/fluent/engine.rb:124:in emit'
2020-08-12 11:17:42 +0100 [warn]: #0 fluent/event_router.rb:96:emit_stream: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-better-timestamp-timekey-0.1.2/lib/fluent/plugin/out_better_timestamp.rb:33:in block in emit' 2020-08-12 11:17:42 +0100 [warn]: #0 fluent/event_router.rb:96:emit_stream: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.11.1/lib/fluent/event.rb:196:in block in each'
2020-08-12 11:17:42 +0100 [warn]: #0 fluent/event_router.rb:96:emit_stream: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.11.1/lib/fluent/event.rb:195:in each' 2020-08-12 11:17:42 +0100 [warn]: #0 fluent/event_router.rb:96:emit_stream: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.11.1/lib/fluent/event.rb:195:in each'
2020-08-12 11:17:42 +0100 [warn]: #0 fluent/event_router.rb:96:emit_stream: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-better-timestamp-timekey-0.1.2/lib/fluent/plugin/out_better_timestamp.rb:31:in `emit'

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