package configuration for libffi is not found have_header: checking for ffi.h... -------------------- no "gcc -o conftest -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -L. -L/home/sisira/.rbenv/versions/2.7.4/lib -Wl,-rpath,/home/sisira/.rbenv/versions/2.7.4/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/home/sisira/.rbenv/versions/2.7.4/lib -L/home/sisira/.rbenv/versions/2.7.4/lib -lruby -lm -lc" checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return !!argv[argc]; 6: } /* end */ "gcc -E -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -o conftest.i" conftest.c:3:10: fatal error: ffi.h: No such file or directory 3 | #include | ^~~~~~~ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include /* end */ -------------------- find_header: checking for ffi.h in /usr/local/include,/usr/include/ffi,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi... -------------------- no "gcc -E -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -o conftest.i" conftest.c:3:10: fatal error: ffi.h: No such file or directory 3 | #include | ^~~~~~~ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include /* end */ "gcc -E -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC -I/usr/local/include conftest.c -o conftest.i" conftest.c:3:10: fatal error: ffi.h: No such file or directory 3 | #include | ^~~~~~~ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include /* end */ "gcc -E -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC -I/usr/include/ffi conftest.c -o conftest.i" conftest.c:3:10: fatal error: ffi.h: No such file or directory 3 | #include | ^~~~~~~ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include /* end */ "gcc -E -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi conftest.c -o conftest.i" conftest.c:3:10: fatal error: ffi.h: No such file or directory 3 | #include | ^~~~~~~ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include /* end */ "gcc -E -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi conftest.c -o conftest.i" conftest.c:3:10: fatal error: ffi.h: No such file or directory 3 | #include | ^~~~~~~ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include /* end */ -------------------- block in append_ldflags: checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS... -------------------- yes "gcc -o conftest -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -L. -L/home/sisira/.rbenv/versions/2.7.4/lib -Wl,-rpath,/home/sisira/.rbenv/versions/2.7.4/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/home/sisira/.rbenv/versions/2.7.4/lib -L/home/sisira/.rbenv/versions/2.7.4/lib -lruby -Wl,--exclude-libs,ALL -lm -lc" checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return !!argv[argc]; 6: } /* end */ -------------------- have_func: checking for rb_gc_mark_movable()... -------------------- yes "gcc -o conftest -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -L. -L/home/sisira/.rbenv/versions/2.7.4/lib -Wl,-rpath,/home/sisira/.rbenv/versions/2.7.4/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--exclude-libs,ALL -Wl,-rpath,/home/sisira/.rbenv/versions/2.7.4/lib -L/home/sisira/.rbenv/versions/2.7.4/lib -lruby -lm -lc" 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: int (* volatile tp)(void)=(int (*)(void))&t; 9: printf("%d", (*tp)()); 10: } 11: 12: return !!argv[argc]; 13: } 14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_gc_mark_movable; return !p; } /* end */ -------------------- block in append_ldflags: checking for whether -pthread is accepted as LDFLAGS... -------------------- yes "gcc -o conftest -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0/ruby/backward -I/home/sisira/.rbenv/versions/2.7.4/include/ruby-2.7.0 -I. -g -O2 -fPIC conftest.c -L. -L/home/sisira/.rbenv/versions/2.7.4/lib -Wl,-rpath,/home/sisira/.rbenv/versions/2.7.4/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--exclude-libs,ALL -Wl,-rpath,/home/sisira/.rbenv/versions/2.7.4/lib -L/home/sisira/.rbenv/versions/2.7.4/lib -lruby -pthread -lm -lc" checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return !!argv[argc]; 6: } /* end */ -------------------- extconf.h is: /* begin */ 1: #ifndef EXTCONF_H 2: #define EXTCONF_H 3: #define HAVE_FFI_PREP_CIF_VAR 1 4: #define USE_INTERNAL_LIBFFI 1 5: #define HAVE_RB_GC_MARK_MOVABLE 1 6: #endif /* end */