Subject:
[ruby-ffi] Fun at Fedora 12
From:
"Dmitry A. Ustalov" <eveeel@gmail.com>
Date:
11/22/09 4:55 PM
To:
ruby-ffi

Hello! I'm trying to install ffi gem on my Fedora 12:

eveel@notazik{~}% sudo gem install ffi
Building native extensions.  This could take a while...
ERROR:  Error installing ffi:
	ERROR: Failed to build gem native extension.
...
make
gcc -I. -I. -I/usr/lib/ruby/1.8/i386-linux -I. -I/usr/lib/ruby/gems/
1.8/gems/ffi-0.5.3/ext/ffi_c/libffi/include -DRUBY_EXTCONF_H=
\"extconf.h\"  -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -pipe -Wall -Wp,-
D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-
size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fno-
strict-aliasing  -fPIC-Werror -Wunused -Wformat -Wimplicit -Wreturn-
type   -c Call.c
cc1: error: unrecognized command line option "-fPIC-Werror"
make: *** [Call.o] Error 1

It's really sad. Perhaps, trouble is in file ext/ffi_c/extconf.rb:
$CFLAGS << "-mwin32 " if Config::CONFIG['host_os'] =~ /cygwin/
$CFLAGS << "-Werror -Wunused -Wformat -Wimplicit -Wreturn-type "
maybe we need put a space character before -Werror gcc key?

Thanks.