Haldrik
05-16-2016, 04:25 PM
Hiya,
I figured I would keep some notes on my lich/mac install.
1) Ruby install
The first thing I noticed is that the instructions on the lich website does not install the correct ruby version.
6.) Install Ruby 2.1
In the terminal, type brew install ruby and press the ENTER key.
This installs ruby 2.3, not ruby 2.1. I'm googling to see how I can go about installing 2.1. I'll let ya know.
2) I used rbenv to get 2.1 installed. Not sure if its working yet as I'm not getting past the next step.
3) gtk2 install. Not working
Clearly rbenv does not appear to be working because its trying to install to version in the ruby 2.3 folders.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-14/2.3.0/glib2-2.2.0/mkmf.log
current directory: /usr/local/lib/ruby/gems/2.3.0/gems/glib2-2.2.0/ext/glib2
make "DESTDIR=" clean
current directory: /usr/local/lib/ruby/gems/2.3.0/gems/glib2-2.2.0/ext/glib2
make "DESTDIR="
compiling glib-enum-types.c
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wunavailable-declarations'? [-Wunknown-warning-option]
glib-enum-types.c:1181:9: error: use of undeclared identifier 'G_WIN32_OS_ANY'
{ G_WIN32_OS_ANY, "G_WIN32_OS_ANY", "any" },
^
glib-enum-types.c:1182:9: error: use of undeclared identifier 'G_WIN32_OS_WORKSTATION'
{ G_WIN32_OS_WORKSTATION, "G_WIN32_OS_WORKSTATION", "workstation" },
^
glib-enum-types.c:1183:9: error: use of undeclared identifier 'G_WIN32_OS_SERVER'
{ G_WIN32_OS_SERVER, "G_WIN32_OS_SERVER", "server" },
^
1 warning and 3 errors generated.
make: *** [glib-enum-types.o] Error 1
4) GTK Install with Ruby 2.1.9
I managed to get Ruby 2.1.9 installed, same error.
Building native extensions. This could take a while...
/Users/bryan/.rbenv/versions/2.1.9/lib/ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /Users/bryan in PATH, mode 040707
ERROR: Error installing gtk2:
ERROR: Failed to build gem native extension.
/Users/bryan/.rbenv/versions/2.1.9/bin/ruby extconf.rb
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler... yes
checking for -Wmissing-format-attribute option to compiler... yes
checking for -Wmissing-include-dirs option to compiler... yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler... yes
checking for -Wnested-externs option to compiler... yes
checking for -Wold-style-definition option to compiler... yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wswitch-default option to compiler... yes
checking for -Wswitch-enum option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for rb_define_alloc_func() in ruby.h... yes
checking for rb_block_proc() in ruby.h... yes
checking for new allocation framework... yes
checking for attribute assignment... no
checking for Win32 OS... no
checking for gobject-2.0 version (>= 2.12.0)... yes
checking for gthread-2.0... yes
checking for unistd.h... yes
checking for io.h... no
checking for g_spawn_close_pid() in glib.h... yes
checking for g_thread_init() in glib.h... yes
checking for g_main_depth() in glib.h... yes
checking for g_listenv() in glib.h... yes
checking for rb_check_array_type() in ruby.h... yes
checking for rb_check_hash_type() in ruby.h... yes
checking for rb_exec_recursive() in ruby.h... yes
checking for rb_errinfo() in ruby.h... yes
checking for rb_sourcefile() in ruby.h... yes
checking for rb_sourceline() in ruby.h... yes
checking for ruby_set_current_source() in ruby.h... no
checking for rb_thread_blocking_region() in ruby.h... yes
checking for ruby_native_thread_p() in ruby.h... yes
checking for rb_thread_call_with_gvl() in ruby.h... yes
checking for rb_str_new_cstr() in ruby.h... yes
checking for rb_gc_register_mark_object() in ruby.h... yes
checking for rb_exc_new_str() in ruby.h... yes
checking for curr_thread in ruby.h,node.h... no
checking for rb_curr_thread in ruby.h,node.h... no
creating ruby-glib2.pc
creating glib-enum-types.c
creating glib-enum-types.h
creating Makefile
make "DESTDIR="
compiling glib-enum-types.c
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wunavailable-declarations'? [-Wunknown-warning-option]
glib-enum-types.c:1181:9: error: use of undeclared identifier 'G_WIN32_OS_ANY'
{ G_WIN32_OS_ANY, "G_WIN32_OS_ANY", "any" },
^
glib-enum-types.c:1182:9: error: use of undeclared identifier 'G_WIN32_OS_WORKSTATION'
{ G_WIN32_OS_WORKSTATION, "G_WIN32_OS_WORKSTATION", "workstation" },
^
glib-enum-types.c:1183:9: error: use of undeclared identifier 'G_WIN32_OS_SERVER'
{ G_WIN32_OS_SERVER, "G_WIN32_OS_SERVER", "server" },
^
1 warning and 3 errors generated.
make: *** [glib-enum-types.o] Error 1
make failed, exit code 2
I figured I would keep some notes on my lich/mac install.
1) Ruby install
The first thing I noticed is that the instructions on the lich website does not install the correct ruby version.
6.) Install Ruby 2.1
In the terminal, type brew install ruby and press the ENTER key.
This installs ruby 2.3, not ruby 2.1. I'm googling to see how I can go about installing 2.1. I'll let ya know.
2) I used rbenv to get 2.1 installed. Not sure if its working yet as I'm not getting past the next step.
3) gtk2 install. Not working
Clearly rbenv does not appear to be working because its trying to install to version in the ruby 2.3 folders.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-14/2.3.0/glib2-2.2.0/mkmf.log
current directory: /usr/local/lib/ruby/gems/2.3.0/gems/glib2-2.2.0/ext/glib2
make "DESTDIR=" clean
current directory: /usr/local/lib/ruby/gems/2.3.0/gems/glib2-2.2.0/ext/glib2
make "DESTDIR="
compiling glib-enum-types.c
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wunavailable-declarations'? [-Wunknown-warning-option]
glib-enum-types.c:1181:9: error: use of undeclared identifier 'G_WIN32_OS_ANY'
{ G_WIN32_OS_ANY, "G_WIN32_OS_ANY", "any" },
^
glib-enum-types.c:1182:9: error: use of undeclared identifier 'G_WIN32_OS_WORKSTATION'
{ G_WIN32_OS_WORKSTATION, "G_WIN32_OS_WORKSTATION", "workstation" },
^
glib-enum-types.c:1183:9: error: use of undeclared identifier 'G_WIN32_OS_SERVER'
{ G_WIN32_OS_SERVER, "G_WIN32_OS_SERVER", "server" },
^
1 warning and 3 errors generated.
make: *** [glib-enum-types.o] Error 1
4) GTK Install with Ruby 2.1.9
I managed to get Ruby 2.1.9 installed, same error.
Building native extensions. This could take a while...
/Users/bryan/.rbenv/versions/2.1.9/lib/ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /Users/bryan in PATH, mode 040707
ERROR: Error installing gtk2:
ERROR: Failed to build gem native extension.
/Users/bryan/.rbenv/versions/2.1.9/bin/ruby extconf.rb
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler... yes
checking for -Wmissing-format-attribute option to compiler... yes
checking for -Wmissing-include-dirs option to compiler... yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler... yes
checking for -Wnested-externs option to compiler... yes
checking for -Wold-style-definition option to compiler... yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wswitch-default option to compiler... yes
checking for -Wswitch-enum option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for rb_define_alloc_func() in ruby.h... yes
checking for rb_block_proc() in ruby.h... yes
checking for new allocation framework... yes
checking for attribute assignment... no
checking for Win32 OS... no
checking for gobject-2.0 version (>= 2.12.0)... yes
checking for gthread-2.0... yes
checking for unistd.h... yes
checking for io.h... no
checking for g_spawn_close_pid() in glib.h... yes
checking for g_thread_init() in glib.h... yes
checking for g_main_depth() in glib.h... yes
checking for g_listenv() in glib.h... yes
checking for rb_check_array_type() in ruby.h... yes
checking for rb_check_hash_type() in ruby.h... yes
checking for rb_exec_recursive() in ruby.h... yes
checking for rb_errinfo() in ruby.h... yes
checking for rb_sourcefile() in ruby.h... yes
checking for rb_sourceline() in ruby.h... yes
checking for ruby_set_current_source() in ruby.h... no
checking for rb_thread_blocking_region() in ruby.h... yes
checking for ruby_native_thread_p() in ruby.h... yes
checking for rb_thread_call_with_gvl() in ruby.h... yes
checking for rb_str_new_cstr() in ruby.h... yes
checking for rb_gc_register_mark_object() in ruby.h... yes
checking for rb_exc_new_str() in ruby.h... yes
checking for curr_thread in ruby.h,node.h... no
checking for rb_curr_thread in ruby.h,node.h... no
creating ruby-glib2.pc
creating glib-enum-types.c
creating glib-enum-types.h
creating Makefile
make "DESTDIR="
compiling glib-enum-types.c
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wunavailable-declarations'? [-Wunknown-warning-option]
glib-enum-types.c:1181:9: error: use of undeclared identifier 'G_WIN32_OS_ANY'
{ G_WIN32_OS_ANY, "G_WIN32_OS_ANY", "any" },
^
glib-enum-types.c:1182:9: error: use of undeclared identifier 'G_WIN32_OS_WORKSTATION'
{ G_WIN32_OS_WORKSTATION, "G_WIN32_OS_WORKSTATION", "workstation" },
^
glib-enum-types.c:1183:9: error: use of undeclared identifier 'G_WIN32_OS_SERVER'
{ G_WIN32_OS_SERVER, "G_WIN32_OS_SERVER", "server" },
^
1 warning and 3 errors generated.
make: *** [glib-enum-types.o] Error 1
make failed, exit code 2