Cannot Install EM on Linux-based NAS (extconf.rb failed)

75 views
Skip to first unread message

J T CALHOUN

unread,
Jul 9, 2011, 9:29:31 PM7/9/11
to EventMachine
I'm trying to install EM on my Linux-based NAS, but the installation
fails while trying to create the Makefile for the native extension,
saying:

Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.

/opt/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... *** extconf.rb
failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

The contents of mkmf.log:

package configuration for openssl
cflags: -I/opt/include
ldflags: -L/opt/lib
libs: -lssl -lcrypto -ldl

---

I suspect that the error is due to a missing dependency, but I'm
unable to determine which dependency and whether it's for EventMachine
or Ruby itself.

ruby 1.9.1p243 (2009-07-16 revision 24175) [arm-linux-eabi]

Has anyone any experience with installing EM in a similar environment?

Aman Gupta

unread,
Jul 9, 2011, 9:59:27 PM7/9/11
to eventm...@googlegroups.com
On Sat, Jul 9, 2011 at 6:29 PM, J T CALHOUN <jtca...@gmail.com> wrote:
I'm trying to install EM on my Linux-based NAS, but the installation
fails while trying to create the Makefile for the native extension,
saying:

Building native extensions.  This could take a while...
ERROR:  Error installing eventmachine:
       ERROR: Failed to build gem native extension.

       /opt/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... *** extconf.rb
failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

The contents of mkmf.log:

package configuration for openssl
cflags: -I/opt/include
ldflags: -L/opt/lib
libs: -lssl -lcrypto -ldl

That's all? There should be a lot more details in the mkmf.log

  Aman
 

---

I suspect that the error is due to a missing dependency, but I'm
unable to determine which dependency and whether it's for EventMachine
or Ruby itself.

ruby 1.9.1p243 (2009-07-16 revision 24175) [arm-linux-eabi]

Has anyone any experience with installing EM in a similar environment?

--
You received this message because you are subscribed to the Google Groups "EventMachine" group.
To post to this group, send email to eventm...@googlegroups.com.
To unsubscribe from this group, send email to eventmachine...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/eventmachine?hl=en.


J T CALHOUN

unread,
Jul 9, 2011, 11:08:39 PM7/9/11
to EventMachine
That's all, I'm afraid.

In addition to the previous info, here's the backtrace from the actual
error in mkmf.rb:

/opt/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed to
generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/lib/ruby/1.9.1/mkmf.rb:425:in `try_compile'
from /opt/lib/ruby/1.9.1/mkmf.rb:543:in `try_var'
from /opt/lib/ruby/1.9.1/mkmf.rb:791:in `block in have_var'
from /opt/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for'
from /opt/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in
postpone'
from /opt/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from /opt/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone'
from /opt/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from /opt/lib/ruby/1.9.1/mkmf.rb:270:in `postpone'
from /opt/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for'
from /opt/lib/ruby/1.9.1/mkmf.rb:790:in `have_var'
from extconf.rb:67:in `<main>'

On Jul 9, 8:59 pm, Aman Gupta <themastermi...@gmail.com> wrote:

Aman Gupta

unread,
Jul 9, 2011, 11:10:06 PM7/9/11
to eventm...@googlegroups.com
What distribution is this device running? It sounds like there's no buildchain available (make, gcc)

  Aman

J T CALHOUN

unread,
Jul 9, 2011, 11:40:17 PM7/9/11
to EventMachine
Hard to say. The device is a Synology DiskStation DS211 running the
manufacturer's "DSM 3.1" custom firmware. I'm not sure if it's based
on one of the more widespread distributions.

You're correct that make and gcc were not originally included. They've
been installed using ipkg, along with ruby, openssl, and openssl-dev.

Some environment details:

cat /proc/version
Linux version 2.6.32.12 (root@build19) (gcc version 4.2.1) #1613 Fri
Apr 8 10:09:56 CST 2011

uname -a
Linux Name 2.6.32.12 #1613 Fri Apr 8 10:09:56 CST 2011 armv5tel GNU/
Linux synology_88f6282_211

gcc --version
gcc (GCC) 4.2.3

make --version
GNU Make 3.82
Built for arm-none-linux-gnueabi


On Jul 9, 10:10 pm, Aman Gupta <themastermi...@gmail.com> wrote:
> What distribution is this device running? It sounds like there's no
> buildchain available (make, gcc)
>
>   Aman
>

Aman Gupta

unread,
Jul 9, 2011, 11:54:11 PM7/9/11
to eventm...@googlegroups.com
I would try to run extconf.rb manually to see if you can get more details.

  Aman

J T Calhoun

unread,
Jul 10, 2011, 6:26:02 PM7/10/11
to EventMachine
The solution I found was to just take the long way around and manually
install Ruby from source.

The version of Ruby installed by ipkg was configured to include non-
standard paths to the package creator's build tools (gcc, make, etc.)
--causing the native extension build process to fail since those tools
were not in the same locations in my environment.

For anyone who should search for and find this thread in the future, a
brief overview:

1. Install ipkg as outlined here:
http://forum.synology.com/wiki/index.php?title=Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc&oldid=5682

2. Use ipkg to install the optware-devel and openssl-dev packages.

3. Download and extract the source code for your chosen Ruby release:
http://www.ruby-lang.org/en/downloads/

4.At present, the copy of libpthreads provided by ipkg causes the next
step to fail. Follow the workaround in these instructions:
http://forum.synology.com/enu/viewtopic.php?f=90&t=30132&p=119287&hilit=pthread#p119287

5. cd to the directory containing your extracted files and type: ./
configure --prefix=/opt

6. Then, type: make && sudo make install

7. Install or update rubygems as necessary.

8. Finally, type: gem install eventmachine

On Jul 9, 10:54 pm, Aman Gupta <themastermi...@gmail.com> wrote:
> I would try to run extconf.rb manually to see if you can get more details.
>
>   Aman
>
Reply all
Reply to author
Forward
0 new messages