[SOLVED] Sorting out qemu in Stretch/testing

Need help with C, C++, perl, python, etc?

[SOLVED] Sorting out qemu in Stretch/testing

Postby shewhorn » 2016-09-18 20:58

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

Postby shewhorn » 2016-09-18 21:25

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

sudo aptitude install libstdc++6:armhf

Solved the problem.
shewhorn
 
Posts: 52
Joined: 2015-11-05 13:39


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable