Hello all,
I am trying to build mruby (new embeddable version of ruby) for linino/Yùn. I installed the Development toolchain as per GitHub - arduino/linino, setup PATH and STAGING_DIR paths and using the mips-openwrt-linux-uclibc-*
set of commands for cross-building mruby.
Most the build goes fine and the executable files are created:
$ file build/atheros/bin/mirb
build/atheros/bin/mirb: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, not stripped
But when I copy the executables on the linino I get:
root@ArduinoPB:~# ls
bin mirb mrbc mruby test_exec
root@ArduinoPB:~# ./mirb
-ash: ./mirb: not found
Now, note that mirb is executable, and that test_exec is a simple hello world C program compiled with the same toolchain, which actually do run.
Also, I noticed that during compilation of mruby I got warnings from the linker when it creates the executables:
mips-openwrt-linux-uclibc-ld: warning: cannot find entry symbol __start; defaulting to 0000000000401090
Since __start
is actually the entry point of any executable, I suppose that my linking command is missing some standard library. There is the actual link command (I'm linking against libm and libc):
"mips-openwrt-linux-uclibc-ld" -L"/home/rnc/linino/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib" -o "/home/rnc/develop/mruby/build/atheros/bin/mirb" "/home/rnc/develop/mruby/build/atheros/mrbgems/mruby-bin-mirb/tools/mirb/mirb.o" "/home/rnc/develop/mruby/build/atheros/lib/libmruby.a" -lc -lm
mips-openwrt-linux-uclibc-ld: warning: cannot find entry symbol __start; defaulting to 00000000004010f0
The question is: what am I missing here? any lib to be added to the ld command?
Once that will be solved, I plan to use mruby in place of python, writing a couple of extension for accessing the Console and the Bridge from within mruby.
Thanks,
-P.