Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Sorting out qemu in Stretch/testing

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
shewhorn
Posts: 52
Joined: 2015-11-05 13:39

[SOLVED] Sorting out qemu in Stretch/testing

#1 Post by shewhorn »

I have this simple program:

Code: Select all

#include<iostream>
using namespace std;

int main()
{
	cout << "Hello from an ARMHF architecture\n";
}

I compiled it as follows:

Code: Select all

arm-linux-gnueabihf-g++ test.cpp -o test
I transferred it over to my BeagleBone Black... it ran just fine (as it has in the past). I installed qemu...

Code: Select all

sudo aptitude install qemu-user-static
... and then I attempt to run the binary under emulation on my build machine using qemu as I have in the past under a Debian Jessie install (but running the 4.7 kernel (i'm running a Skylake machine)) but now under Stretch/testing I get this:

/lib/ld-linux-armhf.so.3: No such file or directory

A search on my machine indicates the file is located here:

/usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3

So... I created a symbolic link:

Code: Select all

sudo ln -s /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 ld-linux-armhf.so.3
Then I ran the binary again... and now I get this:

Code: Select all

./test: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Now, this file exists in this location:

/usr/arm-linux-gnueabihf/lib/libstdc++.so.6

...but unlike the previous error, this one doesn't tell me WHERE it was looking that it couldn't find it. My question is... Is there a way to find out where it thinks this file should be?

Cheers :)

shewhorn
Posts: 52
Joined: 2015-11-05 13:39

Re: [SOLVED] Sorting out qemu in Stretch/testing

#2 Post by shewhorn »

There was a dependency that qemu failed to install...

sudo aptitude install libstdc++6:armhf

Solved the problem.

Post Reply