ffi-tk
ffi-tk copied to clipboard
compilation error: StructLayout.c:363:9: error: lvalue required as left operand of assignment
I was trying to install ver on my Ubuntu 12.04, but installation failed on ffi-tk package. I got the same error message with gem versions 1.9.1 and 2.0.0.
Is there some way to get around this error?
sudo gem install ffi-tk [sudo] password for sjs: Building native extensions. This could take a while... ERROR: Error installing ffi-tk: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
extconf.rb:6:in <main>': Use RbConfig instead of obsolete and deprecated Config. extconf.rb:6:in
make compiling Type.c compiling Platform.c compiling Types.c compiling AutoPointer.c compiling Buffer.c compiling Call.c Call.c: In function ‘rbffi_CallFunction’: Call.c:301:9: warning: ‘rb_thread_blocking_region’ is deprecated (declared at /usr/local/include/ruby-2.0.0/ruby/intern.h:830) [-Wdeprecated-declarations] compiling StructLayout.c StructLayout.c: In function ‘struct_field_initialize’: StructLayout.c:85:9: warning: variable ‘nargs’ set but not used [-Wunused-but-set-variable] StructLayout.c: In function ‘struct_layout_initialize’: StructLayout.c:363:9: error: lvalue required as left operand of assignment make: *** [StructLayout.o] Error 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.0.0/gems/ffi-0.6.3 for inspection. Results logged to /usr/local/lib/ruby/gems/2.0.0/gems/ffi-0.6.3/ext/ffi_c/gem_make.out
sudo gem1.9.1 install ffi-tk Building native extensions. This could take a while... ERROR: Error installing ffi-tk: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:6: Use RbConfig instead of obsolete and deprecated Config. checking for ffi_call() in -lffi... yes checking for ffi_prep_closure()... yes checking for ffi_raw_call()... yes checking for ffi_prep_raw_closure()... yes checking for rb_thread_blocking_region()... yes creating extconf.h creating Makefile
make compiling Type.c compiling Platform.c compiling Types.c compiling AutoPointer.c compiling Buffer.c compiling Call.c compiling StructLayout.c StructLayout.c: In function ‘struct_layout_initialize’: StructLayout.c:363:9: error: lvalue required as left operand of assignment make: *** [StructLayout.o] Error 1
Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-0.6.3 for inspection. Results logged to /var/lib/gems/1.9.1/gems/ffi-0.6.3/ext/ffi_c/gem_make.out
I got this error fixed by changing in Rakefile 'ffi' => {:version => '= 0.6.3'}, to: 'ffi' => {:version => '= 1.3.1'},
@sj5 thanks, preparing a new release.