I am trying to see whether I can build ruby to run on an Analog Devices
Blackfin processor. The toolchain (with bfin-uclinux-gcc being the
compiler) is available here:
…using the latest 2008R1.5_RC14 release of both the toolchain and
libraries, where the build machine is an i686 running CentOS 5.3.
This will not cross-compile out of the box, but I’m not sure how much
help it needs to finish. I am using the following command line to
configure:
configure completes without complaint. Everything seems to compile
(bfin-uclinux-gcc is used as expected) but it fails when trying to
create the encdb.so file. It looks to me like this step is using the
wrong linker (ld instead of bfin-uclinux-ld). The exact error is at the
bottom of this message.
I tried this with 1.8.7-p72 and it also failed (I had to tweak process.c
for something that got fixed in 1.9.1-p0 and copy in a config.sub from
another bfin-uclinux project port) but in a different place
(extmk.rb:357 undefined method ‘<<’ for nil:NilClass).
Some Google searches show that others have had success (1.8.6-p114 and
-p287 are mentioned). However, I’d like to use the latest and greatest
if possible – are there any known solutions for 1.9.1?
Error log is below (only the end is shown, I can the full build log if
it is needed). Any help would be appreciated.
Some Google searches show that others have had success (1.8.6-p114 and
-p287 are mentioned). However, I’d like to use the latest and greatest
if possible – are there any known solutions for 1.9.1?
ruby 1.9 is much bigger than ruby 1.8, so for embedded applications,
I’d stick with 1.8 (pref 1.8.6) unless you really need 1.9 features.
Thanks for the info about 1.9. I have gone back and tried to build a
couple of 1.8.6 versions, but I still seem to be getting stuck. I am
consistently getting this error:
[blackfin@localhost ruby-1.8.6-p368]$ make
rbconfig.rb unchanged
./lib/fileutils.rb:1029:in utime': can't convert NilClass into time (TypeError) from ./lib/fileutils.rb:1029:in touch’
from ./lib/fileutils.rb:1026:in each' from ./lib/fileutils.rb:1026:in touch’
from ./mkconfig.rb:188
make: *** [.rbconfig.time] Error 1
Since this build machine is CentOS 5.3, I have an older version of ruby
(1.8.5) installed. However, I can build 1.8.6-p287 (from Subversion),
1.8.6-p368, and 1.9.1-p0 on this machine natively without any difficulty
(./configure && make && make test). This tells me that the above error
(File.utime returning nil) is not necessarily due to the system’s ruby
version being out of date (even though it is a ruby script that fails).
I will keep plugging away at it. The link to the OpenWRT project
doesn’t give me any ideas about this particular error, but I’ll see if I
can figure out what file mkconfig.rb is failing to find.
make (assuming that bfin-uclinux-gcc is in the PATH and the libraries
are installed properly)
The resulting executable is about 2.3MB which isn’t too bad. I still
need to try to convert it to the BFLT format, but I can work on that
next.
As for the patch, I had to remove three lines from mkconfig.rb
($timestamp was undefined), copy in the config.sub from the 1.9.1-p0
distribution, and set all of the extensions to build statically.
At Wed, 6 May 2009 00:19:45 +0900,
Aaron Gage wrote in [ruby-talk:335822]:
[blackfin@localhost ruby-1.8.6-p368]$ make
rbconfig.rb unchanged
./lib/fileutils.rb:1029:in utime': can't convert NilClass into time (TypeError) from ./lib/fileutils.rb:1029:intouch’
from ./lib/fileutils.rb:1026:in each' from ./lib/fileutils.rb:1026:intouch’
from ./mkconfig.rb:188
make: *** [.rbconfig.time] Error 1
r14741 needs to get backported to 1.8.6.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.