Greetings --
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:
http://blackfin.uclinux.org/gf/project/toolchain/frs
...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:
ac_cv_func_getpgrp_void=no \
ac_cv_func_setpgrp_void=yes \
./configure --host=bfin-uclinux
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.
bfin-uclinux-gcc -O2 -g -Wall -Wno-parentheses -I.
-I.ext/include/bfin-uclinux -I./include -I. -DRUBY_EXPORT -o tgamma.o
-c ./missing/tgamma.c
bfin-uclinux-gcc -O2 -g -Wall -Wno-parentheses -I.
-I.ext/include/bfin-uclinux -I./include -I. -DRUBY_EXPORT -o dmyext.o
-c dmyext.c
bfin-uclinux-ar rcu libruby-static.a dln.o encoding.o prelude.o array.o
bignum.o class.o compar.o complex.o dir.o enum.o enumerator.o error.o
eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o
numeric.o object.o pack.o parse.o process.o random.o range.o rational.o
re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o
ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o
time.o transcode.o util.o variable.o version.o compile.o debug.o iseq.o
vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o
newline.o memcmp.o tgamma.o dmyext.o
ruby -I/tmp/ruby-1.9.1-p0 -rfake ./tool/generic_erb.rb -c -o encdb.h
./template/encdb.h.tmpl ./enc enc
encdb.h unchanged
make -f enc.mk RUBY="ruby -I/tmp/ruby-1.9.1-p0 -rfake " MINIRUBY="ruby
-I/tmp/ruby-1.9.1-p0 -rfake " enc
make[1]: Entering directory `/tmp/ruby-1.9.1-p0'
bfin-uclinux-gcc -I. -I.ext/include/bfin-uclinux -I./include -I.
-D_FILE_OFFSET_BITS=64 -DONIG_ENC_REGISTER=rb_enc_register -fPIC -O2
-g -Wall -Wno-parentheses -o enc/encdb.o -c ./enc/encdb.c
Here is where I think the problem is (the .o was created with
bfin-uclinux-gcc, now trying to link with normal ld):
ld -o .ext/bfin-uclinux/enc/encdb.so enc/encdb.o -L. -L. -L.
-lpthread -lrt -lcrypt -lm
ld: enc/encdb.o: Relocations in generic ELF (EM: 106)
ld: enc/encdb.o: Relocations in generic ELF (EM: 106)
ld: enc/encdb.o: Relocations in generic ELF (EM: 106)
ld: enc/encdb.o: Relocations in generic ELF (EM: 106)
ld: enc/encdb.o: Relocations in generic ELF (EM: 106)
ld: enc/encdb.o: Relocations in generic ELF (EM: 106)
enc/encdb.o: could not read symbols: File in wrong format
make[1]: *** [.ext/bfin-uclinux/enc/encdb.so] Error 1
make[1]: Leaving directory `/tmp/ruby-1.9.1-p0'
make: *** [enc] Error 2
···
--
Posted via http://www.ruby-forum.com/.