Description of problem: I get errors trying to build the command-t vim plugin (which includes a compiled ruby extension). The errors come from including <ruby.h>, the plugin's code doesn't seem to be the cause. Version-Release number of selected component (if applicable): ruby-devel-2.0.0.195-8.fc19.x86_64 How reproducible: Always Steps to Reproduce: 1. Create: -- ext.c: #include <stdlib.h> #include <ruby.h> -- extconf.rb: require 'mkmf' have_header('ruby.h') create_makefile('ext') -- depend CFLAGS += -std=c99 2. Run: $ ruby extconf.rb checking for ruby.h... yes creating Makefile $ make Actual results: gcc -I. -I/usr/include/x86_64-linux -I/usr/include/ruby/backward -I/usr/include -I. -DHAVE_RUBY_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -std=c99 -o ext.o -c ext.c In file included from /usr/include/ruby/ruby.h:1567:0, from /usr/include/ruby.h:33, from ext.c:2: /usr/include/ruby/intern.h:323:1: error: unknown type name ‘fd_set’ typedef fd_set rb_fdset_t; ^ In file included from /usr/include/ruby/ruby.h:24:0, from /usr/include/ruby.h:33, from ext.c:2: /usr/include/ruby/intern.h:412:1: error: unknown type name ‘fd_set’ DEPRECATED(int rb_thread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *)); ^ /usr/include/ruby/intern.h:412:1: error: unknown type name ‘fd_set’ DEPRECATED(int rb_thread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *)); ^ /usr/include/ruby/intern.h:412:1: error: unknown type name ‘fd_set’ DEPRECATED(int rb_thread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *)); ^ make: *** [ext.o] Error 1 Additional info: I can't figure out what exactly causing it. Either of the following workarounds make the problem go away: - require <ruby.h> before <stdlib.h> (in ext.c) - remove the -std=c99 flag from `depend`
--- ruby-devel-2.0.0.195-8.fc19.i686/usr/include/ruby/intern.h 2013-03-20 22:36:23.000000000 +0900 +++ ruby-devel-2.0.0.247-12.fc19.i686/usr/include/ruby/intern.h 2013-06-19 04:18:15.000000000 +0900 @@ -36,6 +36,10 @@ #include <sys/types.h> #endif +#if defined(HAVE_SYS_TIME_H) +#include <sys/time.h> +#endif + #include "ruby/st.h" #if defined __GNUC__ && __GNUC__ >= 4 and with glibc-2.17, time.h includes bits/time.h, which includes sys/select.h, which defines fd_set. According to http://pubs.opengroup.org/onlinepubs/007904975/basedefs/sys/select.h.html , perhaps directly including sys/select.h seems preferable than time.h, however anyway with ruby 2.0.0p249 this is not reproducible.
(In reply to Mamoru TASAKA from comment #1) > and with glibc-2.17, time.h includes bits/time.h Before this, sys/time.h includes time.h.
There is related command-t bug report: https://wincent.com/issues/2098 And this seems to the fix in Ruby: https://github.com/ruby/ruby/commit/99035ca2621f7128d0e3a7f3a8acd8c3e2323e09#include/ruby/intern.h
ruby-2.0.0.247-12.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/FEDORA-2013-12663/ruby-2.0.0.247-12.fc19
Package ruby-2.0.0.247-13.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ruby-2.0.0.247-13.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-12663/ruby-2.0.0.247-13.fc19 then log in and leave karma (feedback).
Thanks, this update fixes the issue.
ruby-2.0.0.247-14.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.