Hi!
I am trying to build Ruby bindings for libvirt 0.4.1.
I have checked out ruby-libvirt from mercurial repository, but it
fails during the build:
# rake build
(in /home/lord/tmp/ruby-libvirt)
make
gcc -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -
I. -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -
fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -
mtune=generic -fasynchronous-unwind-tables -Wall -fPIC -c _libvirt.c
_libvirt.c:165: error: expected Б─≤,Б─≥ or Б─≤;Б─≥ before Б─≤{Б─≥ token
make: *** [_libvirt.o] Error 1
rake aborted!
Command failed with status (2): [make...]
/home/lord/tmp/ruby-libvirt/Rakefile:52
(See full trace by running task with --trace)
The offending line is:
NORETURN(static void vir_error(virConnectPtr conn, const char *fn)) {
rb_raise(rb_eSystemCallError, "libvir call %s failed", fn);
}
removing NORETURN macro around function definition eliminates the
error and all tests pass:
# rake test
(in /home/lord/tmp/ruby-libvirt)
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/
rake_test_loader
Started
.....
Finished in 0.006453 seconds.
5 tests, 58 assertions, 0 failures, 0 errors
Here is some information about my system:
# gcc --version
gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
# cat /etc/redhat-release
CentOS release 5 (Final)
# arch
i686
Sincerely,
Vadim