Subject:
Re: [ruby-ffi] Fun at Fedora 12
From:
Bryan Kearney
Date:
11/23/09 7:17 AM
To:
ruby-ffi@googlegroups.com

On 11/22/2009 05:55 PM, Dmitry A. Ustalov wrote:
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.
give this a try:

http://bkearney.fedorapeople.org/rubygem-ffi-0.5.2-1.fc11.src.rpm

You can rebuild the srpm and the install the rpm. If you happen to be a packaged, I need a package approval for:

https://bugzilla.redhat.com/show_bug.cgi?id=533291

-- bk