make
        BASERUBY = /usr/bin/ruby --disable=gems
        CC = gcc
        LD = /usr/ccs/bin/ld
        LDSHARED = gcc -shared
        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 -Wno-cast-function-type -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Werror=misleading-indentation -Wno-overlength-strings -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wmissing-noreturn -Wimplicit-fallthrough=0 -Werror=duplicated-cond -Werror=restrict
        XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -DCANONICALIZATION_FOR_MATHN
        CPPFLAGS = -std=gnu99 -D_XOPEN_SOURCE=700   -I. -I.ext/include/x86_64-solaris2.11 -I./include -I. -I./enc/unicode/10.0.0
        DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
        SOLIBS = -lz -lpthread -lrt -lrt -lgmp -lsocket -ldl -lcrypt -lm
        LANG = cs_CZ.UTF-8
        LC_ALL =
        LC_CTYPE =
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

generating parse.c
copying lex.c
compiling parse.c
compiling proc.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
signal.c: In function ruby_abort:
signal.c:969:1: warning: noreturn function does return
 }
 ^
signal.c: At top level:
cc1: warning: unrecognized command line option -Wno-cast-function-type
cc1: warning: unrecognized command line option -Wno-self-assign
cc1: warning: unrecognized command line option -Wno-constant-logical-operand
cc1: warning: unrecognized command line option -Wno-parentheses-equality
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
generating id.c
id.c updated
compiling symbol.c
compiling thread.c
thread_pthread.c: In function ubf_wakeup_thread:
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread_pthread.c:1321:67: note: in expansion of macro thread_id_str
     thread_debug("thread_wait_queue_wakeup (%"PRI_THREAD_ID")\n", thread_id_str(th));
                                                                   ^~~~~~~~~~~~~
thread.c: In function terminate_all:
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:521:5: note: in expansion of macro thread_id_str
     thread_id_str(th), thread_status_name(th, TRUE));
     ^~~~~~~~~~~~~
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:525:5: note: in expansion of macro thread_id_str
     thread_id_str(th), thread_status_name(th, TRUE));
     ^~~~~~~~~~~~~
thread.c: In function thread_join_sleep:
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:954:9: note: in expansion of macro thread_id_str
         thread_id_str(target_th));
         ^~~~~~~~~~~~~
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:963:8: note: in expansion of macro thread_id_str
        thread_id_str(target_th), thread_status_name(target_th, TRUE));
        ^~~~~~~~~~~~~
thread.c: In function thread_join:
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:986:4: note: in expansion of macro thread_id_str
    thread_id_str(target_th), thread_status_name(target_th, TRUE));
    ^~~~~~~~~~~~~
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:1000:4: note: in expansion of macro thread_id_str
    thread_id_str(target_th), thread_status_name(target_th, TRUE));
    ^~~~~~~~~~~~~
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:1009:9: note: in expansion of macro thread_id_str
         thread_id_str(target_th), thread_status_name(target_th, TRUE));
         ^~~~~~~~~~~~~
thread.c: In function rb_thread_kill:
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:2374:73: note: in expansion of macro thread_id_str
     thread_debug("rb_thread_kill: %p (%"PRI_THREAD_ID")\n", (void *)th, thread_id_str(th));
                                                                         ^~~~~~~~~~~~~
thread.c: In function debug_deadlock_check:
thread.c:325:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define thread_id_str(th) ((void *)(th)->thread_id)
                             ^
thread.c:5158:29: note: in expansion of macro thread_id_str
       th->self, (void *)th, thread_id_str(th), th->ec->interrupt_flag);
                             ^~~~~~~~~~~~~
thread.c: At top level:
cc1: warning: unrecognized command line option -Wno-cast-function-type
cc1: warning: unrecognized command line option -Wno-self-assign
cc1: warning: unrecognized command line option -Wno-constant-logical-operand
cc1: warning: unrecognized command line option -Wno-parentheses-equality
compiling time.c
compiling transcode.c
compiling util.c
util.c: In function ruby_qsort:
util.c:200:24: warning: passing argument 4 of qsort_s from incompatible pointer type [-Wincompatible-pointer-types]
 # define cmp_bsd_qsort cmp_ms_qsort
                        ^
util.c:199:70: note: in definition of macro qsort_r
 # define qsort_r(base, nel, size, arg, cmp) qsort_s(base, nel, size, cmp, arg)
                                                                      ^~~
util.c:224:37: note: in expansion of macro cmp_bsd_qsort
     qsort_r(base, nel, size, &args, cmp_bsd_qsort);
                                     ^~~~~~~~~~~~~
In file included from /usr/include/stdlib.h:12:0,
                 from ./include/ruby/defines.h:121,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from util.c:16:
/usr/include/iso/stdlib_iso.h:147:16: note: expected int (*)(const void *, const void *, void *) but argument is of type int (*)(void *, const void *, const void *)
 extern errno_t qsort_s(void *, rsize_t, rsize_t,
                ^~~~~~~
util.c: At top level:
cc1: warning: unrecognized command line option -Wno-cast-function-type
cc1: warning: unrecognized command line option -Wno-self-assign
cc1: warning: unrecognized command line option -Wno-constant-logical-operand
cc1: warning: unrecognized command line option -Wno-parentheses-equality
compiling variable.c
compiling version.c
compiling vm_backtrace.c
compiling vm_dump.c
vm_dump.c: In function rb_vmdebug_stack_dump_all_threads:
vm_dump.c:1087:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  fprintf(stderr, "th: %p, native_id: %p\n", (void *)th, (void *)th->thread_id);
                                                         ^
vm_dump.c: At top level:
cc1: warning: unrecognized command line option -Wno-cast-function-type
cc1: warning: unrecognized command line option -Wno-self-assign
cc1: warning: unrecognized command line option -Wno-constant-logical-operand
cc1: warning: unrecognized command line option -Wno-parentheses-equality
compiling vm_trace.c
processing probes in object files
compiling enc/ascii.c
compiling enc/us_ascii.c
compiling enc/unicode.c
compiling enc/utf_8.c
generating enc/trans/newline.c ...
converter for universal_newline
converter for crlf_newline
converter for cr_newline
done.  (0.04user 0.02system 0.01elapsed)
compiling enc/trans/newline.c
compiling ./missing/explicit_bzero.c
compiling ./missing/flock.c
compiling ./missing/isinf.c
compiling ./missing/setproctitle.c
compiling addr2line.c
compiling dmyenc.c
linking miniruby
building .ext/include/x86_64-solaris2.11/rb_mjit_min_header-2.6.0.h
./miniruby -I./lib -I. -I.ext/common  ./tool/transform_mjit_header.rb "gcc " rb_mjit_header.h .ext/include/x86_64-solaris2.11/rb_mjit_min_header-2.6.0.h

Transforming external functions to static:
transform_mjit_header: making external definition of 'rb_vm_pop_cfunc_frame' static inline
transform_mjit_header: making external definition of 'rb_vm_opt_struct_aset' static inline
transform_mjit_header: making external definition of 'rb_vm_opt_struct_aref' static inline
transform_mjit_header: making external definition of 'rb_simple_iseq_p' static inline
transform_mjit_header: making external definition of 'rb_eql_opt' static inline
transform_mjit_header: changing definition of 'rb_equal_opt' to declaration
transform_mjit_header: changing definition of 'rb_vm_search_method_slowpath' to declaration
transform_mjit_header: making external definition of 'rb_vm_rewrite_cref' static inline
transform_mjit_header: making external definition of 'rb_vm_frame_method_entry' static inline
transform_mjit_header: making external definition of 'rb_vm_bh_to_procval' static inline
transform_mjit_header: making external definition of 'rb_error_arity' static inline
transform_mjit_header: making external definition of 'rb_vm_pop_frame' static inline
transform_mjit_header: making external definition of 'rb_vm_push_frame' static inline
transform_mjit_header: making external definition of 'rb_ec_stack_overflow' static inline
transform_mjit_header: making declaration of 'rb_ec_stack_overflow' static inline
transform_mjit_header: making external definition of 'ruby_vm_special_exception_copy' static inline
transform_mjit_header: making external definition of 'rb_vm_block_ep_update' static inline
transform_mjit_header: making external definition of 'rb_vm_cref_new_toplevel' static inline
transform_mjit_header: making external definition of 'rb_vm_frame_block_handler' static inline
transform_mjit_header: making external definition of 'rb_vm_ep_local_ep' static inline
transform_mjit_header: making declaration of 'rb_vm_frame_method_entry' static inline
transform_mjit_header: making declaration of 'rb_vm_rewrite_cref' static inline
transform_mjit_header: making declaration of 'rb_vm_bh_to_procval' static inline
transform_mjit_header: making declaration of 'rb_vm_pop_frame' static inline
transform_mjit_header: making declaration of 'rb_vm_frame_block_handler' static inline
transform_mjit_header: making declaration of 'rb_vm_block_ep_update' static inline
transform_mjit_header: making declaration of 'rb_vm_ep_local_ep' static inline
transform_mjit_header: making declaration of 'rb_eql_opt' static inline
transform_mjit_header: making declaration of 'ruby_vm_special_exception_copy' static inline
transform_mjit_header: making declaration of 'rb_vm_pop_cfunc_frame' static inline
transform_mjit_header: making external definition of 'rb_scan_args_set' static inline
transform_mjit_header: making declaration of 'rb_scan_args_set' static inline
transform_mjit_header: making declaration of 'rb_error_arity' static inline
ln -sf ../../../.ext/include/x86_64-solaris2.11/rb_mjit_min_header-2.6.0.h include/ruby-2.6.0/x86_64-solaris2.11/rb_mjit_min_header-2.6.0.h
./revision.h updated
/usr/bin/gmkdir -p enc/jis
+ cp enc/jis/props.h.blt enc/jis/props.h
generating encdb.h
./template/encdb.h.tmpl:36: [BUG] Segmentation fault at 0x00000000403264b0
ruby 2.6.0dev (2018-09-08) [x86_64-solaris2.11]

-- Control frame information -----------------------------------------------
c:0011 p:---- s:0066 e:000065 CFUNC  :sort_by
c:0010 p:0034 s:0062 e:000061 BLOCK  ./template/encdb.h.tmpl:36 [FINISH]
c:0009 p:---- s:0058 e:000057 CFUNC  :each
c:0008 p:0090 s:0054 E:0017f0 EVAL   ./template/encdb.h.tmpl:34 [FINISH]
c:0007 p:---- s:0043 e:000042 CFUNC  :eval
c:0006 p:0041 s:0035 e:000034 METHOD /root/ruby/lib/erb.rb:892
c:0005 p:0010 s:0030 E:0020e0 BLOCK  ./tool/generic_erb.rb:42
c:0004 p:0104 s:0027 E:001810 BLOCK  ./tool/generic_erb.rb:42 [FINISH]
c:0003 p:---- s:0022 e:000021 CFUNC  :map
c:0002 p:0128 s:0018 E:0006b0 EVAL   ./tool/generic_erb.rb:35 [FINISH]
c:0001 p:0000 s:0003 E:001060 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
./tool/generic_erb.rb:35:in `<main>'
./tool/generic_erb.rb:35:in `map'
./tool/generic_erb.rb:42:in `block in <main>'
./tool/generic_erb.rb:42:in `block (2 levels) in <main>'
/root/ruby/lib/erb.rb:892:in `result'
/root/ruby/lib/erb.rb:892:in `eval'
./template/encdb.h.tmpl:34:in `block (2 levels) in <main>'
./template/encdb.h.tmpl:34:in `each'
./template/encdb.h.tmpl:36:in `block (3 levels) in <main>'
./template/encdb.h.tmpl:36:in `sort_by'

-- C level backtrace information -------------------------------------------
/root/ruby/miniruby(rb_vm_bugreport+0x82) [0x7fffbf59a7a2] vm_dump.c:704
/root/ruby/miniruby(rb_bug_context+0xf1) [0x7fffbf3cb8b1] error.c:610
/root/ruby/miniruby(sigsegv+0x6c) [0x7fffbf4f9c1c] signal.c:980
/lib/amd64/libc.so.1(__sighndlr+0x6) [0x7fffbea4ebe6]
/lib/amd64/libc.so.1(call_user_handler+0x2f1) [0x7fffbea406b1]
[0x403264b0]
/root/ruby/miniruby(ruby_qsort+0x31) [0x7fffbf563aa1] util.c:224
/root/ruby/miniruby(enum_sort_by+0x323) [0x7fffbf3b9173] enum.c:1169
/root/ruby/miniruby(vm_call_cfunc+0x141) [0x7fffbf57ff41] vm_insnhelper.c:1932
/root/ruby/miniruby(vm_call_method+0xdb) [0x7fffbf58407b] vm_insnhelper.c:2422
/root/ruby/miniruby(vm_exec_core+0x686) [0x7fffbf58c2b6] /root/ruby/insns.def:721
/root/ruby/miniruby(rb_vm_exec+0xa3) [0x7fffbf5823a3] vm.c:1810
/root/ruby/miniruby(invoke_iseq_block_from_c+0x4f4) [0x7fffbf5835d4] vm.c:1007
/root/ruby/miniruby(rb_yield+0xf9) [0x7fffbf584919] vm.c:1077
/root/ruby/miniruby(rb_ary_each+0x44) [0x7fffbf344024] array.c:1831
/root/ruby/miniruby(vm_call_cfunc+0x141) [0x7fffbf57ff41] vm_insnhelper.c:1932
/root/ruby/miniruby(vm_call_method+0xdb) [0x7fffbf58407b] vm_insnhelper.c:2422
/root/ruby/miniruby(vm_exec_core+0x686) [0x7fffbf58c2b6] /root/ruby/insns.def:721
/root/ruby/miniruby(rb_vm_exec+0xa3) [0x7fffbf5823a3] vm.c:1810
/root/ruby/miniruby(rb_f_eval+0x224) [0x7fffbf5865f4] vm_eval.c:1343
/root/ruby/miniruby(vm_call_cfunc+0x141) [0x7fffbf57ff41] vm_insnhelper.c:1932
/root/ruby/miniruby(vm_call_method+0xdb) [0x7fffbf58407b] vm_insnhelper.c:2422
/root/ruby/miniruby(vm_exec_core+0x153) [0x7fffbf58bd83] /root/ruby/insns.def:774
/root/ruby/miniruby(rb_vm_exec+0xa3) [0x7fffbf5823a3] vm.c:1810
/root/ruby/miniruby(invoke_iseq_block_from_c+0x4f4) [0x7fffbf5835d4] vm.c:1007
/root/ruby/miniruby(rb_yield_force_blockarg+0xe2) [0x7fffbf5851c2] vm.c:1077
/root/ruby/miniruby(rb_ary_collect+0x64) [0x7fffbf346124] array.c:2752
/root/ruby/miniruby(vm_call_cfunc+0x141) [0x7fffbf57ff41] vm_insnhelper.c:1932
/root/ruby/miniruby(vm_call_method+0xdb) [0x7fffbf58407b] vm_insnhelper.c:2422
/root/ruby/miniruby(vm_exec_core+0x686) [0x7fffbf58c2b6] /root/ruby/insns.def:721
/root/ruby/miniruby(rb_vm_exec+0x92c) [0x7fffbf582c2c] vm.c:1819
/root/ruby/miniruby(ruby_exec_internal+0xdd) [0x7fffbf3d27ad] eval.c:261
/root/ruby/miniruby(ruby_run_node+0x42) [0x7fffbf3d7222] eval.c:325
/root/ruby/miniruby(main+0x71) [0x7fffbf33e3f1] ./main.c:42

-- Other runtime information -----------------------------------------------

* Loaded script: ./tool/generic_erb.rb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 /root/ruby/lib/cgi/util.rb
    5 /root/ruby/lib/erb.rb
    6 /root/ruby/lib/optparse.rb
    7 /root/ruby/tool/vpath.rb
    8 /root/ruby/tool/colorize.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

*** Signal 6 - core dumped
The following command caused the error:
./miniruby -I./lib -I. -I.ext/common  ./tool/generic_erb.rb -c -o encdb.h ./template/encdb.h.tmpl ./enc enc
make: Fatal error: Command failed for target `encdb.h'