Ruby1.9.1 をコンパイルするとハングしてスワップがいっぱいになる

StackOverflow https://stackoverflow.com/questions/2815862

  •  26-09-2019
  •  | 
  •  

質問

次の手順を実行して、Ubuntu 8.04 サーバー LTS (64 ビット) で Ruby 1.9.1-p376 をコンパイルしています。

$ ./configure
$ make
$ sudo make install

./configure 不満なく動作します。

make すべての RAM とスワップがなくなるまで、無期限にハングします。次の出力の後、スタックします。

compiling ripper
make[1]: Entering directory `/tmp/ruby1.9.1/ruby-1.9.1-p376/ext/ripper'
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/ripper -I../.. -I../../. -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC  -O2 -g -Wall -Wno-parentheses  -o ripper.o -c ripper.c

を実行すると、 gcc 手動でコマンドを実行します。 -v 詳細な出力を取得するための引数を使用すると、次の後にハングします。

Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
 /usr/lib/gcc/x86_64-linux-gnu/4.2.4/cc1 -quiet -v -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/ripper -I../.. -I../../. -DRUBY_EXTCONF_H="extconf.h" ripper.c -quiet -dumpbase ripper.c -mtune=generic -auxbase-strip ripper.o -g -O2 -Wall -Wno-parentheses -version -fPIC -fstack-protector -fstack-protector -o /tmp/ccRzHvYH.s
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
ignoring duplicate directory "../.././ext/ripper"
ignoring duplicate directory "../../."
#include "..." search starts here:
#include <...> search starts here:
 .
 ../../.ext/include/x86_64-linux
 ../.././include
 ../..
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include
 /usr/include
End of search list.
GNU C version 4.2.4 (Ubuntu 4.2.4-1ubuntu4) (x86_64-linux-gnu)
    compiled by GNU C version 4.2.4 (Ubuntu 4.2.4-1ubuntu4).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32795
Compiler executable checksum: 6e11fa7ca85fc28646173a91f2be2ea3

参考のために別のコンピューターで Ruby をコンパイルしたところ、次の出力が表示されるまでに約 10 秒かかりました (上記の出力後) Compiler executable checksum ライン):

COLLECT_GCC_OPTIONS='-v' '-I.' '-I../../.ext/include/i686-linux' '-I../.././include' '-I../.././ext/ripper' '-I../..' '-I../../.' '-DRUBY_EXTCONF_H="extconf.h"' '-D_FILE_OFFSET_BITS=64' '-fPIC' '-O2' '-g' '-Wall' '-Wno-parentheses' '-o' 'ripper.o' '-c' '-mtune=generic' '-march=i486'
 as -V -Qy -o ripper.o /tmp/cca4fa7R.s
GNU assembler version 2.20 (i486-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.20
COMPILER_PATH=/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-I.' '-I../../.ext/include/i686-linux' '-I../.././include' '-I../.././ext/ripper' '-I../..' '-I../../.' '-DRUBY_EXTCONF_H="extconf.h"' '-D_FILE_OFFSET_BITS=64' '-fPIC' '-O2' '-g' '-Wall' '-Wno-parentheses' '-o' 'ripper.o' '-c' '-mtune=generic' '-march=i486'

私は持っている 絶対に ここで何が問題になっているのかまったくわかりません。どこから始めればよいでしょうか?

編集:fsck出力

$ sudo fsck -n
fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
Warning!  /dev/sda1 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
/dev/sda1 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 557058 has zero dtime.  Fix? no

Inodes that were part of a corrupted orphan linked list found.  Fix? no

Inode 557059 was part of the orphaned inode list.  IGNORED.
Inode 557060 was part of the orphaned inode list.  IGNORED.
Inode 557061 was part of the orphaned inode list.  IGNORED.
Inode 557062 was part of the orphaned inode list.  IGNORED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (2026992, counted=2014241).
Fix? no

Inode bitmap differences:  -(557058--557062)
Fix? no

Free inodes count wrong (1130174, counted=1129768).
Fix? no


/dev/sda1: ********** WARNING: Filesystem still has errors **********

/dev/sda1: 115010/1245184 files (0.7% non-contiguous), 463376/2490368 blocks
役に立ちましたか?

解決

必要がある:

sudo apt-get update
sudo apt-get -y install libc6-dev libssl-dev libmysql++-dev libsqlite3-dev make build-essential libssl-dev libreadline5-dev zlib1g-dev

その後、再度 Ruby をインストールしてみてください。

編集:

以下を試すこともできます:

sudo apt-get install ruby1.9.1-full

または、1.9.1 の別のリビジョンを試してください。

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz

それがあなたのマシンなのか、それとも Ruby コードなのかを確認してください。

他のヒント

Ruby-1.9.1-p378 をコンパイルするときに、私のシステム (Ubuntu 8.04) でもまったく同じ問題が発生しました。以前のバージョンの Ruby に戻しました (ルビー-1.9.1-p243) 問題は発生しませんでした。試してみてください。

私は、Ruby 1.9.3とCentOSの5.6でこの問題を持っていた100万事について試してみました。最後に、私は私のCentOSのマシン上でapt-getをインストールしてから走っます:

sudo apt-get update
sudo apt-get upgrade

このは(関係ありませんでした他の人の間で)以下のパッケージをアップグレードします:

libffi (3.0.5-1.el5 => 3.0.9-1.el5.rf)
libffi-devel (3.0.5-1.el5 => 3.0.9-1.el5.rf)
libyaml (0.1.2-3.el5 => 0.1.4-1.el5.rf)
libyaml-devel (0.1.2-3.el5 => 0.1.4-1.el5.rf)

何とかこれを修正していること。

私は全く分から理由や方法を持っていないが、それは最終的にはRubyが完了し、インストール許されていることは間違いなく、これをします。

ファイルシステムの破損をチェックます。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top