Problems with compiling helloworld [SOLVED]

denry12
 
Posts: 2
Joined: Tue Jul 21, 2015 5:29 am

Problems with compiling helloworld [SOLVED]

Tue Jul 21, 2015 5:52 am

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.
Last edited by denry12 on Tue Jul 21, 2015 7:36 pm, edited 1 time in total.

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: Problems with compiling helloworld

Tue Jul 21, 2015 12:54 pm

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.

denry12
 
Posts: 2
Joined: Tue Jul 21, 2015 5:29 am

Re: Problems with compiling helloworld

Tue Jul 21, 2015 7:35 pm

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.

Vonger
 
Posts: 764
Joined: Sun Oct 19, 2014 6:00 am

Re: Problems with compiling helloworld [SOLVED]

Mon Aug 03, 2015 10:33 am

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 :)

Return to VoCore & VoCore+Dock

Who is online

Users browsing this forum: No registered users and 3 guests