- Google Compute Engine
- g1-small instance
- CentOS7 image (provided by Google Cloud Platform)
I created an instance and then executed the following commands:
$ sudo yum update
$ curl -O http://packages.treasuredata.com/2/redhat/6/x86_64/td-agent-2.1.0-0.x86_64.rpm
$ sudo rpm -ivh --force td-agent-2.1.0-0.x86_64.rpm # "--force" is required to suppress conflict
$ sudo yum install gcc libcurl-devel ruby-devel # Mandatory packages
$ sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-elasticsearch
Building native extensions. This could take a while...
ERROR: Error installing fluent-plugin-elasticsearch:
ERROR: Failed to build gem native extension.
/opt/td-agent/embedded/bin/ruby extconf.rb
checking for curl-config... yes
checking for rb_thread_blocking_region()... *** 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
--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
--ruby=/opt/td-agent/embedded/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/lib
/opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:1027:in `block in have_func'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:1026:in `have_func'
from extconf.rb:47:in `<main>'
Gem files will remain installed in /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/patron-0.4.18 for inspection.
Results logged to /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/patron-0.4.18/ext/patron/gem_make.out
find_executable: checking for curl-config... -------------------- yes
--------------------
"gcc -o conftest -I/opt/td-agent/embedded/include/ruby-2.1.0/x86_64-linux -I/opt/td-agent/embedded/include/ruby-2.1.0/ruby/backward -I/opt/td-agent/embedded/include/ruby-2.1.0 -I. -I/opt/td-agent/embedded/include -I/opt/td-agent/embedded/include -O3 -g -pipe -fPIC -pedantic -Wall conftest.c -L. -L/opt/td-agent/embedded/lib -Wl,-R/opt/td-agent/embedded/lib -L/opt/td-agent/embedded/lib -Wl,-R/opt/td-agent/embedded/lib -L. -Wl,-rpath,/opt/td-agent/embedded/lib -fstack-protector -L/opt/td-agent/embedded/lib -rdynamic -Wl,-export-dynamic -L/opt/td-agent/embedded/lib -Wl,-R/opt/td-agent/embedded/lib -Wl,-R -Wl,/opt/td-agent/embedded/lib -L/opt/td-agent/embedded/lib -lruby -lpthread -lrt -ldl -lcrypt -lm -lc -lcurl"
In file included from /opt/td-agent/embedded/include/ruby-2.1.0/ruby/ruby.h:29:0,
from /opt/td-agent/embedded/include/ruby-2.1.0/ruby.h:33,
from conftest.c:1:
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/defines.h:138:25: 警告: ISO C90 は ‘long long’ をサポートしません [-Wlong-long]
# define LONG_LONG long long
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/ruby.h:107:69: 備考: in expansion of macro ‘LONG_LONG’
typedef char ruby_check_sizeof_long_long[SIZEOF_LONG_LONG == sizeof(LONG_LONG) ? 1 : -1];
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/defines.h:138:25: 警告: ISO C90 は ‘long long’ をサポートしません [-Wlong-long]
# define LONG_LONG long long
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/ruby.h:242:18: 備考: in expansion of macro ‘LONG_LONG’
VALUE rb_ll2inum(LONG_LONG);
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/defines.h:138:25: 警告: ISO C90 は ‘long long’ をサポートしません [-Wlong-long]
# define LONG_LONG long long
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/ruby.h:244:28: 備考: in expansion of macro ‘LONG_LONG’
VALUE rb_ull2inum(unsigned LONG_LONG);
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/defines.h:138:25: 警告: ISO C90 は ‘long long’ をサポートしません [-Wlong-long]
# define LONG_LONG long long
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/ruby.h:654:1: 備考: in expansion of macro ‘LONG_LONG’
LONG_LONG rb_num2ll(VALUE);
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/defines.h:138:25: 警告: ISO C90 は ‘long long’ をサポートしません [-Wlong-long]
# define LONG_LONG long long
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/ruby.h:655:10: 備考: in expansion of macro ‘LONG_LONG’
unsigned LONG_LONG rb_num2ull(VALUE);
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/defines.h:138:25: 警告: ISO C90 は ‘long long’ をサポートしません [-Wlong-long]
# define LONG_LONG long long
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/ruby.h:656:15: 備考: in expansion of macro ‘LONG_LONG’
static inline LONG_LONG
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/defines.h:138:25: 警告: ISO C90 は ‘long long’ をサポートしません [-Wlong-long]
# define LONG_LONG long long
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/intern.h:112:1: 備考: in expansion of macro ‘LONG_LONG’
LONG_LONG rb_big2ll(VALUE);
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/defines.h:138:25: 警告: ISO C90 は ‘long long’ をサポートしません [-Wlong-long]
# define LONG_LONG long long
^
/opt/td-agent/embedded/include/ruby-2.1.0/ruby/intern.h:113:10: 備考: in expansion of macro ‘LONG_LONG’
unsigned LONG_LONG rb_big2ull(VALUE);
^
/lib64/libselinux.so.1: `lzma_code@XZ_5.0' に対する定義されていない参照です
/lib64/libselinux.so.1: `lzma_stream_decoder@XZ_5.0' に対する定義されていない参照です
/lib64/libselinux.so.1: `lzma_end@XZ_5.0' に対する定義されていない参照です
collect2: エラー: ld はステータス 1 で終了しました
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */