Home
Recent Entries Friends Archive User Info Tags To-Do List

Advertisement

Customize
 
 
 
 
 
 
Well, Ubuntu is great. But it still carries the somewhat annoying ultra-conservative culture of Debian package management (extreme fragmentation and update lag).

This often leads to much frustration when trying to install software on these platforms.

This time it is about embedding OpenSSL support in the Ruby interpreter. You can find several manual aproaches.

I just wanted to make clear that it does not have to be that hard, hacky and brittle.

There is a correct, clean and robust way to do it:

sudo apt-get install libssl-dev

Then remake your ruby interpreter the usual way (./configure;make;sudo make install).

I suppose that most of the problems come from the fact that people keep searching for packages with openssl in the name whereas the OpenSSL dev files are in libssl-dev.
 
 
 
 
 
 
After wasting 2 hours trying to get sgi's fam (File Alteration Monitor: http://oss.sgi.com/projects/fam/) working in our custom LFS systems, I turned to inotify and found Aria's Ruby extension for it (http://raa.ruby-lang.org/project/ruby-inotify/).

It did build (with a few warnings) but running the tests threw:

Loaded suite tests/test_1
Started
.ruby: symbol lookup error: ./inotify.so: undefined symbol: RSTRING_PTR


Being an absolute beginner with Ruby extensions, it took me several attempts to figure out the right way to do it under Ruby 1.8.4. Here is what I ended up changing in inotify.c:

87c87
<       wd = inotify_add_watch(*fd, RSTRING_PTR(filename), NUM2INT(mask));
---
>       wd = inotify_add_watch(*fd, RSTRING(filename)->ptr, NUM2INT(mask));
89c89
<         rb_sys_fail(RSTRING_PTR(filename));
---
>         rb_sys_fail(RSTRING(filename)->ptr);


The warnings are now gone from compilation and the small test pass. I must say that the first test run blocked on the test4 in the each_event iterator and I had to kill the process. I could not however reproduce it on any of the attempts I made.

I am pretty confident that this macro is still supported in later versions of Ruby but I do not have the time to check if it is being deprecated, I will try and contact Aredridel once I am convinced this patch works OK.

Advertisement

Customize