just pulled this and had to change Gemfile to remove the eventmachine version requirement. here's some output:
$sudo gem install eventmachine -v '0.12.10'
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
rubymain.cpp: In function ‘VALUE t_connect_server(VALUE, VALUE, VALUE)’:
rubymain.cpp:468:42: error: format not a string literal and no format arguments [-Werror=format-security]
rubymain.cpp: In function ‘VALUE t_bind_connect_server(VALUE, VALUE, VALUE, VALUE, VALUE)’:
rubymain.cpp:488:42: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors
make: *** [rubymain.o] Error 1
Gem files will remain installed in /var/lib/gems/1.9.1/gems/eventmachine-0.12.10 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out
Ubuntu 12.10 btw
I have managed to compile the ext directory (the one which does not compile) removing the -Werror=format-security flag from the compiler options in ext/Makefile.
But now I dont know how to manually install the gem (I have not any experience with Ruby). Somebody knows how to manually install this gem or how to perform the installation with my "edited gem"? If I try to use "gem install" again, it overwrites my changes :(
If seems that this flag is added by Ubuntu 12.10 as a default CFLAG, and used then by Ruby Gem. Other possible solution is to disable this default flag, but I cannot find where these flags are configured :'(
Finally I found the solution! I will leave it here because it may be useful for a lot of people.
$ sudo bundle config build.eventmachine --with-cflags="-O2 -pipe -march=native -w"
$ sudo bundle install
I found it here gitlabhq/gitlabhq#1051 (comment)
Interesting, thanks for you help ;)
Thanks, this was a big help to me as well.