PDA

View Full Version : Lich Mac Install Notes



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

Haldrik
05-16-2016, 07:30 PM
updated

m444w
05-16-2016, 08:26 PM
you should use RVM to install ruby, not homebrew. https://rvm.io/rvm/install

Haldrik
05-16-2016, 08:46 PM
you should use RVM to install ruby, not homebrew. https://rvm.io/rvm/install

I went back and used rbenv it to get 2.1.9 installed. Gtk2 was still busted. I then used homebrew to install gtk+. After gtk2 v2 still wouldn't work. Installed latest gtk2 and it worked.

Got lich to open. Tried profanity, errored out. Might try Avalon later.

m444w
05-16-2016, 09:02 PM
Know what the error was? I did this myself a few days ago and there was an odd error I had to fix but I don't recall the debug message

Haldrik
05-16-2016, 09:41 PM
Know what the error was? I did this myself a few days ago and there was an odd error I had to fix but I don't recall the debug message

Last login: Mon May 16 17:00:28 on ttys001
bryans-MacBook-Air:~ bryan$ cd lich
bryans-MacBook-Air:lich bryan$ ruby lich.rbw --login Kalros --without-frontend --detachable-client=8000
lich.rbw:410: warning: Insecure world writable dir /Users/bryan in PATH, mode 040707

Opened a new command window

Last login: Mon May 16 18:39:09 on ttys000
bryans-MacBook-Air:~ bryan$ cd lich
bryans-MacBook-Air:lich bryan$ cd scripts
bryans-MacBook-Air:scripts bryan$ ruby profanity
ruby: No such file or directory -- profanity (LoadError)
bryans-MacBook-Air:scripts bryan$ ruby profanity.rb
profanity.rb:5: syntax error, unexpected '<'
<!DOCTYPE html>
^
profanity.rb:6: syntax error, unexpected '<'
<html lang="en" class=" is-cop...
^
profanity.rb:6: syntax error, unexpected keyword_class, expecting end-of-input
<html lang="en" class=" is-copy-enabled emoji-size...
^
bryans-MacBook-Air:scripts bryan$
bryans-MacBook-Air:scripts bryan$

m444w
05-16-2016, 10:50 PM
That's different. It looks like you have an HTTP server running on localhost:8000 since it's serving HTML, what happens when you try a different port than 8000?

Haldrik
05-16-2016, 11:02 PM
That's different. It looks like you have an HTTP server running on localhost:8000 since it's serving HTML, what happens when you try a different port than 8000?

Hmm. No, those messages are the first couple of lines from profanity.rb. OH FUCK.

When i downloaded it from github it added a bunch of shit to it. motherfucker.

Haldrik
05-16-2016, 11:07 PM
new error


bryans-MacBook-Air:scripts bryan$ ruby profanity.rb
/Users/bryan/.rbenv/versions/2.1.9/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- curses (LoadError)
from /Users/bryan/.rbenv/versions/2.1.9/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from profanity.rb:32:in `<main>'
bryans-MacBook-Air:scripts bryan$ ruby profanity.rb
/Users/bryan/.rbenv/versions/2.1.9/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- curses (LoadError)
from /Users/bryan/.rbenv/versions/2.1.9/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from profanity.rb:32:in `<main>'
bryans-MacBook-Air:scripts bryan$

m444w
05-16-2016, 11:26 PM
this was the error I had. You have to install the curses gem. `gem install curses`

Haldrik
05-17-2016, 01:42 AM
this was the error I had. You have to install the curses gem. `gem install curses`

Ahhh. Okay... one last error. Hopefully.

bryans-MacBook-Air:scripts bryan$ ruby profanity.rb
profanity.rb:1563:in `initialize': Connection refused - connect(2) for "127.0.0.1" port 8000 (Errno::ECONNREFUSED)
from profanity.rb:1563:in `open'
from profanity.rb:1563:in `<main>'
bryans-MacBook-Air:scripts bryan$
bryans-MacBook-Air:scripts bryan$ ruby profanity.rb
profanity.rb:1563:in `initialize': Connection refused - connect(2) for "127.0.0.1" port 8000 (Errno::ECONNREFUSED)
from profanity.rb:1563:in `open'
from profanity.rb:1563:in `<main>'
bryans-MacBook-Air:scripts bryan$