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

[VTJ-JP]Fluentdプラグインがビルドできない #815

Open
ytooyama opened this issue Jul 23, 2024 · 0 comments
Open

[VTJ-JP]Fluentdプラグインがビルドできない #815

ytooyama opened this issue Jul 23, 2024 · 0 comments

Comments

@ytooyama
Copy link
Contributor

ytooyama commented Jul 23, 2024

td-agent4はEOLとなって後継のfluent-package 5に差し替えが必要ですが、Rubyのバージョンが変わるほか、バイナリの名前なども変わるのでfluent-package 5向けの対応が必要です。

その第一弾として、Makefileのパスの変更が必要です。

[root@kujira fluentd]# diff -u Makefile.org Makefile
--- Makefile.org	2024-07-23 02:17:26.558935869 +0000
+++ Makefile	2024-07-23 02:17:58.625775194 +0000
@@ -3,8 +3,8 @@
 RUBY_GEM=gem
 RUBY_RAKE=rake
 ifeq ($(TD_AGENT), 1)
-RUBY_GEM=/opt/td-agent/bin/fluent-gem
-RUBY_RAKE=/opt/td-agent/bin/rake
+RUBY_GEM=/opt/fluent/bin/fluent-gem
+RUBY_RAKE=/opt/fluent/bin/rake
 endif
 GEM_SPEC=fluent-plugin-arrow-file.gemspec
 GEM_VERSION=$(shell cat $(GEM_SPEC) | awk '/spec.version/{print $$3}' | sed 's/\"//g')

make, make installした結果

[root@kujira fluentd]# make TD_AGENT=1 gem
cp -f ../src/arrow_write.c ../src/arrow_nodes.c ../src/arrow_defs.h ../src/arrow_ipc.h ../src/float2.h arrow_ruby.c ext/arrow_file_write
/opt/fluent/bin/fluent-gem build
  Successfully built RubyGem
  Name: fluent-plugin-arrow-file
  Version: 0.2
  File: fluent-plugin-arrow-file-0.2.gem
[root@kujira fluentd]# make TD_AGENT=1 install
/opt/fluent/bin/fluent-gem install fluent-plugin-arrow-file-0.2.gem
Building native extensions. This could take a while...
ERROR:  Error installing fluent-plugin-arrow-file-0.2.gem:
	ERROR: Failed to build gem native extension.

    current directory: /opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-arrow-file-0.2/ext/arrow_file_write
/opt/fluent/bin/ruby extconf.rb
creating Makefile

current directory: /opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-arrow-file-0.2/ext/arrow_file_write
make DESTDIR\= sitearchdir\=./.gem.20240723-95319-wj4xza sitelibdir\=./.gem.20240723-95319-wj4xza clean
make[1]: Entering directory '/opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-arrow-file-0.2/ext/arrow_file_write'
make[1]: Leaving directory '/opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-arrow-file-0.2/ext/arrow_file_write'

current directory: /opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-arrow-file-0.2/ext/arrow_file_write
make DESTDIR\= sitearchdir\=./.gem.20240723-95319-wj4xza sitelibdir\=./.gem.20240723-95319-wj4xza
make[1]: Entering directory '/opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-arrow-file-0.2/ext/arrow_file_write'
compiling arrow_nodes.c
compiling arrow_ruby.c
arrow_ruby.c: In function ‘__arrowFileWriteChunk’:
arrow_ruby.c:2160:2: error: too few arguments to function ‘writeArrowRecordBatch’
  writeArrowRecordBatch(table);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from arrow_ruby.c:20:
arrow_ipc.h:245:13: note: declared here
 extern int  writeArrowRecordBatch(SQLtable *table,
             ^~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:248: arrow_ruby.o] Error 1
make[1]: Leaving directory '/opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-arrow-file-0.2/ext/arrow_file_write'

make failed, exit code 2

Gem files will remain installed in /opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-arrow-file-0.2 for inspection.
Results logged to /opt/fluent/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/fluent-plugin-arrow-file-0.2/gem_make.out
make: *** [Makefile:58: install] Error 1

大きく変わりそうなのでEOLとはいえ、td-agent4で動く状況も残しておきたい気持ちもあります。

@ytooyama ytooyama changed the title [JP]Fluentdプラグインがビルドできない [VTJ-JP]Fluentdプラグインがビルドできない Jul 23, 2024
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