Apalis iMX6: Ruby

Hi everyone,

I’m wondering if anyone has attempted to compile ruby into the image by default.

I tried. The program compiles fine and installed in rootfs correctly. The issue is that at run time, it seems to do nothing. The basic command “ruby -v” hangs and I have to use keyboard interrupt to get out. I noticed from running “opkg list” that ruby is not present.

Installing through the package manager seems to work but not fully. I can’t ssh back into the board after ward. It seems to break Openssh/openssl. I also noticed the ruby from package manager is v2.4.1 whereas the one from the Yocto build is v2.4.4.

Also, I’m building with LinuxImageV2.8.

Any hints here would be greatly appreciated.

Thanks,

Nam

hi @Nanguyen

What exactly have you done?

Could you provide the commands and changes to local.conf and other files for the compilation of the image?

I noticed from running “opkg list” that ruby is not present.

You need to do opkg update first.

I also noticed the ruby from package manager is v2.4.1 whereas the one from the Yocto build is v2.4.4.

Yes, you are right.

Any hints here would be greatly appreciated.

Could you try to install ruby using opkg and check if this working?

Bet regards,
Jaski

Hi @jaski.tx,

I followed the instruction on here (High performance, low power Embedded Computing Systems | Toradex Developer Center) to setup the build directory with branch LinuxImageV2.8.

I modified the local.conf with MACHINE?="apalis-imx6".

I created an append to the recipe core-image-full-cmdline to add connman, ruby and a couples of scripts that I wrote.

I use core-image-full-cmdline for my build.

As you mentioned, ruby seems to run without hanging (ruby -v) when installing from opkg.

If I add ruby in the image by default, ruby is installed in rootfs but it simply doesn’t run.

Ultimately, I would like to understand what I’m missing because I need to use a newer version of ruby comparing to the one from package manager. Hence, I will need to compile a newer version of ruby with my image.

Best regards,

Nam

I created an append to the recipe core-image-full-cmdline to add connman, ruby and a couples of scripts that I wrote

Could you share this .bbappend file?

If I add ruby in the image by default, ruby is installed in rootfs but it simply doesn’t run.

Ruby v2.4.4 was integrated in rocko branch of the open-embedded build. But as you stated it is not working. I think it was never tested. Either you can write to the author of this commit or you can try to go back to version 2.4.2 and check if this works.

By the way, why you need the newer version (2.4.4) of ruby ?

Best regards,
Jaski

link text

Hi @jaski.tx ,

The file is uploaded. I also attempted to roll back to v2.4.1 (I found the recipe on OE website). The issue remains unfortunately.

I need a newer version since we plan to install chef on the board. And in this case it needs ruby 2.5.3 (the latest one on OE).

Nam

Hi @Nanguyen

For Ruby 2.5.3, you will need at least Thud branch of OpenEmbedded or the Master Branch. We will update to this branch at the end of Q2 as described here.

Best regards,
Jaski

Hi @jaski.tx,

Thanks for the info.

My main question is still how did you guys manage to compile a version of Ruby that runs (v2.4.1).

The foreseeable issue that I can think of even with the build updated to Thud, is that using the standard ruby recipe, I still would not be able to compile a working version.

Nam

We never did it. The v2.4.1 of Ruby was compiled by Angstrom responsibles which can be downloaded here.

The foreseeable issue that I can think of even with the build updated to Thud, is that using the standard ruby recipe, I still would not be able to compile a working version.

Why do you think so? Did you try it?

Hi @jaski.tx,

Given that I tried to compile ruby 2.4.4 (default with rocko) and run it unsuccessfully on my system, I’m questioning that there might be something additional beside the default recipe that was added to get it working.

Now, with that said, updating that to thud, we do have the same risk of the default ruby recipe not running.

All I’m asking here is why the default ruby with rocko is not working while an older version of ruby, compiled by Angstrom as you mentioned, works.

I will give thud a try.

Nam

HI @Nanguyen

Given that I tried to compile ruby 2.4.4 (default with rocko) and run it unsuccessfully on my system, I’m questioning that there might be something additional beside the default recipe that was added to get it working.

Like I said a working ruby version was made by Angstrom responsible and after that nobody again. So there is no guarantee that the compiled version will work.

Now, with that said, updating that to thud, we do have the same risk of the default ruby recipe not running.

Maybe, but you need to do the compilation to find this out.

All I’m asking here is why the default ruby with rocko is not working while an older version of ruby, compiled by Angstrom as you mentioned, works.

Meanwhile it is broken and never fixed by someone.

I will give thud a try.

Let us know the results, please?

Best regards,
Jaski

Hi @jaski.tx,

I tried to check out the LinuxImage3.0-next. I gave the following errors when I tried to sync.

IOError: [Errno 2] No such file or directory: '/home/nanguyen/Work/oe-core/.repo/manifest.xml'

Indeed, when I verified the directory, the manifest file is not present.

Hence, I went to the alternative plan of building with poky.

My layers setup is as following:

meta-poky            
meta-yocto-bsp       = "thud:50f33d3bfebcbfb1538d932fb487cfd789872026"
meta-freescale       = "thud:f5c932229c31b612cba38c2ed6f3c3ec6b800e92"
meta-freescale-3rdparty = "thud:c4b5ac6b20e4245ce0630e9197313aaef999a331"
meta-toradex-bsp-common = "thud-next:88fbe7232ef49a4564de97c0e676a66577986f43"
meta-toradex-nxp     = "thud-next:eb7b98c57756467148b1006ef47b31ce269b2e22"
meta-oe              
meta-python          
meta-networking      
meta-perl            = "thud:4cd3a39f22a2712bfa8fc657d09fe2c7765a4005"
meta-security        = "thud:31dc4e7532fa7a82060e0b50e5eb8d0414aa7e93"

After the compilation, the rootfs contains ruby v2.5.3 as expected. However, when running ruby -v, it still yields the same issue with before which is hanging and never returns unless we do a keyboard interrupt.

Best regards,

Nam

Hi @Nanguyen

You should report this to the Ruby or Angstrom Responsible.

Thanks and best regards,
Jaski