production.log

株式会社リブセンスでエンジニアをやっている星直史のブログです。

Red Hatにberkshelfを入れようとした際に発生するエラー回避方法

背景

こちらを参考にchef, knife-solo, berkshelfをインストールしようとしたときに、berkshelfがエラーでインストールできなかったので、
その回避方法を書く。

対象サーバー

AWS EC2インスタンスRHEL-6.5_GA-x86_64-4-Hourly2 (ami-35106f34)

実行コマンド

gem install berkshelf --no-ri --no-rdoc

原因

gem installした時に内部でmakeが呼ばれるんですが、その途中でなぜかエラーで落ちてしまう。

Building native extensions.  This could take a while...
Successfully installed nio4r-1.1.0
Fetching: hitimes-1.2.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed hitimes-1.2.2
Fetching: timers-4.0.1.gem (100%)
Successfully installed timers-4.0.1
Fetching: celluloid-0.16.0.gem (100%)
Successfully installed celluloid-0.16.0
Fetching: celluloid-io-0.16.2.gem (100%)
Successfully installed celluloid-io-0.16.2
Fetching: addressable-2.3.8.gem (100%)
Successfully installed addressable-2.3.8
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: faraday-0.9.1.gem (100%)
Successfully installed faraday-0.9.1
Fetching: sawyer-0.6.0.gem (100%)
Successfully installed sawyer-0.6.0
Fetching: octokit-3.8.0.gem (100%)
Successfully installed octokit-3.8.0
Fetching: dep-selector-libgecode-1.0.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing berkshelf:
    ERROR: Failed to build gem native extension.

    /opt/rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150425-4486-1uunsyf.rb extconf.rb
-> sh /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dep-selector-libgecode-1.0.2/ext/libgecode3/vendor/gecode-3.7.3/configure --prefix=/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dep-selector-libgecode-1.0.2/lib/dep-selector-libgecode/vendored-gecode --disable-doc-dot --disable-doc-search --disable-doc-tagfile --disable-doc-chm --disable-doc-docset --disable-qt --disable-examples --disable-flatzinc
checking for the host operating system... Linux
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for diff... ok
checking for tar... ok
checking for make... ok
checking for sed... ok
checking for perl... ok
checking how to run the C++ preprocessor... g++ -E
checking for rc.exe... no
checking whether to build with Visual Studio resource files... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ext/hash_map usability... yes
checking ext/hash_map presence... yes
checking for ext/hash_map... yes
checking Whether to build for different architectures... no
checking for user-defined library name prefix... no
checking for user-defined library name suffix... no
checking whether to build static libraries... no
checking whether to build shared libraries... yes
checking whether to build with debug symbols and assertions... no
checking whether to optimize for code size... no
checking whether to build with support for finding memory leaks... no
checking whether to build with auditing code... no
checking whether to build with profiling information... no
checking whether to build with gcov support... no
checking size of int... 4
checking if int has at least 32 bit... yes
checking if doubles have a big enough mantissa... yes
checking for unistd.h... (cached) yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether g++ accepts -fPIC... yes
checking whether gcc accepts -fPIC... yes
checking whether g++ accepts -Wextra... yes
checking whether gcc accepts -Wextra... yes
checking whether g++ accepts -Wall... yes
checking whether gcc accepts -Wall... yes
checking whether g++ accepts -pipe... yes
checking whether gcc accepts -pipe... yes
checking whether g++ accepts -ggdb... yes
checking for __builtin_ffsl... yes
checking whether to use gcc visibility attributes... yes
checking whether g++ accepts -fvisibility=hidden... yes
checking if compiler supports forced inlining... yes
checking whether g++ accepts -O3... yes
checking whether gcc accepts -O3... yes
checking whether g++ accepts -fno-strict-aliasing... yes
checking whether gcc accepts -fno-strict-aliasing... yes
checking whether g++ accepts -ffast-math... yes
checking whether gcc accepts -ffast-math... yes
checking whether g++ accepts -mthreads... no
checking whether gcc accepts -mthreads... no
checking whether g++ accepts -Qunused-arguments... no
checking whether gcc accepts -Qunused-arguments... no
checking for dot... no
checking whether to enable graphs in the documentation... no
checking whether to enable the documentation search engine... no
checking whether to generate a doxygen tagfile... no
checking whether to build compressed html documentation... no
checking whether to build docset documentation for XCode... no
checking whether to build the set variables library... yes
checking whether to build the int variables library... yes
checking for qmake-qt4... no
checking for qmake... no
checking for moc-qt4... no
checking for moc... no
checking whether to build with Qt support... no
checking whether to build Gist... no
checking for flex... no
checking whether we have at least flex 2.5.33... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether to build driver... yes
checking whether to build flatzinc... no
checking whether to build driver... yes
checking whether to build examples... no
checking whether to build minimodel... yes
checking whether to build search... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tools/flatzinc/mzn-gecode
config.status: creating doxygen.conf
config.status: creating doxygen.hh
config.status: creating gecode/support/config.hpp
-> make clean
(cd . && autoconf)
./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dep-selector-libgecode-1.0.2/ext/libgecode3/vendor/gecode-3.7.3/configure --prefix=/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dep-selector-libgecode-1.0.2/lib/dep-selector-libgecode/vendored-gecode --disable-doc-dot --disable-doc-search --disable-doc-tagfile --disable-doc-chm --disable-doc-docset --disable-qt --disable-examples --disable-flatzinc --no-create --no-recursion
checking for the host operating system... Linux
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for diff... ok
checking for tar... ok
checking for make... ok
checking for sed... ok
checking for perl... ok
checking how to run the C++ preprocessor... g++ -E
checking for rc.exe... no
checking whether to build with Visual Studio resource files... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ext/hash_map usability... yes
checking ext/hash_map presence... yes
checking for ext/hash_map... yes
checking Whether to build for different architectures... no
checking for user-defined library name prefix... no
checking for user-defined library name suffix... no
checking whether to build static libraries... no
checking whether to build shared libraries... yes
checking whether to build with debug symbols and assertions... no
checking whether to optimize for code size... no
checking whether to build with support for finding memory leaks... no
checking whether to build with auditing code... no
checking whether to build with profiling information... no
checking whether to build with gcov support... no
checking size of int... 4
checking if int has at least 32 bit... yes
checking if doubles have a big enough mantissa... yes
checking for unistd.h... (cached) yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether g++ accepts -fPIC... yes
checking whether gcc accepts -fPIC... yes
checking whether g++ accepts -Wextra... yes
checking whether gcc accepts -Wextra... yes
checking whether g++ accepts -Wall... yes
checking whether gcc accepts -Wall... yes
checking whether g++ accepts -pipe... yes
checking whether gcc accepts -pipe... yes
checking whether g++ accepts -ggdb... yes
checking for __builtin_ffsl... yes
checking whether to use gcc visibility attributes... yes
checking whether g++ accepts -fvisibility=hidden... yes
checking if compiler supports forced inlining... yes
checking whether g++ accepts -O3... yes
checking whether gcc accepts -O3... yes
checking whether g++ accepts -fno-strict-aliasing... yes
checking whether gcc accepts -fno-strict-aliasing... yes
checking whether g++ accepts -ffast-math... yes
checking whether gcc accepts -ffast-math... yes
checking whether g++ accepts -mthreads... no
checking whether gcc accepts -mthreads... no
checking whether g++ accepts -Qunused-arguments... no
checking whether gcc accepts -Qunused-arguments... no
checking for dot... no
checking whether to enable graphs in the documentation... no
checking whether to enable the documentation search engine... no
checking whether to generate a doxygen tagfile... no
checking whether to build compressed html documentation... no
checking whether to build docset documentation for XCode... no
checking whether to build the set variables library... yes
checking whether to build the int variables library... yes
checking for qmake-qt4... no
checking for qmake... no
checking for moc-qt4... no
checking for moc... no
checking whether to build with Qt support... no
checking whether to build Gist... no
checking for flex... no
checking whether we have at least flex 2.5.33... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether to build driver... yes
checking whether to build flatzinc... no
checking whether to build driver... yes
checking whether to build examples... no
checking whether to build minimodel... yes
checking whether to build search... yes
configure: creating ./config.status
./config.status --file Makefile:Makefile.in
config.status: creating Makefile
rm -rf *.stackdump core gmon.out \
        vc70.pdb vc80.pdb vc90.pdb vc100.pdb
rm -rf doxygen.log doxygen.hh doxygen.conf.use stat.hh \
         changelog.hh doxygen.hh license.hh header.html
rm -rf gecode/support/exception.o gecode/support/heap.o gecode/support/thread/thread.o gecode/support/thread/windows.o gecode/support/thread/pthreads.o gecode/kernel/archive.o gecode/kernel/core.o gecode/kernel/memory-manager.o gecode/kernel/branch.o gecode/kernel/region.o gecode/search/stop.o gecode/search/options.o gecode/search/parallel/engine.o gecode/search/dfs.o gecode/search/parallel/dfs.o gecode/search/bab.o gecode/search/parallel/bab.o gecode/search/restart.o gecode/search/parallel/restart.o gecode/int/int-set.o gecode/int/var-imp/int.o gecode/int/var-imp/bool.o gecode/int/var/int.o gecode/int/var/bool.o gecode/int/array.o gecode/int/bool.o gecode/int/bool/eqv.o gecode/int/extensional/dfa.o gecode/int/extensional/tuple-set.o gecode/int/extensional.o gecode/int/dom.o gecode/int/rel.o gecode/int/precede.o gecode/int/element.o gecode/int/count.o gecode/int/arithmetic.o gecode/int/exec.o gecode/int/exec/when.o gecode/int/element/pair.o gecode/int/linear/int-post.o gecode/int/linear-int.o gecode/int/linear/bool-post.o gecode/int/linear-bool.o gecode/int/branch.o gecode/int/distinct.o gecode/int/sorted.o gecode/int/gcc.o gecode/int/channel.o gecode/int/channel/link-single.o gecode/int/channel/link-multi.o gecode/int/unshare.o gecode/int/sequence.o gecode/int/bin-packing.o gecode/int/bin-packing/propagate.o gecode/int/unary.o gecode/int/cumulative.o gecode/int/cumulatives.o gecode/int/circuit.o gecode/int/no-overlap.o gecode/int/nvalues.o gecode/int/member.o gecode/int/branch/post-view-int.o gecode/int/branch/post-view-bool.o gecode/set/branch.o gecode/set/cardinality.o gecode/set/convex.o gecode/set/convex/conv.o gecode/set/convex/hull.o gecode/set/dom.o gecode/set/rel.o gecode/set/rel-op.o gecode/set/rel-op-ternary.o gecode/set/rel-op-singleton.o gecode/set/rel-op/post-compl.o gecode/set/rel-op/post-nocompl.o gecode/set/rel-op/post-compl-cvv.o gecode/set/rel-op/post-nocompl-cvv.o gecode/set/rel-op/post-compl-vvc.o gecode/set/rel-op/post-nocompl-vvc.o gecode/set/rel-op/post-compl-cvc.o gecode/set/rel-op/post-nocompl-cvc.o gecode/set/rel-op-const-vvc.o gecode/set/rel-op-const-vcv.o gecode/set/rel-op-const-vcc.o gecode/set/rel-op-const-cvc.o gecode/set/rel-op-const-cvv.o gecode/set/int.o gecode/set/element.o gecode/set/sequence.o gecode/set/distinct.o gecode/set/distinct/atmostOne.o gecode/set/precede.o gecode/set/sequence/seq.o gecode/set/sequence/seq-u.o gecode/set/array.o gecode/set/var-imp/set.o gecode/set/var-imp/integerset.o gecode/set/var/set.o gecode/set/exec.o gecode/set/branch/post-view.o gecode/minimodel/lin-expr.o gecode/minimodel/lin-rel.o gecode/minimodel/bool-expr.o gecode/minimodel/set-expr.o gecode/minimodel/set-rel.o gecode/minimodel/reg.o gecode/minimodel/arithmetic.o gecode/driver/options.o gecode/driver/script.o examples/alpha.o examples/bacp.o examples/bibd.o examples/donald.o examples/efpa.o examples/eq20.o examples/golomb-ruler.o examples/graph-color.o examples/grocery.o examples/ind-set.o examples/magic-sequence.o examples/magic-square.o examples/money.o examples/ortho-latin.o examples/partition.o examples/photo.o examples/queens.o examples/sudoku.o examples/kakuro.o examples/nonogram.o examples/pentominoes.o examples/crowded-chess.o examples/black-hole.o examples/minesweeper.o examples/domino.o examples/steel-mill.o examples/sports-league.o examples/all-interval.o examples/langford-number.o examples/warehouses.o examples/radiotherapy.o examples/word-square.o examples/crossword.o examples/open-shop.o examples/car-sequencing.o examples/sat.o examples/bin-packing.o examples/knights.o examples/tsp.o examples/perfect-square.o examples/schurs-lemma.o examples/dominating-queens.o examples/crew.o examples/golf.o examples/hamming.o examples/steiner.o examples/queen-armies.o gecode/gist/drawingcursor.o gecode/gist/gist.o gecode/gist/gecodelogo.o gecode/gist/node.o gecode/gist/spacenode.o gecode/gist/textoutput.o gecode/gist/treecanvas.o gecode/gist/qtgist.o gecode/gist/visualnode.o gecode/gist/nodestats.o gecode/gist/nodewidget.o gecode/gist/mainwindow.o gecode/gist/preferences.o gecode/gist/stopbrancher.o gecode/flatzinc/flatzinc.o gecode/flatzinc/registry.o tools/flatzinc/fz.o gecode/gist/moc_treecanvas.o gecode/gist/moc_qtgist.o gecode/gist/moc_mainwindow.o gecode/gist/moc_textoutput.o gecode/gist/moc_preferences.o gecode/gist/moc_nodestats.o gecode/flatzinc/parser.tab.o gecode/flatzinc/lexer.yy.o gecode/support/exception.s gecode/support/heap.s gecode/support/thread/thread.s gecode/support/thread/windows.s gecode/support/thread/pthreads.s gecode/kernel/archive.s gecode/kernel/core.s gecode/kernel/memory-manager.s gecode/kernel/branch.s gecode/kernel/region.s gecode/search/stop.s gecode/search/options.s gecode/search/parallel/engine.s gecode/search/dfs.s gecode/search/parallel/dfs.s gecode/search/bab.s gecode/search/parallel/bab.s gecode/search/restart.s gecode/search/parallel/restart.s gecode/int/int-set.s gecode/int/var-imp/int.s gecode/int/var-imp/bool.s gecode/int/var/int.s gecode/int/var/bool.s gecode/int/array.s gecode/int/bool.s gecode/int/bool/eqv.s gecode/int/extensional/dfa.s gecode/int/extensional/tuple-set.s gecode/int/extensional.s gecode/int/dom.s gecode/int/rel.s gecode/int/precede.s gecode/int/element.s gecode/int/count.s gecode/int/arithmetic.s gecode/int/exec.s gecode/int/exec/when.s gecode/int/element/pair.s gecode/int/linear/int-post.s gecode/int/linear-int.s gecode/int/linear/bool-post.s gecode/int/linear-bool.s gecode/int/branch.s gecode/int/distinct.s gecode/int/sorted.s gecode/int/gcc.s gecode/int/channel.s gecode/int/channel/link-single.s gecode/int/channel/link-multi.s gecode/int/unshare.s gecode/int/sequence.s gecode/int/bin-packing.s gecode/int/bin-packing/propagate.s gecode/int/unary.s gecode/int/cumulative.s gecode/int/cumulatives.s gecode/int/circuit.s gecode/int/no-overlap.s gecode/int/nvalues.s gecode/int/member.s gecode/int/branch/post-view-int.s gecode/int/branch/post-view-bool.s gecode/set/branch.s gecode/set/cardinality.s gecode/set/convex.s gecode/set/convex/conv.s gecode/set/convex/hull.s gecode/set/dom.s gecode/set/rel.s gecode/set/rel-op.s gecode/set/rel-op-ternary.s gecode/set/rel-op-singleton.s gecode/set/rel-op/post-compl.s gecode/set/rel-op/post-nocompl.s gecode/set/rel-op/post-compl-cvv.s gecode/set/rel-op/post-nocompl-cvv.s gecode/set/rel-op/post-compl-vvc.s gecode/set/rel-op/post-nocompl-vvc.s gecode/set/rel-op/post-compl-cvc.s gecode/set/rel-op/post-nocompl-cvc.s gecode/set/rel-op-const-vvc.s gecode/set/rel-op-const-vcv.s gecode/set/rel-op-const-vcc.s gecode/set/rel-op-const-cvc.s gecode/set/rel-op-const-cvv.s gecode/set/int.s gecode/set/element.s gecode/set/sequence.s gecode/set/distinct.s gecode/set/distinct/atmostOne.s gecode/set/precede.s gecode/set/sequence/seq.s gecode/set/sequence/seq-u.s gecode/set/array.s gecode/set/var-imp/set.s gecode/set/var-imp/integerset.s gecode/set/var/set.s gecode/set/exec.s gecode/set/branch/post-view.s gecode/minimodel/lin-expr.s gecode/minimodel/lin-rel.s gecode/minimodel/bool-expr.s gecode/minimodel/set-expr.s gecode/minimodel/set-rel.s gecode/minimodel/reg.s gecode/minimodel/arithmetic.s gecode/driver/options.s gecode/driver/script.s examples/alpha.s examples/bacp.s examples/bibd.s examples/donald.s examples/efpa.s examples/eq20.s examples/golomb-ruler.s examples/graph-color.s examples/grocery.s examples/ind-set.s examples/magic-sequence.s examples/magic-square.s examples/money.s examples/ortho-latin.s examples/partition.s examples/photo.s examples/queens.s examples/sudoku.s examples/kakuro.s examples/nonogram.s examples/pentominoes.s examples/crowded-chess.s examples/black-hole.s examples/minesweeper.s examples/domino.s examples/steel-mill.s examples/sports-league.s examples/all-interval.s examples/langford-number.s examples/warehouses.s examples/radiotherapy.s examples/word-square.s examples/crossword.s examples/open-shop.s examples/car-sequencing.s examples/sat.s examples/bin-packing.s examples/knights.s examples/tsp.s examples/perfect-square.s examples/schurs-lemma.s examples/dominating-queens.s examples/crew.s examples/golf.s examples/hamming.s examples/steiner.s examples/queen-armies.s gecode/gist/drawingcursor.s gecode/gist/gist.s gecode/gist/gecodelogo.s gecode/gist/node.s gecode/gist/spacenode.s gecode/gist/textoutput.s gecode/gist/treecanvas.s gecode/gist/qtgist.s gecode/gist/visualnode.s gecode/gist/nodestats.s gecode/gist/nodewidget.s gecode/gist/mainwindow.s gecode/gist/preferences.s gecode/gist/stopbrancher.s gecode/flatzinc/flatzinc.s gecode/flatzinc/registry.s tools/flatzinc/fz.s gecode/support/exception.pdb gecode/support/heap.pdb gecode/support/thread/thread.pdb gecode/support/thread/windows.pdb gecode/support/thread/pthreads.pdb gecode/kernel/archive.pdb gecode/kernel/core.pdb gecode/kernel/memory-manager.pdb gecode/kernel/branch.pdb gecode/kernel/region.pdb gecode/search/stop.pdb gecode/search/options.pdb gecode/search/parallel/engine.pdb gecode/search/dfs.pdb gecode/search/parallel/dfs.pdb gecode/search/bab.pdb gecode/search/parallel/bab.pdb gecode/search/restart.pdb gecode/search/parallel/restart.pdb gecode/int/int-set.pdb gecode/int/var-imp/int.pdb gecode/int/var-imp/bool.pdb gecode/int/var/int.pdb gecode/int/var/bool.pdb gecode/int/array.pdb gecode/int/bool.pdb gecode/int/bool/eqv.pdb gecode/int/extensional/dfa.pdb gecode/int/extensional/tuple-set.pdb gecode/int/extensional.pdb gecode/int/dom.pdb gecode/int/rel.pdb gecode/int/precede.pdb gecode/int/element.pdb gecode/int/count.pdb gecode/int/arithmetic.pdb gecode/int/exec.pdb gecode/int/exec/when.pdb gecode/int/element/pair.pdb gecode/int/linear/int-post.pdb gecode/int/linear-int.pdb gecode/int/linear/bool-post.pdb gecode/int/linear-bool.pdb gecode/int/branch.pdb gecode/int/distinct.pdb gecode/int/sorted.pdb gecode/int/gcc.pdb gecode/int/channel.pdb gecode/int/channel/link-single.pdb gecode/int/channel/link-multi.pdb gecode/int/unshare.pdb gecode/int/sequence.pdb gecode/int/bin-packing.pdb gecode/int/bin-packing/propagate.pdb gecode/int/unary.pdb gecode/int/cumulative.pdb gecode/int/cumulatives.pdb gecode/int/circuit.pdb gecode/int/no-overlap.pdb gecode/int/nvalues.pdb gecode/int/member.pdb gecode/int/branch/post-view-int.pdb gecode/int/branch/post-view-bool.pdb gecode/set/branch.pdb gecode/set/cardinality.pdb gecode/set/convex.pdb gecode/set/convex/conv.pdb gecode/set/convex/hull.pdb gecode/set/dom.pdb gecode/set/rel.pdb gecode/set/rel-op.pdb gecode/set/rel-op-ternary.pdb gecode/set/rel-op-singleton.pdb gecode/set/rel-op/post-compl.pdb gecode/set/rel-op/post-nocompl.pdb gecode/set/rel-op/post-compl-cvv.pdb gecode/set/rel-op/post-nocompl-cvv.pdb gecode/set/rel-op/post-compl-vvc.pdb gecode/set/rel-op/post-nocompl-vvc.pdb gecode/set/rel-op/post-compl-cvc.pdb gecode/set/rel-op/post-nocompl-cvc.pdb gecode/set/rel-op-const-vvc.pdb gecode/set/rel-op-const-vcv.pdb gecode/set/rel-op-const-vcc.pdb gecode/set/rel-op-const-cvc.pdb gecode/set/rel-op-const-cvv.pdb gecode/set/int.pdb gecode/set/element.pdb gecode/set/sequence.pdb gecode/set/distinct.pdb gecode/set/distinct/atmostOne.pdb gecode/set/precede.pdb gecode/set/sequence/seq.pdb gecode/set/sequence/seq-u.pdb gecode/set/array.pdb gecode/set/var-imp/set.pdb gecode/set/var-imp/integerset.pdb gecode/set/var/set.pdb gecode/set/exec.pdb gecode/set/branch/post-view.pdb gecode/minimodel/lin-expr.pdb gecode/minimodel/lin-rel.pdb gecode/minimodel/bool-expr.pdb gecode/minimodel/set-expr.pdb gecode/minimodel/set-rel.pdb gecode/minimodel/reg.pdb gecode/minimodel/arithmetic.pdb gecode/driver/options.pdb gecode/driver/script.pdb examples/alpha.pdb examples/bacp.pdb examples/bibd.pdb examples/donald.pdb examples/efpa.pdb examples/eq20.pdb examples/golomb-ruler.pdb examples/graph-color.pdb examples/grocery.pdb examples/ind-set.pdb examples/magic-sequence.pdb examples/magic-square.pdb examples/money.pdb examples/ortho-latin.pdb examples/partition.pdb examples/photo.pdb examples/queens.pdb examples/sudoku.pdb examples/kakuro.pdb examples/nonogram.pdb examples/pentominoes.pdb examples/crowded-chess.pdb examples/black-hole.pdb examples/minesweeper.pdb examples/domino.pdb examples/steel-mill.pdb examples/sports-league.pdb examples/all-interval.pdb examples/langford-number.pdb examples/warehouses.pdb examples/radiotherapy.pdb examples/word-square.pdb examples/crossword.pdb examples/open-shop.pdb examples/car-sequencing.pdb examples/sat.pdb examples/bin-packing.pdb examples/knights.pdb examples/tsp.pdb examples/perfect-square.pdb examples/schurs-lemma.pdb examples/dominating-queens.pdb examples/crew.pdb examples/golf.pdb examples/hamming.pdb examples/steiner.pdb examples/queen-armies.pdb gecode/gist/drawingcursor.pdb gecode/gist/gist.pdb gecode/gist/gecodelogo.pdb gecode/gist/node.pdb gecode/gist/spacenode.pdb gecode/gist/textoutput.pdb gecode/gist/treecanvas.pdb gecode/gist/qtgist.pdb gecode/gist/visualnode.pdb gecode/gist/nodestats.pdb gecode/gist/nodewidget.pdb gecode/gist/mainwindow.pdb gecode/gist/preferences.pdb gecode/gist/stopbrancher.pdb gecode/flatzinc/flatzinc.pdb gecode/flatzinc/registry.pdb tools/flatzinc/fz.pdb gecode/gist/moc_treecanvas.pdb gecode/gist/moc_qtgist.pdb gecode/gist/moc_mainwindow.pdb gecode/gist/moc_textoutput.pdb gecode/gist/moc_preferences.pdb gecode/gist/moc_nodestats.pdb gecode/flatzinc/parser.tab.pdb gecode/flatzinc/lexer.yy.pdb
rm -rf test/int.o test/int/channel.o test/int/arithmetic.o test/int/basic.o test/int/bool.o test/int/count.o test/int/dom.o test/int/distinct.o test/int/element.o test/int/extensional.o test/int/rel.o test/int/linear.o test/int/gcc.o test/int/sorted.o test/int/unshare.o test/int/exec.o test/int/sequence.o test/int/mm-arithmetic.o test/int/mm-bool.o test/int/mm-lin.o test/int/mm-count.o test/int/mm-rel.o test/int/bin-packing.o test/int/unary.o test/int/cumulative.o test/int/cumulatives.o test/int/circuit.o test/int/no-overlap.o test/int/precede.o test/int/nvalues.o test/int/member.o test/set.o test/set/construct.o test/set/dom.o test/set/rel.o test/set/rel-op.o test/set/rel-op-const.o test/set/convex.o test/set/sequence.o test/set/int.o test/set/element.o test/set/precede.o test/set/distinct.o test/set/exec.o test/set/mm-set.o test/branch.o test/branch/int.o test/branch/bool.o test/branch/set.o test/assign.o test/assign/int.o test/assign/bool.o test/assign/set.o test/search.o test/array.o test/test.o test/afc.o test/int.s test/int/channel.s test/int/arithmetic.s test/int/basic.s test/int/bool.s test/int/count.s test/int/dom.s test/int/distinct.s test/int/element.s test/int/extensional.s test/int/rel.s test/int/linear.s test/int/gcc.s test/int/sorted.s test/int/unshare.s test/int/exec.s test/int/sequence.s test/int/mm-arithmetic.s test/int/mm-bool.s test/int/mm-lin.s test/int/mm-count.s test/int/mm-rel.s test/int/bin-packing.s test/int/unary.s test/int/cumulative.s test/int/cumulatives.s test/int/circuit.s test/int/no-overlap.s test/int/precede.s test/int/nvalues.s test/int/member.s test/set.s test/set/construct.s test/set/dom.s test/set/rel.s test/set/rel-op.s test/set/rel-op-const.s test/set/convex.s test/set/sequence.s test/set/int.s test/set/element.s test/set/precede.s test/set/distinct.s test/set/exec.s test/set/mm-set.s test/branch.s test/branch/int.s test/branch/bool.s test/branch/set.s test/assign.s test/assign/int.s test/assign/bool.s test/assign/set.s test/search.s test/array.s test/test.s test/afc.s test/int.pdb test/int/channel.pdb test/int/arithmetic.pdb test/int/basic.pdb test/int/bool.pdb test/int/count.pdb test/int/dom.pdb test/int/distinct.pdb test/int/element.pdb test/int/extensional.pdb test/int/rel.pdb test/int/linear.pdb test/int/gcc.pdb test/int/sorted.pdb test/int/unshare.pdb test/int/exec.pdb test/int/sequence.pdb test/int/mm-arithmetic.pdb test/int/mm-bool.pdb test/int/mm-lin.pdb test/int/mm-count.pdb test/int/mm-rel.pdb test/int/bin-packing.pdb test/int/unary.pdb test/int/cumulative.pdb test/int/cumulatives.pdb test/int/circuit.pdb test/int/no-overlap.pdb test/int/precede.pdb test/int/nvalues.pdb test/int/member.pdb test/set.pdb test/set/construct.pdb test/set/dom.pdb test/set/rel.pdb test/set/rel-op.pdb test/set/rel-op-const.pdb test/set/convex.pdb test/set/sequence.pdb test/set/int.pdb test/set/element.pdb test/set/precede.pdb test/set/distinct.pdb test/set/exec.pdb test/set/mm-set.pdb test/branch.pdb test/branch/int.pdb test/branch/bool.pdb test/branch/set.pdb test/assign.pdb test/assign/int.pdb test/assign/bool.pdb test/assign/set.pdb test/search.pdb test/array.pdb test/test.pdb test/afc.pdb
rm -rf gecode/gist/moc_treecanvas.cpp gecode/gist/moc_qtgist.cpp gecode/gist/moc_mainwindow.cpp gecode/gist/moc_textoutput.cpp gecode/gist/moc_preferences.cpp gecode/gist/moc_nodestats.cpp
rm -rf libgecodesupport.so.32.0.manifest libgecodekernel.so.32.0.manifest libgecodesearch.so.32.0.manifest libgecodeint.so.32.0.manifest libgecodeset.so.32.0.manifest libgecodeminimodel.so.32.0.manifest libgecodedriver.so.32.0.manifest \
        libgecodesupport.so.32.0.rc libgecodekernel.so.32.0.rc libgecodesearch.so.32.0.rc libgecodeint.so.32.0.rc libgecodeset.so.32.0.rc libgecodeminimodel.so.32.0.rc libgecodedriver.so.32.0.rc \
        libgecodesupport.so.32.0.res libgecodekernel.so.32.0.res libgecodesearch.so.32.0.res libgecodeint.so.32.0.res libgecodeset.so.32.0.res libgecodeminimodel.so.32.0.res libgecodedriver.so.32.0.res \
        libgecodesupport.exp libgecodekernel.exp libgecodesearch.exp libgecodeint.exp libgecodeset.exp libgecodeminimodel.exp libgecodedriver.exp
rm -rf examples/alpha examples/bacp examples/bibd examples/donald examples/efpa examples/eq20 examples/golomb-ruler examples/graph-color examples/grocery examples/ind-set examples/magic-sequence examples/magic-square examples/money examples/ortho-latin examples/partition examples/photo examples/queens examples/sudoku examples/kakuro examples/nonogram examples/pentominoes examples/crowded-chess examples/black-hole examples/minesweeper examples/domino examples/steel-mill examples/sports-league examples/all-interval examples/langford-number examples/warehouses examples/radiotherapy examples/word-square examples/crossword examples/open-shop examples/car-sequencing examples/sat examples/bin-packing examples/knights examples/tsp examples/perfect-square examples/schurs-lemma examples/dominating-queens examples/crew examples/golf examples/hamming examples/steiner examples/queen-armies examples/alpha.manifest examples/bacp.manifest examples/bibd.manifest examples/donald.manifest examples/efpa.manifest examples/eq20.manifest examples/golomb-ruler.manifest examples/graph-color.manifest examples/grocery.manifest examples/ind-set.manifest examples/magic-sequence.manifest examples/magic-square.manifest examples/money.manifest examples/ortho-latin.manifest examples/partition.manifest examples/photo.manifest examples/queens.manifest examples/sudoku.manifest examples/kakuro.manifest examples/nonogram.manifest examples/pentominoes.manifest examples/crowded-chess.manifest examples/black-hole.manifest examples/minesweeper.manifest examples/domino.manifest examples/steel-mill.manifest examples/sports-league.manifest examples/all-interval.manifest examples/langford-number.manifest examples/warehouses.manifest examples/radiotherapy.manifest examples/word-square.manifest examples/crossword.manifest examples/open-shop.manifest examples/car-sequencing.manifest examples/sat.manifest examples/bin-packing.manifest examples/knights.manifest examples/tsp.manifest examples/perfect-square.manifest examples/schurs-lemma.manifest examples/dominating-queens.manifest examples/crew.manifest examples/golf.manifest examples/hamming.manifest examples/steiner.manifest examples/queen-armies.manifest \
        examples/alpha.rc examples/bacp.rc examples/bibd.rc examples/donald.rc examples/efpa.rc examples/eq20.rc examples/golomb-ruler.rc examples/graph-color.rc examples/grocery.rc examples/ind-set.rc examples/magic-sequence.rc examples/magic-square.rc examples/money.rc examples/ortho-latin.rc examples/partition.rc examples/photo.rc examples/queens.rc examples/sudoku.rc examples/kakuro.rc examples/nonogram.rc examples/pentominoes.rc examples/crowded-chess.rc examples/black-hole.rc examples/minesweeper.rc examples/domino.rc examples/steel-mill.rc examples/sports-league.rc examples/all-interval.rc examples/langford-number.rc examples/warehouses.rc examples/radiotherapy.rc examples/word-square.rc examples/crossword.rc examples/open-shop.rc examples/car-sequencing.rc examples/sat.rc examples/bin-packing.rc examples/knights.rc examples/tsp.rc examples/perfect-square.rc examples/schurs-lemma.rc examples/dominating-queens.rc examples/crew.rc examples/golf.rc examples/hamming.rc examples/steiner.rc examples/queen-armies.rc examples/alpha.res examples/bacp.res examples/bibd.res examples/donald.res examples/efpa.res examples/eq20.res examples/golomb-ruler.res examples/graph-color.res examples/grocery.res examples/ind-set.res examples/magic-sequence.res examples/magic-square.res examples/money.res examples/ortho-latin.res examples/partition.res examples/photo.res examples/queens.res examples/sudoku.res examples/kakuro.res examples/nonogram.res examples/pentominoes.res examples/crowded-chess.res examples/black-hole.res examples/minesweeper.res examples/domino.res examples/steel-mill.res examples/sports-league.res examples/all-interval.res examples/langford-number.res examples/warehouses.res examples/radiotherapy.res examples/word-square.res examples/crossword.res examples/open-shop.res examples/car-sequencing.res examples/sat.res examples/bin-packing.res examples/knights.res examples/tsp.res examples/perfect-square.res examples/schurs-lemma.res examples/dominating-queens.res examples/crew.res examples/golf.res examples/hamming.res examples/steiner.res examples/queen-armies.res
rm -rf test/test test/test.manifest \
        test/test.rc test/test.res
rm -rf   \
         
-> make -j 5
make[1]: ディレクトリ `/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dep-selector-libgecode-1.0.2/ext/libgecode3/vendor/gecode-3.7.3' に入ります
perl ./misc/genvarimp.perl -typehpp ./gecode/int/var-imp/int.vis ./gecode/int/var-imp/bool.vis ./gecode/set/var-imp/set.vis > gecode/kernel/var-type.hpp
perl ./misc/genvarimp.perl -header ./gecode/int/var-imp/int.vis ./gecode/int/var-imp/bool.vis ./gecode/set/var-imp/set.vis > gecode/kernel/var-imp.hpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/support/exception.o  gecode/support/exception.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/support/heap.o  gecode/support/heap.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/support/thread/thread.o  gecode/support/thread/thread.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/support/thread/windows.o  gecode/support/thread/windows.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/support/thread/pthreads.o  gecode/support/thread/pthreads.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG     \
    -c -o gecode/kernel/archive.o  gecode/kernel/archive.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG     \
    -c -o gecode/kernel/core.o  gecode/kernel/core.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG     \
    -c -o gecode/kernel/memory-manager.o  gecode/kernel/memory-manager.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG     \
    -c -o gecode/kernel/branch.o  gecode/kernel/branch.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG     \
    -c -o gecode/kernel/region.o  gecode/kernel/region.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/stop.o  gecode/search/stop.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/options.o  gecode/search/options.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/parallel/engine.o  gecode/search/parallel/engine.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/dfs.o  gecode/search/dfs.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/parallel/dfs.o  gecode/search/parallel/dfs.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/bab.o  gecode/search/bab.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/parallel/bab.o  gecode/search/parallel/bab.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/restart.o  gecode/search/restart.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/search/parallel/restart.o  gecode/search/parallel/restart.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/int-set.o  gecode/int/int-set.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/var-imp/int.o  gecode/int/var-imp/int.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/var-imp/bool.o  gecode/int/var-imp/bool.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/var/int.o  gecode/int/var/int.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/var/bool.o  gecode/int/var/bool.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/array.o  gecode/int/array.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/bool.o  gecode/int/bool.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/bool/eqv.o  gecode/int/bool/eqv.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/extensional/dfa.o  gecode/int/extensional/dfa.cpp
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG    \
    -c -o gecode/int/extensional/tuple-set.o  gecode/int/extensional/tuple-set.cpp
g++: 内部エラー: 強制終了 (プログラム cc1plus)
完全なバグレポートを送ってください。
<http://bugzilla.redhat.com/bugzilla> に手順が書いてあります。
make[1]: *** [gecode/int/bool.o] エラー 1
make[1]: *** 未完了のジョブを待っています....
make[1]: ディレクトリ `/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dep-selector-libgecode-1.0.2/ext/libgecode3/vendor/gecode-3.7.3' から出ます
make: *** [compilelib] エラー 2
extconf.rb:98:in `block in run': Failed to build gecode library. (GecodeBuild::BuildError)
    from extconf.rb:97:in `chdir'
    from extconf.rb:97:in `run'
    from extconf.rb:104:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dep-selector-libgecode-1.0.2 for inspection.
Results logged to /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/dep-selector-libgecode-1.0.2/gem_make.out

こまけぇこたぁいいんだよ、回避方法はよ

EC2のinstance typem3.medium にあげる。

パワー不足で途中で落ちると、原因を探ろうにも探れないから苦労しますね。
Passenger入れたときもそうなんだけど、microインスタンスだと本当だめ。
Ruby入れるだけでも30分くらいかかっちゃうんで、何かインストール作業するときはおとなしくmediumくらいで実行するよろし

Railsアプリケーションにおいて、ファイルアップロードする際のウイルスチェックをClamAVで実装する

背景

手軽にファイルアップロード機能を実装するときにCarrierwaveをよく使うんですが、
ひょんなことから、アップロードされたファイルのウイルスチェックをする必要がでてきたので、
チェックするまでの手順を、ClamAVのインストールとチェック方法を主にまとめます。

ClamAVインストール手順

  1. ClamAVインストール
  2. ウイルス更新の設定ファイル修正
  3. ウイルスのパターンファイル更新
  4. ウイルスチェックの設定ファイル修正
  5. デーモン起動

上記手順のコマンド

$ sudo su -
$ yum remove -y clam*
$ yum install -y clamav clamav-scanner-sysvinit clamav-update

# 2. ウイルス更新の設定ファイル修正
$ sed -i -e "s/Example/#Example/" /etc/freshclam.conf
$ sed -i -e "s:#DatabaseDirectory /var/lib/clamav:DatabaseDirectory /var/lib/clamav:" /etc/freshclam.conf
$ sed -i -e "s:#UpdateLogFile /var/log/freshclam.log:UpdateLogFile /var/log/freshclam.log:" /etc/freshclam.conf
$ sed -i -e "s/#DatabaseOwner clamupdate/DatabaseOwner clamupdate/" /etc/freshclam.conf

# 3. ウイルスのパターンファイル更新
$ freshclam

# 4. ウイルスチェックの設定ファイル修正
$ sed -i -e "s/Example/#Example/" /etc/clamd.d/scan.conf
$ sed -i -e "s:#LocalSocket /var/run/clamd.scan/clamd.sock:LocalSocket /var/run/clamd.scan/clamd.sock:" /etc/clamd.d/scan.conf
$ sed -i -e "s/#FixStaleSocket yes/FixStaleSocket yes/" /etc/clamd.d/scan.conf
$ sed -i -e "s/#TCPSocket 3310/TCPSocket 3310/" /etc/clamd.d/scan.conf
$ sed -i -e "s/#TCPAddr 127.0.0.1/TCPAddr 127.0.0.1/" /etc/clamd.d/scan.conf
$ chown clamscan:clamscan /var/run/clamd.scan
$ ln -s /etc/clamd.d/scan.conf /etc/clamd.conf 

# 5. デーモン起動ついでにchkconfig設定
$ /etc/rc.d/init.d/clamd.scan start
$ /sbin/chkconfig clamd.scan on

# デーモンのソケットはclamscanユーザにしかrwがないので、その他ユーザも実行できるように権限設定
$ chmod 775 /var/run/clamd.scan/
  1. ウイルスのパターンファイル更新については、定期的に実行したいので、cronで仕込む必要があると思います。

Rails プロダクションコードからの呼び出し(アップロードファイルのウイルスチェック)

  1. gem インストール
  2. 環境変数設定
  3. コード組み込み

1. gem インストール(Rails.rootにて) && 2. 環境変数設定

$ echo "gem 'clamav-client', require: 'clamav/client'" >> Gemfile
$ bundle install
$ echo 'export CLAMD_UNIX_SOCKET="/var/run/clamd.scan/clamd.sock"' >> ~/.bash_profile
$ source ~/.bash_profile
  1. 環境変数設定 についてですが、clamav-clientはCLAMD_UNIX_SOCKETが設定されていると、そこをソケットパスとして参照しにいきます。
    clamav-clientがデフォルトで参照するソケットパスが/var/run/clamav/clamd.ctlであるため、yum でinstallしたClamAVの設定ファイルのソケットパスに合わせます。

3. コード組み込み

def upload_image
  client = ClamAV::Client.new
  io = StringIO.new(params["image"].tempfile.read)
  raise "detected virus" if client.execute(ClamAV::Commands::InstreamCommand.new(io)).virus_name.present?
end

プロダクションコードでやるというよりは、ウイルスチェック専用のサーバにpostして結果だけ受け取るような仕組みにしたいですね。

参考サイト

github.com www.agilegroup.co.jp ClamAV on Amazon Linux - ぬぞうWiki

EC2上でrails4.2.1のWebrickを起動後、tcp port 3000番でアクセスできなかった時の対応

概要

新たなサービスを立ち上げるならRubyもRailsも最新が良いよね〜ということで、

  • Ruby 2.2.2
  • Rails 4.2.1

で環境を作り、Webrickを起動してhttp://#{ip}:3000でアクセスしよ〜と思ったところ、
なぜか、アクセスできなかったので、その時の対応方法を書きます。

結果から言いますと

Rails 4.2系から、rails sを実行すると、デフォルトlocalhostしか受け付けなくなるので、
rails s -b 0.0.0.0とオプションを指定すると外部からアクセスできるようになります。

紆余曲折しました

EC2で構築しているもんで、最初ははいはいSecurity groupsの設定でしょ知ってるとか思ってたけど、思いっきり3000番空いてたのではまりました。

だいぶはまったんですが、下記コマンドでピーーーンときました。

$ lsof -i:3000
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
ruby    1545 ec2-user    9u  IPv4  13515      0t0  TCP localhost.localdomain:hbci (LISTEN)

ここのNAMEがlocalhost.localdomain:hbci (LISTEN)となってたんでついでに下記コマンドでも確認

$ netstat -tanp | grep LISTEN
tcp        0      0 127.0.0.1:3000              0.0.0.0:*                   LISTEN      2151/ruby

外部からアクセスできないのは、localhostで動いてるからなのだと確認。

/etc/sysconfig/iptablesとか色々疑ったけど、デフォルト設定がlocalhostになっていただけでした。

$ rails s -d -b 0.0.0.0

$ netstat -tanp | grep LISTEN
tcp        0      0 0.0.0.0:3000                0.0.0.0:*                   LISTEN      1652/ruby

$ lsof -i:3000
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
ruby    1702 ec2-user    9u  IPv4  14009      0t0  TCP *:hbci (LISTEN)

ActiveRecordのコールバックにハマったでござる

  1. 無限ループに泣く
class Hoge < ActiveRecord::Base
  before_update :update_hoge!, if: :fuga_changed?
  
  private
  
  def update_hoge!
    hoge = true
    save!
  end
end

Hoge.find(1).update_attributes!(fuga: true)
  1. コールバックが発火しない
class Hoge < ActiveRecord::Base
  before_update :update_hoge!, if: :fuga_changed?
  
  private
  
  def update_hoge!
    hoge = true
    save!
  end
end

Hoge.update_all(fuga: true)

小さな事だけど、結構はまってワロタ。

meshlabでオブジェクトを回転 / 移動させたい時の操作

やりたいこと

3Dオブジェクトの初期表示時は中心が定まっていない場合があるため、
回転 / 移動処理で任意の向きに調整させる。

オブジェクトを回転させる

メニュバーより、下記の通り選択
Filters => Normals, Curvatures and Orientation => Transform: Rotate

f:id:watasihasitujidesu:20141209194129p:plain

上記を選択すると、小窓が表示されるので、 previewチェックボックスをチェックした後に、Rotation Angleスクロールバーで調整。
Rotation onでx方向、y方向、z方向、それぞれ調整する。

f:id:watasihasitujidesu:20141209194124p:plain

その後Applyで調整を適用。

オブジェクトを移動させる

メニュバーより、下記の通り選択
Filters => Normals, Curvatures and Orientation => Transform: Move, Translate, Center

f:id:watasihasitujidesu:20141209194120p:plain

上記を選択すると、小窓が表示されるので、 previewチェックボックスをチェックした後に、/[X|Y|Z] Axis/スクロールバーで調整。

f:id:watasihasitujidesu:20141209194112p:plain

その後Applyで調整を適用

EC2上で動作するRails 4系アプリでRapidSSLを使ってhttps設定をするときの手順

ひょんなことからhttps設定することになったので、その手順をメモ書き程度に

1.何はともあれ証明書の購入

購入はどのサイトでも良いけど、自分は↓こちらを使いました。

SSLストア

 

2. CSRを作成

証明書購入をしたら、証明書を有効にするためにCSRという、認証局「このサーバーで使いますよ〜」サーバ証明書を発行するための署名要求」を作成する必要がある。

gist1f560cb75a2535d4a213

 

3.作成したCSRファイルをSSLストアに登録、使用者情報も登録、承認メールを受け取る

↓こんな感じのやつ

gisteb9bcef706b61b87ade1

 

4.受け取った承認メールの承認ボタンを押す

 

5. 承認ボタンを押したら、WEBサーバ証明書が送られてくるので、/usr/local/ssl配下に張り付け。

貼付ける部分は上記gistの通り、

-----BEGIN CERTIFICATE-----から

-----END CERTIFICATE-----まで。

ファイル名は適当で良いが、覚えやすいようにmy.crtとする。

 

6. 中間証明書とクロスルート証明書を合わせたmy.chain.crtを作成

apacheは中間証明書とクロスルート証明書をで良い(らしい)

↓ファイル名は単純にこんな感じで良い

gistf8f1c331c37158739333

 

7.apacheのconfファイルの設定

apachessl用の設定ファイルがあるので、そいつをいじる。

基本はそのままで良いが、いじる部分はVirtualHost内の項目と

先ほど設定した証明書類の置き場所の設定だけ。

/etc/httpd/conf.d/ssl.conf

gistabc12418e7eac2277bf7

 

8.EC2のsecurity groupにhttps(port:443)を追加

 

9. config/application.rbにsslにconfig.force_ssl = trueを追加

 

10.apache再起動

※ここで秘密鍵作成時のパスフレーズを聞かれるので入力。

 

httpの設定は難しいと思ってたけど、案外簡単だった。

スケールアウトして運用している場合の設定まではいきつかなかったけど、まずは単体サーバへの適用は学習できたので、次からはスムーズにいけるはず。

 

参考サイト

http://blog.genies-ag.jp/2011/08/amazon-ec2-amazon-linux-ssl.html

http://valuessl.net/support/etc/rapidsslre_cross/apache1.php

http://d.hatena.ne.jp/willnet/20110524/1306212796

AWSでEC2を立ち上げてからWebに公開するまでの手順をまとめてみた。※OpsWorks未使用

タイトルの通り、このたび1からEC2インスタンスを立ち上げて、Webサイトを立ち上げることになったので、公開するまで(passengerで動作するまで)にインストールするものをまとめてみました。

 

gist11095099

 

t1.microでインストール作業をすると恐ろしく時間がかかるので、インスタンスタイプはmediumでやっちゃうのがおすすめ。

※むしろt1.microだとpassengerインストール時にメモリ不足で落ちてしまう可能性があるので、medium推奨。

RailsからJavaScriptにデータを渡すgonではまった。

RailsからJavascriptにデータを渡すgonというgemをRails3.0を使用したシステム使ってたはまったのでメモついでに。

※最新バージョンは5.0.4

 

gonはcontroller側で

 

gon.valiable_name = "hogehoge"

 

と書くと、js側でも

 

alert(gon.valiable_name)

 

と記述できる訳ですが、Rails3.0で使うと下のコードの

gist9347978

この部分でエラー発生で終了してしましました。

gon_request.id = request.uuid

 

よくよく調べてみるとrequest.uuidはRails3.2.1から追加されたメソッドらしく、

Rails3.0 ではgonのバージョンを4.1.1に下げて使用しないと駄目らしいです。

 

文章にして書くと短いけど相当はまりました。

uuid (ActionDispatch::Request) - APIdock

 

 

ActiveMerchant(Paypal決済)の定期購読をキャンセルする方法。

ActiveMerchant(Paypal決済)の定期購読をキャンセルする方法はものすごく簡単。

一番簡単なのはPaypalの管理画面から手動でキャンセルする方法だけど、

ユーザ / PaypalAPIを通してキャンセルするには下記の方法がある。

 

gist9211591

account_idはgatewayのresponse.params['profile_id']で取得できる値。

即ち、response.params['profile_id']はDBに保存しておかないと、ユーザ側からキャンセルができなくなってしまうので、注意が必要。

 

Documentation for activemerchant (1.42.3)

https://www.paypalobjects.com/webstatic/ja_JP/developer/docs/pdf/pp_expresscheckout_advancedfeaturesguide_jp.pdf

ActiveMerchant(Paypal決済)で円決済を行う場合の注意点

ActiveMerchant(Paypal決済)で円決済を行う場合の処理を書いていたんだけど、どうもSandBoxのステータスを見ると、入力した金額の百分の一になってしまうので、調べてみると、

ActiveMerchantでは金額の入力をセント単位で扱うため、日本円にする場合は*100が必要とのこと。

 

gist9211347

 

危うくバーゲンセールになるとこだった。

Blenderで作成したデータをjson形式で出力する方法

Blenderモデリングをした後に、json形式で出力すればプログラムからも用意に扱えるはずと思い、探してみました。

 

必要なもの

  1. Blender本体( http://www.blender.org/download/ )
  2. エクスポータ( https://github.com/mrdoob/three.js )

手順

1.なにはともあれ、Blender本体をインストール。

ボクは最新安定版2.69 for mac をzip解凍し、appフォルダにコピーしました。

 

2.エクスポータをBlenderのscriptsフォルダにコピー

gist8845772

 

3.Blenderを起動し、File -> User Preferences -> (カテゴリの)Import-Exportを選択。

2で行ったコピーがうまくいけば、メニューの最下部にImport-Export: three.js formatが追加されているはずです。

 

4.有効にチェックし、Save User Settingsを押下

※Save User Settingsボタンを押さないと反映されません。

f:id:watasihasitujidesu:20140207000822p:plain

 

5.File -> Export にThree.js(.js)が表示されれば、完了。

 

 

 

Apache バーチャルホストの設定で2つのサイトを1つのVPSにまとめた

2つサイトを運営していますが、インフラ構成が

VPS2台・・・・・・4,500円 / 月

DBサーバ1台・・・1,500円 / 月

月額6,000円と、薄給のボクにとっては結構痛いので、VPS1台にMysqlを入れて、DBサーバーを解約 && 2つのサイトを1つのVPSにまとめることにしました。

 

用意するもの

VPS1台

サイトAのドメイン

サイトBのドメイン

Apache バーチャルホストの設定

もうね、なんで始めからこれをやらなかったのか泣けてくるくらい、簡単でした。

/etc/httpd/conf/httpd.confを下記の通り設定し、apachectl gracefulでapacheを再起動するだけでOKです。

Apache バーチャルホストの設定

※1行目のNameVirtualHost *:80を指定しないと下記のエラーが発生します。

 [warn] _default_ VirtualHost overlap on port 80, the first has precedence

 

説明

VPS のIPが 123.456.789.101だった場合、

サイトAとサイトBのドメイン設定で指定するIPを両方とも123.456.789.101に設定します。

=> http://site_Ahttp://site_BのURLを叩くと、両方とも123.456.789.101にアクセスしにいきます。

 

すると、Apacheはsite_Aからのアクセスは/www/example/app_nameA/publicを見に行くし、

site_Bからのアクセスは/www/example/app_nameB/publicを見に行きます。

ただそれだけ。

 

【Rails】Carrierwaveで画像リサイズ時、iPhone/iPadで縦写真用に撮影した画像が横になってしまう時の対応【gem】

Choistyle では、ユーザが登録した画像をCarrierwaveを使用して、S3に保存しています。

Carriawaveでは画像の形式チェックやリサイズなどなど、最適化処理をするわけなのですが、

iPhoneで縦写真を処理する場合になぜか横向きのままになってしまいます。

今日はその時の対処方法をば。

 

How to fix it to appear (image) is rotated uploade ...

 

7行目のimg.auto_orient!でexifから縦画像か横画像かを判定して処理してくれるようです。