You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been unable to build 0.0.6 (or any earlier version) on Fedora 20 for ruby 1.8.7 with gcc 4.8.2. gcc 4.8.2 + ruby 2.0.0 builds as expected. I used a Gentoo box and was able to get 0.0.6 to build for ruby 1.8.7 using gcc 4.7.2.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/jhoblitt/.rvm/rubies/ruby-1.8.7-p374/bin/ruby extconf.rb
checking for main() in -lstdc++... yes
checking for ruby/encoding.h... yes
creating Makefile
CXX is automatically set to g++
make
g++ -I. -I. -I/home/jhoblitt/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/x86_64-linux -I. -DHAVE_RUBY_ENCODING_H -fPIC -O2 -fno-tree-dce -fno-optimize-sibling-calls -fPIC -c unf.cc
In file included from unf.cc:5:0:
/usr/include/ruby/encoding.h:102:68: error: expected identifier before numeric constant
PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
^
/usr/include/ruby/encoding.h:102:68: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/ruby/encoding.h:102:73: error: expected constructor, destructor, or type conversion before ‘;’ token
PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
^
/usr/include/ruby/encoding.h:115:99: error: expected identifier before numeric constant
PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4);
^
/usr/include/ruby/encoding.h:115:99: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/ruby/encoding.h:115:104: error: expected constructor, destructor, or type conversion before ‘;’ token
PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4);
^
In file included from unf.cc:5:0:
/usr/include/ruby/encoding.h:216:65: error: declaration of C function ‘long int rb_memsearch(const void*, long int, const void*, long int, rb_encoding*)’ conflicts with
long rb_memsearch(const void*,long,const void*,long,rb_encoding*);
^
In file included from /home/jhoblitt/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/x86_64-linux/ruby.h:756:0,
from unf.cc:3:
/home/jhoblitt/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/x86_64-linux/intern.h:387:6: error: previous declaration ‘long int rb_memsearch(const void*, long int, const void*, long int)’ here
long rb_memsearch _((const void*,long,const void*,long));
^
make: *** [unf.o] Error 1
Gem files will remain installed in /home/jhoblitt/github/puppetlabs-concat/.bundle/ruby/1.8/gems/unf_ext-0.0.6 for inspection.
Results logged to /home/jhoblitt/github/puppetlabs-concat/.bundle/ruby/1.8/gems/unf_ext-0.0.6/ext/unf_ext/gem_make.out
An error occurred while installing unf_ext (0.0.6), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.6'` succeeds before bundling.
The text was updated successfully, but these errors were encountered:
Sorry for replying too late. It looks like the compiler is using header files for ruby >=1.9, because ruby/encoding.h first appeared in ruby 1.9.1. I know the ruby-devel package inappropriately installs the header files directly under the system include directory, and it didn't get a fix before its EOL. You either need to temporarily uninstall ruby-devel or specify --with-opt-include=/path/to/ruby/1.8/headers, I suppose.
I've been unable to build 0.0.6 (or any earlier version) on Fedora 20 for ruby 1.8.7 with gcc 4.8.2. gcc 4.8.2 + ruby 2.0.0 builds as expected. I used a Gentoo box and was able to get 0.0.6 to build for ruby 1.8.7 using gcc 4.7.2.
gcc version (fedora 20):
Build error:
The text was updated successfully, but these errors were encountered: