2012-07-09 5 views
1

Windows 7 x64에서 번들 설치를 시도하고 있지만 ffi gem의 기본 확장을 설치하는 동안 오류가 발생합니다. 내 Gemfile에는 ffi 보석이 없습니다. 유일한 의존은 '카피 바라'에 있습니다.ffi gem을 설치할 수 없습니다.

두 번째 이상한 점은 capybara가 "test"환경에 대해서만 내 Gemfile에 언급되어 있지만 "번들 설치"를 수행 할 때는 개발 환경을 사용해야합니다. 왜 "테스트"섹션을 구문 분석합니까?

source 'http://rubygems.org' 
gem 'rake', '0.9.2.2' 
gem 'rails', '3.2.1' 

... 

group :test do 
    if RUBY_PLATFORM =~ /(win32|w32)/ 
    gem 'win32console' 
    end 
    ... 
    gem 'capybara' 
    ... 
end 

나는 FFI의 이전 버전을 설치할 수 있지만 카피 바라 새로운 하나를 필요로한다.

오류 텍스트 :

Installing ffi (1.0.11) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     C:/Ruby193/bin/ruby.exe extconf.rb 
checking for ffi.h... no 
checking for ffi.h in /usr/local/include... no 
checking for rb_thread_blocking_region()... yes 
checking for ruby_native_thread_p()... yes 
checking for rb_thread_call_with_gvl()... yes 
creating extconf.h 
creating Makefile 

make 
generating ffi_c-i386-mingw32.def 
Configuring libffi 
make -C "/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi" 
make[1]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi' 
make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/in 
stall -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/i 
nstall -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh /c/Ruby193/lib/ 
ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTF 
LAGS=" "SHELL=/bin/sh" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr 
/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=c:/program files (x86)/mingw/mingw32/bin/ld.exe" "NM=/c/Program Files 
(x86)/MinGW/bin/nm" "RANLIB=ranlib" "DESTDIR=" all-recursive 
make[2]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi' 
Making all in include 
make[3]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/include' 
make[3]: Nothing to be done for `all'. 
make[3]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/include' 
Making all in testsuite 
make[3]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite' 
make[3]: Nothing to be done for `all'. 
make[3]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite' 
Making all in man 
make[3]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/man' 
make[3]: Nothing to be done for `all'. 
make[3]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/man' 
make[3]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi' 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fe 
xceptions -c -o src/debug.lo src/debug.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/debug.c - 
DDLL_EXPORT -DPIC -o src/.libs/debug.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fe 
xceptions -c -o src/prep_cif.lo src/prep_cif.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/prep_cif.c 
    -DDLL_EXPORT -DPIC -o src/.libs/prep_cif.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fe 
xceptions -c -o src/types.lo src/types.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/types.c - 
DDLL_EXPORT -DPIC -o src/.libs/types.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fe 
xceptions -c -o src/raw_api.lo src/raw_api.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/raw_api.c 
-DDLL_EXPORT -DPIC -o src/.libs/raw_api.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fe 
xceptions -c -o src/java_raw_api.lo src/java_raw_api.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/java_raw_a 
pi.c -DDLL_EXPORT -DPIC -o src/.libs/java_raw_api.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fe 
xceptions -c -o src/closures.lo src/closures.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/closures.c 
    -DDLL_EXPORT -DPIC -o src/.libs/closures.o 
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fe 
xceptions -c -o src/x86/ffi.lo src/x86/ffi.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/x86/ffi.c 
-DDLL_EXPORT -DPIC -o src/x86/.libs/ffi.o 
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I. -I./include -Iinc 
lude -I./src -c -o src/x86/win32.lo src/x86/win32.S 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I. -I./include -Iinclude -I./src -c sr 
c/x86/win32.S -DDLL_EXPORT -DPIC -o src/x86/.libs/win32.o 
/bin/sh ./libtool --tag=CC --mode=link gcc -Wall -g -fexceptions -version-info `grep -v '^#' ./libtool-version` - 
no-undefined -o libffi.la -rpath /usr/local/lib src/debug.lo src/prep_cif.lo src/types.lo src/raw_api.lo src/java_r 
aw_api.lo src/closures.lo src/x86/ffi.lo src/x86/win32.lo 
libtool: link: gcc -o .libs/libffi.dll.a src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api 
.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/win32.o  `echo "X" | /usr/bin/ 
sed -e 1s/^X// -e 's/ -lc$//'` -link -dll 
c:/program files (x86)/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -link 
collect2: ld returned 1 exit status 
make[3]: *** [libffi.la] Error 1 
make[3]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi' 
make[2]: *** [all-recursive] Error 1 
make[2]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi' 
make[1]: *** [all] Error 2 
make[1]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi' 
make: *** ["/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi"/.libs/libffi_convenience.a] Error 2 


Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11 for inspection. 
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/gem_make.out 
An error occured while installing ffi (1.0.11), and Bundler cannot continue. 
Make sure that `gem install ffi -v '1.0.11'` succeeds before bundling. 
+1

번들은 기본적으로 모든 그룹의 보석을 설치합니다. 예를 들어'bundles install --with test development'와 같이 명시 적으로 그룹을 제외시켜야합니다. –

+0

어떤 오류가 발생 했습니까? – Thilo

+0

"찾을 수없는 링크 - ...... ......" – Paul

답변

0

FFI의 1.3.1 버전이이를 해결했습니다. 아직도 카피 바라를 설치할 수는 없습니다.

관련 문제