when compiling ruby 2.2.0 in centos 6.4, you may meet this problem:
make: Entering directory `/home/work/ruby-2.2.0/ext/fiddle' linking shared-object fiddle.so /usr/bin/ld: ./libffi-3.2.1/.libs/libffi.a(raw_api.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC ./libffi-3.2.1/.libs/libffi.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [../../.ext/x86_64-linux/fiddle.so] Error 1 make: Leaving directory `/home/work/ruby-2.2.0/ext/fiddle' make: *** [ext/fiddle/all] Error 2 make: Leaving directory `/home/work/ruby-2.2.0' make: *** [build-ext] Error 2
it says there’s some problems with fiddle, so you may wanna reinstall fiddle-devel, which would be told by forums after googling a bit while.
actually the way that worked for me is to enter the directory of ‘ruby-2.2.0/ext/fiddle’ and do :
ruby extconf.rb make sudo make install
now have fun compiling ruby 2.2.0 ^_^