LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 02-14-2011, 10:58 AM   #1
Gobliins
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
scratchbox + arm + qemu = "cannot execute c compiled programs"


Hi i set up a scratchbox with a arm-linux-gnueabi-gcc toolchain and qemu emulator.

When i want to run inside scratchbox [sbox-arm:/]> a ./configure script (from a mono tarball) i am getting the error:
checking whether the c compiler works... ...
configure error: cannot run c compiled programs.
if you meant to cross compile, use --host.

When i compile a simple hello.c it works but when i execute hello.o i am getting an error:
lib/ld-linux.so.3 no such file.

(edit:
by using a toolchain with uClibc the error is:
/lib/ld-uClibc.so.0)

i can workaraound this error by using the -static flag, but that won´t work with the .configure problem.

has anyone a solution for this?

Last edited by Gobliins; 02-14-2011 at 11:17 AM.
 
Old 02-14-2011, 12:01 PM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,807

Rep: Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995
I would ldd your program to find the exact location, and maybe you can download that file you need and move it to the location it is trying to look in.
 
1 members found this post helpful.
Old 02-15-2011, 01:41 AM   #3
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
You can check config.log to see what went wrong with the configure script.

But I suppose this is the same issue
Quote:
lib/ld-linux.so.3 no such file.
I'm not sure why this library is not in your library path, maybe the toolchain was not installed properly.

I've never used scratchbox, but it looks like you are trying to cross-compile a program inside qemu, is that correct?
If so, it may be relatively slow, you'd better setup a cross-compiler in your host.
 
1 members found this post helpful.
Old 02-15-2011, 02:20 AM   #4
Gobliins
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Well seems like some symbolic linking errors inside scratchbox, the installed toolchain and the nativeFS.
I reinstalled the whole Scratchbox environment from zero and now it seems to work,
got to test it today.

Thx for the answers.
 
Old 02-15-2011, 02:21 AM   #5
corp769
Guru
 
Registered: Apr 2005
Posts: 5,807

Rep: Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995
No problem. Mark your thread as [SOLVED] if it is solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Have you ever used "Emlink for ARM" Emulator to debug your ARM Cortex-M3 processors? kennyfly899 Linux - Newbie 0 06-27-2009 01:45 AM
Execute "telinit q" while programs are running ? Vilius AIX 1 11-26-2008 09:54 AM
Installing Bluez on qemu arm using scratchbox cross compiler tums Debian 1 06-01-2008 11:05 AM
"Can't run C compiled programs" on clean RH9 install smirnoff Linux - Newbie 8 03-16-2004 03:11 PM


All times are GMT -5. The time now is 02:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration