BeagleBone Black: Debian vs Angstrom C++ Executable Issue

(Environment, tools, and configuration details are given at the end of this post).

I have created a simple C++ executable - the ubiquitous “Hello World” application - to run on my BeagleBone Black Rev. B. When executed properly, the program simply displays “Hello World!” on the terminal, and then exits.

The development platform is a PC running Ubuntu 12.04.4 LTS, with the Eclipse Indigo IDE, and arm-linux-gnueabi g++ cross compiler tool chain. The code is edited, compiled, and linked on the PC, then downloaded to the BBB for execution.

On my BBB running Angstrom, the program correctly executes, with it’s behaviour as described above. The problem is that this executable behaves very differently when running under Debian; instead of displaying “Hello World”, the following error message is displayed:

./HelloBeagleBone: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

My first thought is that I am missing a package or library on the Debian installation. However, when I compile the application directly on the BBB, using the native g++ compiler, it executes correctly.

As I write this, it (doubtfully) occurs to me that this might be a soft float vs. hard float issue - but the supported Debian BB image is not compiled for hard floats, is it?

Anyway, what is it I’m missing here? A library? A brain? Whuzzup?

The Angstrom build is that which came with the Rev B board on the eMMC; I have not “upgraded” to the latest version, yet.

The Debian build is the latest BeagleBone distribution, written to a microSD card.

As promised, details:

(Environment, tools, and configuration details are given at the end of this post).

I have created a simple C++ executable - the ubiquitous “Hello World” application - to run on my BeagleBone Black Rev. B. When executed properly, the program simply displays “Hello World!” on the terminal, and then exits.

The development platform is a PC running Ubuntu 12.04.4 LTS, with the Eclipse Indigo IDE, and arm-linux-gnueabi g++ cross compiler tool chain. The code is edited, compiled, and linked on the PC, then downloaded to the BBB for execution.

On my BBB running Angstrom, the program correctly executes, with it’s behaviour as described above. The problem is that this executable behaves very differently when running under Debian; instead of displaying “Hello World”, the following error message is displayed:

./HelloBeagleBone: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

My first thought is that I am missing a package or library on the Debian installation. However, when I compile the application directly on the BBB, using the native g++ compiler, it executes correctly.

As I write this, it (doubtfully) occurs to me that this might be a soft float vs. hard float issue - but the supported Debian BB image is not compiled for hard floats, is it?

Yes, we used the ‘armhf’ debian sub arch. So a gnueabihf compiler is required.

Hi Robert.

I recompiled with the 'hf compiler. Now the code executes as expected on the BBB, running the latest Debian image.

I thought this might be the case (soft float vs. hard float), but also wanted to post this problem (and solution) for posterity as I am sure I am not the only one to encounter this issue.

Many Thanks!

Hi Stonewerk ,
i have also the same problem for debian but i want to know the settings required in eclipse for 'hf compiler as previous settings for Angstrom gave me error/// will u pls. tell me how i can achieve this…if u r not using eclipse then also u can let me know me details of ur compiler and is it free?