make: Entering directory '/Users/hsbt/Documents/github.com/ruby/ruby/.x86_64-darwin'
	BASERUBY = /Users/hsbt/.rbenv/shims/ruby --disable=gems --disable=gems --disable=gems --disable=gems --disable=gems --disable=gems --disable=gems --disable=gems --disable=gems --disable=gems --disable=gems --disable=gems
	CC = clang
	LD = ld
	LDSHARED = clang -dynamic -bundle
	CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -Werror=division-by-zero -Werror=deprecated-declarations -Wno-overlength-strings -Wmissing-noreturn -Werror=extra-tokens   -pipe 
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -DRUBY_EXPORT -fPIE -DCANONICALIZATION_FOR_MATHN
	CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin17 -I../include -I.. -I../enc/unicode/10.0.0 
	DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-pie -framework Foundation  
	SOLIBS = -lpthread -lgmp -ldl -lobjc
	LANG = 
	LC_ALL = 
	LC_CTYPE = UTF-8
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
compiling ../thread.c
../thread.c:4199:43: error: implicit declaration of function 'init_set_fd' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    args.read = (events & RB_WAITFD_IN) ? init_set_fd(fd, &rfds) : NULL;
                                          ^
../thread.c:4199:41: warning: pointer/integer type mismatch in conditional expression ('int' and 'void *') [-Wconditional-type-mismatch]
    args.read = (events & RB_WAITFD_IN) ? init_set_fd(fd, &rfds) : NULL;
                                        ^ ~~~~~~~~~~~~~~~~~~~~~~   ~~~~
../thread.c:4200:43: warning: pointer/integer type mismatch in conditional expression ('int' and 'void *') [-Wconditional-type-mismatch]
    args.write = (events & RB_WAITFD_OUT) ? init_set_fd(fd, &wfds) : NULL;
                                          ^ ~~~~~~~~~~~~~~~~~~~~~~   ~~~~
../thread.c:4201:44: warning: pointer/integer type mismatch in conditional expression ('int' and 'void *') [-Wconditional-type-mismatch]
    args.except = (events & RB_WAITFD_PRI) ? init_set_fd(fd, &efds) : NULL;
                                           ^ ~~~~~~~~~~~~~~~~~~~~~~   ~~~~
../thread.c:4235:2: error: implicit declaration of function 'threadptr_trap_interrupt' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        threadptr_trap_interrupt(mth);
        ^
../thread.c:4235:2: note: did you mean 'rb_threadptr_interrupt'?
../vm_core.h:1742:6: note: 'rb_threadptr_interrupt' declared here
void rb_threadptr_interrupt(rb_thread_t *th);
     ^
../thread.c:4298:5: error: implicit declaration of function 'ubf_wakeup_all_threads' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ubf_wakeup_all_threads();
    ^
../thread.c:4312:9: error: implicit declaration of function 'TIMER_THREAD_CREATED_P' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (TIMER_THREAD_CREATED_P() && native_stop_timer_thread()) {
        ^
../thread.c:4312:37: error: implicit declaration of function 'native_stop_timer_thread' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (TIMER_THREAD_CREATED_P() && native_stop_timer_thread()) {
                                    ^
../thread.c:4312:37: note: did you mean 'rb_thread_stop_timer_thread'?
../thread.c:4310:1: note: 'rb_thread_stop_timer_thread' declared here
rb_thread_stop_timer_thread(void)
^
../thread.c:4313:2: error: implicit declaration of function 'native_reset_timer_thread' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        native_reset_timer_thread();
        ^
../thread.c:4313:2: note: did you mean 'native_stop_timer_thread'?
../thread.c:4312:37: note: 'native_stop_timer_thread' declared here
    if (TIMER_THREAD_CREATED_P() && native_stop_timer_thread()) {
                                    ^
../thread.c:4327:5: error: implicit declaration of function 'rb_thread_create_timer_thread' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    rb_thread_create_timer_thread();
    ^
../thread.c:4327:5: note: did you mean 'rb_thread_reset_timer_thread'?
../thread.c:4318:1: note: 'rb_thread_reset_timer_thread' declared here
rb_thread_reset_timer_thread(void)
^
../thread.c:4372:5: error: implicit declaration of function 'gvl_atfork' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    gvl_atfork(th->vm);
    ^
../thread.c:4381:5: error: implicit declaration of function 'rb_native_mutex_initialize' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    rb_native_mutex_initialize(&vm->waitpid_lock);
    ^
../thread.c:4392:2: error: implicit declaration of function 'rb_mutex_abandon_keeping_mutexes' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        rb_mutex_abandon_keeping_mutexes(th);
        ^
../thread.c:4393:2: error: implicit declaration of function 'rb_mutex_abandon_locking_mutex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        rb_mutex_abandon_locking_mutex(th);
        ^
../thread.c:4393:2: note: did you mean 'rb_mutex_abandon_keeping_mutexes'?
../thread.c:4392:2: note: 'rb_mutex_abandon_keeping_mutexes' declared here
        rb_mutex_abandon_keeping_mutexes(th);
        ^
../thread.c:4394:2: error: implicit declaration of function 'thread_cleanup_func' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        thread_cleanup_func(th, TRUE);
        ^
../thread.c:4406:5: error: implicit declaration of function 'rb_mutex_cleanup_keeping_mutexes' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    rb_mutex_cleanup_keeping_mutexes(th);
    ^
../thread.c:4406:5: note: did you mean 'rb_mutex_abandon_keeping_mutexes'?
../thread.c:4392:2: note: 'rb_mutex_abandon_keeping_mutexes' declared here
        rb_mutex_abandon_keeping_mutexes(th);
        ^
../thread.c:4417:2: error: implicit declaration of function 'thread_cleanup_func_before_exec' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        thread_cleanup_func_before_exec(th);
        ^
../thread.c:4635:75: error: implicit declaration of function 'mutex_alloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    return TypedData_Wrap_Struct(klass, &thread_shield_data_type, (void *)mutex_alloc(0));
                                                                          ^
../thread.c:4635:67: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
    return TypedData_Wrap_Struct(klass, &thread_shield_data_type, (void *)mutex_alloc(0));
                                                                  ^
../thread.c:4684:5: error: use of undeclared identifier 'rb_mutex_t'; did you mean 'rb_mutex_new'?
    rb_mutex_t *m;
    ^~~~~~~~~~
    rb_mutex_new
../include/ruby/intern.h:886:7: note: 'rb_mutex_new' declared here
VALUE rb_mutex_new(void);
      ^
../thread.c:4684:17: error: use of undeclared identifier 'm'
    rb_mutex_t *m;
                ^
../thread.c:4687:5: error: implicit declaration of function 'GetMutexPtr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    GetMutexPtr(mutex, m);
    ^
../thread.c:4687:24: error: use of undeclared identifier 'm'
    GetMutexPtr(mutex, m);
                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 warnings and 20 errors generated.
make: *** [Makefile:398: thread.o] Error 1
make: Leaving directory '/Users/hsbt/Documents/github.com/ruby/ruby/.x86_64-darwin'