Skip to content

Instantly share code, notes, and snippets.

@zunda
Last active May 6, 2018 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zunda/9c33b499e137a1b08a622c2e1bee2feb to your computer and use it in GitHub Desktop.
Save zunda/9c33b499e137a1b08a622c2e1bee2feb to your computer and use it in GitHub Desktop.
Struggling to build gems with native extensions
$ ruby23 --version
ruby 2.3.6p384 (2017-12-14 revision 61254) [x86_64-netbsd]
$ bundle23 install --path=vendor/bundle
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using bundler 1.16.1
Fetching ffi 1.9.23
Installing ffi 1.9.23 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/sdf/arpa/tz/z/zunda/local/src/ptread-test/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.23/ext/ffi_c
/usr/pkg/bin/ruby23 -r ./siteconf20180506-390-o3uie4.rb extconf.rb
checking for ffi.h... yes
checking for ffi_call() in -lffi... yes
checking for ffi_closure_alloc()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... yes
creating extconf.h
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/sdf/arpa/tz/z/zunda/local/src/ptread-test/vendor/bundle/ruby/2.3.0/extensions/x86_64-netbsdelf/2.3.0/ffi-1.9.23/mkmf.log
current directory:
/sdf/arpa/tz/z/zunda/local/src/ptread-test/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.23/ext/ffi_c
make "DESTDIR=" clean
current directory:
/sdf/arpa/tz/z/zunda/local/src/ptread-test/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.23/ext/ffi_c
make "DESTDIR="
compiling AbstractMemory.c
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:285:42: error: conflicting types for 'pthread_t'
typedef struct pthread_st *pthread_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:65:30: note: previous declaration of 'pthread_t'
was here
typedef struct __pthread_st *pthread_t;
^
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:286:42: error: conflicting types for 'pthread_attr_t'
typedef struct pthread_attr_st *pthread_attr_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:66:34: note: previous declaration of
'pthread_attr_t' was here
typedef struct __pthread_attr_st pthread_attr_t;
^
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:288:42: error: conflicting types for 'pthread_once_t'
typedef int pthread_once_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:71:34: note: previous declaration of
'pthread_once_t' was here
typedef struct __pthread_once_st pthread_once_t;
^
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:289:42: error: conflicting types for
'pthread_mutexattr_t'
typedef int pthread_mutexattr_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:68:39: note: previous declaration of
'pthread_mutexattr_t' was here
typedef struct __pthread_mutexattr_st pthread_mutexattr_t;
^
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:290:42: error: conflicting types for
'pthread_mutex_t'
typedef struct pthread_mutex_st *pthread_mutex_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:67:35: note: previous declaration of
'pthread_mutex_t' was here
typedef struct __pthread_mutex_st pthread_mutex_t;
^
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:291:42: error: conflicting types for
'pthread_condattr_t'
typedef int pthread_condattr_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:70:38: note: previous declaration of
'pthread_condattr_t' was here
typedef struct __pthread_condattr_st pthread_condattr_t;
^
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:292:42: error: conflicting types for 'pthread_cond_t'
typedef struct pthread_cond_st *pthread_cond_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:69:34: note: previous declaration of
'pthread_cond_t' was here
typedef struct __pthread_cond_st pthread_cond_t;
^
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:293:42: error: conflicting types for
'pthread_rwlockattr_t'
typedef int pthread_rwlockattr_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:74:40: note: previous declaration of
'pthread_rwlockattr_t' was here
typedef struct __pthread_rwlockattr_st pthread_rwlockattr_t;
^
In file included from Thread.h:50:0,
from Call.h:36,
from Function.h:48,
from AbstractMemory.c:49:
/usr/pkg/include/pthread.h:294:42: error: conflicting types for
'pthread_rwlock_t'
typedef struct pthread_rwlock_st *pthread_rwlock_t;
^
In file included from /usr/include/sys/types.h:360:0,
from AbstractMemory.c:32:
/usr/include/pthread_types.h:73:36: note: previous declaration of
'pthread_rwlock_t' was here
typedef struct __pthread_rwlock_st pthread_rwlock_t;
^
AbstractMemory.c:182:0: warning: "bswap16" redefined [enabled by default]
#define bswap16(x) (((x) >> 8) & 0xff) | (((x) << 8) & 0xff00);
^
In file included from /usr/include/amd64/bswap.h:13:0,
from /usr/include/sys/endian.h:107,
from /usr/include/amd64/endian.h:3,
from /usr/include/sys/types.h:98,
from AbstractMemory.c:32:
/usr/include/sys/bswap.h:72:0: note: this is the location of the previous
definition
#define bswap16(x) \
^
*** Error code 1
Stop.
make: stopped in
/sdf/arpa/tz/z/zunda/local/src/ptread-test/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.23/ext/ffi_c
make failed, exit code 1
Gem files will remain installed in
/sdf/arpa/tz/z/zunda/local/src/ptread-test/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.23
for inspection.
Results logged to
/sdf/arpa/tz/z/zunda/local/src/ptread-test/vendor/bundle/ruby/2.3.0/extensions/x86_64-netbsdelf/2.3.0/ffi-1.9.23/gem_make.out
An error occurred while installing ffi (1.9.23), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.9.23'` succeeds before bundling.
In Gemfile:
ffi
"pkg-config --exists libffi"
| pkg-config --libs libffi
=> "-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lffi \n"
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
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/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
package configuration for libffi is not found
have_header: checking for ffi.h... -------------------- yes
"gcc -E -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ffi.h>
/* end */
--------------------
have_library: checking for ffi_call() in -lffi... -------------------- yes
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ffi.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: printf("%p", &t);
11: }
12:
13: return 0;
14: }
15: int t(void) { void ((*volatile p)()); p = (void ((*)()))ffi_call; return !p; }
/* end */
--------------------
have_func: checking for ffi_closure_alloc()... -------------------- yes
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:13:57: error: 'ffi_closure_alloc' undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))ffi_closure_alloc; return !p; }
^
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
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 ((*)()))ffi_closure_alloc; return !p; }
/* end */
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
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: extern void ffi_closure_alloc();
14: int t(void) { ffi_closure_alloc(); return 0; }
/* end */
--------------------
have_func: checking for ffi_raw_call()... -------------------- yes
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:13:57: error: 'ffi_raw_call' undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))ffi_raw_call; return !p; }
^
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
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 ((*)()))ffi_raw_call; return !p; }
/* end */
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
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: extern void ffi_raw_call();
14: int t(void) { ffi_raw_call(); return 0; }
/* end */
--------------------
have_func: checking for ffi_prep_raw_closure()... -------------------- yes
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:13:57: error: 'ffi_prep_raw_closure' undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))ffi_prep_raw_closure; return !p; }
^
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
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 ((*)()))ffi_prep_raw_closure; return !p; }
/* end */
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
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: extern void ffi_prep_raw_closure();
14: int t(void) { ffi_prep_raw_closure(); return 0; }
/* end */
--------------------
have_header: checking for shlwapi.h... -------------------- no
"gcc -E -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -o conftest.i"
conftest.c:3:21: fatal error: shlwapi.h: No such file or directory
#include <shlwapi.h>
^
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <shlwapi.h>
/* end */
--------------------
have_func: checking for rb_thread_blocking_region()... -------------------- no
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:13:57: error: 'rb_thread_blocking_region' undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return !p; }
^
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
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 ((*)()))rb_thread_blocking_region; return !p; }
/* end */
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
/var/tmp//ccMcmTas.o: In function `t':
conftest.c:(.text+0x7): undefined reference to `rb_thread_blocking_region'
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: extern void rb_thread_blocking_region();
14: int t(void) { rb_thread_blocking_region(); return 0; }
/* end */
--------------------
have_func: checking for rb_thread_call_with_gvl()... -------------------- yes
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:13:57: error: 'rb_thread_call_with_gvl' undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_call_with_gvl; return !p; }
^
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
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 ((*)()))rb_thread_call_with_gvl; return !p; }
/* end */
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
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: extern void rb_thread_call_with_gvl();
14: int t(void) { rb_thread_call_with_gvl(); return 0; }
/* end */
--------------------
have_func: checking for rb_thread_call_without_gvl()... -------------------- yes
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:13:57: error: 'rb_thread_call_without_gvl' undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_call_without_gvl; return !p; }
^
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
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 ((*)()))rb_thread_call_without_gvl; return !p; }
/* end */
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
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: extern void rb_thread_call_without_gvl();
14: int t(void) { rb_thread_call_without_gvl(); return 0; }
/* end */
--------------------
have_func: checking for ffi_prep_cif_var()... -------------------- yes
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:13:57: error: 'ffi_prep_cif_var' undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))ffi_prep_cif_var; return !p; }
^
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
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 ((*)()))ffi_prep_cif_var; return !p; }
/* end */
"gcc -o conftest -I/usr/pkg/include/ruby-2.3.0/x86_64-netbsd -I/usr/pkg/include/ruby-2.3.0/ruby/backward -I/usr/pkg/include/ruby-2.3.0 -I. -I/usr/include -I/usr/pkg/include -O2 -D_FORTIFY_SOURCE=2 -pthread -I/usr/include -I/usr/pkg/include -fPIC -pipe conftest.c -L. -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -fstack-protector -Wl,-export-dynamic -lffi -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -lruby23 -lffi -lexecinfo -lpthread -lcrypt -lm -lc"
ld: warning: libexecinfo.so.0, needed by /usr/pkg/lib/libruby23.so, may conflict with libexecinfo.so.1
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
ld: warning: libpthread.so.1, needed by /usr/pkg/lib/libruby23.so, may conflict with libpthread.so.20
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: extern void ffi_prep_cif_var();
14: int t(void) { ffi_prep_cif_var(); return 0; }
/* end */
--------------------
extconf.h is:
/* begin */
1: #ifndef EXTCONF_H
2: #define EXTCONF_H
3: #define HAVE_FFI_H 1
4: #define HAVE_FFI_CLOSURE_ALLOC 1
5: #define HAVE_FFI_RAW_CALL 1
6: #define HAVE_FFI_PREP_RAW_CLOSURE 1
7: #define HAVE_RAW_API 1
8: #define HAVE_RB_THREAD_CALL_WITH_GVL 1
9: #define HAVE_RB_THREAD_CALL_WITHOUT_GVL 1
10: #define HAVE_FFI_PREP_CIF_VAR 1
11: #define RUBY_1_9 1
12: #endif
/* end */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment