いかたけの備忘録

忘れっぽい

さくらのレンタルサーバにrcairoがインストールできなかった。

1時間ぐらい調べたけど分からなかった。

 

 [ikatake@www1928 ~/local/rbenv/plugins]$ rbenv exec gem install cairo[ikatake@www1928 ~/local/rbenv/plugins]$ rbenv exec gem install cairoFetching: cairo-1.15.11.gem (100%)Building native extensions.  This could take a while...ERROR:  Error installing cairo: ERROR: Failed to build gem native extension.
    current directory: /home/ikatake/local/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cairo-1.15.11/ext/cairo/home/ikatake/local/rbenv/versions/2.4.0/bin/ruby -r ./siteconf20171220-61631-1p7kndm.rb extconf.rbchecking for GCC... yeschecking for Win32 OS... nochecking for cairo version (>= 1.2.0)... no*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack of necessarylibraries and/or headers.  Check the mkmf.log file for more details.  You mayneed 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 --ruby=/home/ikatake/local/rbenv/versions/2.4.0/bin/$(RUBY_BASE_NAME) --with-pkg-config --without-pkg-config --with-override-variables --without-override-variables
To see why this extension failed to compile, please check the mkmf.log which can be found here:
  /home/ikatake/local/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-freebsd-9/2.4.0-static/cairo-1.15.11/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/ikatake/local/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cairo-1.15.11 for inspection.Results logged to /home/ikatake/local/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-freebsd-9/2.4.0-static/cairo-1.15.11/gem_make.out[ikatake@www1928 ~/local/rbenv/plugins]$ 

 /home/ikatake/local/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-freebsd-9/2.4.0-static/cairo-1.15.11/mkmf.logはこのような塩梅でした。

 

checking for GCC... -------------------- yes

"gcc -o conftest -I/home/ikatake/local/rbenv/versions/2.4.0/include/ruby-2.4.0/x86_64-freebsd9.1 -I/home/ikatake/local/rbenv/versions/2.4.0/include/ruby-2.4.0/ruby/backward -I/home/ikatake/local/rbenv/versions/2.4.0/include/ruby-2.4.0 -I. -I/home/ikatake/local/rbenv/versions/2.4.0/include -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations conftest.c -L. -L/home/ikatake/local/rbenv/versions/2.4.0/lib -Wl,-R/home/ikatake/local/rbenv/versions/2.4.0/lib -L. -L/home/ikatake/local/rbenv/versions/2.4.0/lib -fstack-protector -rdynamic -Wl,-R/home/ikatake/local/rbenv/versions/2.4.0/lib -L/home/ikatake/local/rbenv/versions/2.4.0/lib -lruby-static -lelf -lprocstat -lthr -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */

"gcc -I/home/ikatake/local/rbenv/versions/2.4.0/include/ruby-2.4.0/x86_64-freebsd9.1 -I/home/ikatake/local/rbenv/versions/2.4.0/include/ruby-2.4.0/ruby/backward -I/home/ikatake/local/rbenv/versions/2.4.0/include/ruby-2.4.0 -I. -I/home/ikatake/local/rbenv/versions/2.4.0/include -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: #ifndef __GNUC__
5: # error
6: |:/ === __GNUC__ undefined === /:|
7: #endif
/* end */

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

checking for Win32 OS... -------------------- no

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

have_package: checking for cairo version (>= 1.2.0)... -------------------- no

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