Skip to content

Instantly share code, notes, and snippets.

@ashleygwilliams
Created May 18, 2015 21:55
Show Gist options
  • Save ashleygwilliams/97dc7eb34f43fdbf3952 to your computer and use it in GitHub Desktop.
Save ashleygwilliams/97dc7eb34f43fdbf3952 to your computer and use it in GitHub Desktop.
have_library: checking for main() in -lstdc++... -------------------- yes
"gcc -o conftest -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/x86_64-linux -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby/backward -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -fPIC conftest.c -L. -L/home/ag_dubs/.rvm/rubies/ruby-head/lib -Wl,-R/home/ag_dubs/.rvm/rubies/ruby-head/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/ag_dubs/.rvm/rubies/ruby-head/lib -L/home/ag_dubs/.rvm/rubies/ruby-head/lib -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"gcc -o conftest -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/x86_64-linux -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby/backward -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -fPIC conftest.c -L. -L/home/ag_dubs/.rvm/rubies/ruby-head/lib -Wl,-R/home/ag_dubs/.rvm/rubies/ruby-head/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/ag_dubs/.rvm/rubies/ruby-head/lib -L/home/ag_dubs/.rvm/rubies/ruby-head/lib -lruby -lstdc++ -lpthread -lgmp -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:13:32: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
int t(void) { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
^
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
13: int t(void) { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */
--------------------
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/ag_dubs/.rvm/rubies/ruby-head/bin/ruby -r ./siteconf20150518-23855-k8bl1y.rb extconf.rb
checking for main() in -lstdc++... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/ag_dubs/.rvm/gems/ruby-head/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.1/mkmf.log
make "DESTDIR=" clean
make "DESTDIR="
compiling unf.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
In file included from /home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby.h:33:0,
from unf.cc:3:
unf.cc: In function ‘VALUE unf_allocate(VALUE)’:
/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby/ruby.h:1035:65: error: invalid conversion from ‘void (*)(UNF::Normalizer*)’ to ‘RUBY_DATA_FUNC {aka void (*)(void*)}’ [-fpermissive]
VALUE result = rb_data_object_zalloc(klass, size, mark, free); \
^
/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby/ruby.h:1040:5: note: in expansion of macro ‘Data_Make_Struct0’
Data_Make_Struct0(data_struct_obj, klass, sizeof(type), mark, free, sval); \
^
unf.cc:36:17: note: in expansion of macro ‘Data_Make_Struct’
VALUE obj = Data_Make_Struct(klass, UNF::Normalizer, NULL, unf_delete, ptr);
^
/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby/ruby.h:1014:7: note: initializing argument 4 of ‘VALUE rb_data_object_zalloc(VALUE, size_t, RUBY_DATA_FUNC, RUBY_DATA_FUNC)’
VALUE rb_data_object_zalloc(VALUE,size_t,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
^
/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby/ruby.h:1036:19: error: invalid conversion from ‘void*’ to ‘UNF::Normalizer*’ [-fpermissive]
(void)((sval) = DATA_PTR(result));
^
/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby/ruby.h:1040:5: note: in expansion of macro ‘Data_Make_Struct0’
Data_Make_Struct0(data_struct_obj, klass, sizeof(type), mark, free, sval); \
^
unf.cc:36:17: note: in expansion of macro ‘Data_Make_Struct’
VALUE obj = Data_Make_Struct(klass, UNF::Normalizer, NULL, unf_delete, ptr);
^
Makefile:206: recipe for target 'unf.o' failed
make: *** [unf.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/ag_dubs/.rvm/gems/ruby-head/gems/unf_ext-0.0.7.1 for inspection.
Results logged to /home/ag_dubs/.rvm/gems/ruby-head/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.1/gem_make.out
An error occurred while installing unf_ext (0.0.7.1), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.1'` succeeds before bundling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment