Page 1 of 1

Problems with compiling helloworld [SOLVED]

Posted: Tue Jul 21, 2015 5:52 am
by denry12
Hi

I am having issues running my compiled helloworld. I have been following this tutorial and tried using virtual machine and a real linux installation. I tried compiling with main.c in openwrt directory and also elsewhere.
Sadly, with both attempts I am receiving "-ash: ./hello: not found" from VoCore. I can run other files.

Has anyone encountered similar problem and/or can anyone supply me with their own compiled helloworld so I can try out which end is the problematic one for me?
If anyone wishes (and dares) to try my compiled result, it can be found here.

Re: Problems with compiling helloworld

Posted: Tue Jul 21, 2015 12:54 pm
by noblepepper
Your executable is dynamically linked and can't find the library it is linked to.

On my host box I run:
Code: Select all
file hello
hello: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked, interpreter /lib/ld-musl-mipsel-sf.so.1, not stripped

against your executable and it shows it is linked against ld-musl-mipsel-sf.so.1 which I am not familiar with and don't find on my system.

When I do the same against the exectuable produced on my system I get:
Code: Select all
file hello
hello: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked, interpreter /lib/ld-uClibc.so.0, not stripped

and it works on my vocore.

The only place I see musl is under the Advanced configuration options (for developers)->Toolchain Options->C Library implementation, make sure this is set to Use uClibc when you run make menuconfig.

Re: Problems with compiling helloworld

Posted: Tue Jul 21, 2015 7:35 pm
by denry12
Thank you!

The menu "Advanced configuration options (for developers)" in make menuconfig was empty for me, however, now that I know what was missing, I managed to locate the "ld-musl-mipselsf.so.1" in my linux machine and copy it to VoCore's /lib/ folder. Compiled file runs without a problem.

Re: Problems with compiling helloworld [SOLVED]

Posted: Mon Aug 03, 2015 10:33 am
by Vonger
Your file looks like it is an i386 linux file, but not mips linux file, so it is not working.
I think you might fail in one of the steps, please send your full process.
We are trying to record a full video of the setup to make it easier to start, please wait two more days :)