Universal Robots Forum

C++11 daemon custom compilation

Hello there,

I have some troubles while compiling c++11/14 code for a daemon.

I’ve already tried by adding the libstdc++.so to my project but I have not been able to solve within the Scons environment (cf. URTool to Support c++11).

I have also tried to bypass the i686-unknown-linux-gnu-g++ compiler equipped with the urtool suite, since it is far from new and does not natively support C++11/14 standards.

With a whole new CMake project configuration I have been able to compile my daemon with newer compiler (e.g. g+±5) by force the compilation for a 32bit system with i686 architecture -m32 -march=i686 compilation and linking flags. I have made many trials but I find which 32bit libraries were suitable for this configuration and I linked all the xmlrpc ones.

The compilation works fine on my linux machine, and I have been able to debug my code from the UR Simulator environment. However, when I pack it in my URCap and deploy it in our UR5 (CB3.1) it does not start correctly. It seems that the executable cannot start on the robot control box, but I cannot figure it out why.

The compiled executable objdump -f reports the exact same configuration of a previous damon compiled with Scons (that didn’t use C++11 standards):

file format elf32-i386
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED

So I don’t understand why an executable could not start on a Debian machine like the UR5 CB3.1 control box. The executable has also the right permissions to be launched by every linux users.

Have you got any ideas to investigate for something in particular?