linuxarmpthreadscross-compilingeabi

Error running cross-compiled code with pthread


I'm uing ARM_EABI cross-compiler to compile a code that makes use of pthreads to run at an ARM Cortex A9 simulation. While I'm able to compile it with no problems (just as I've did with others non-pthread applications, which ran fine in the simulation), I'm having an error message when trying to run my pthread application at the simulated ARM (which is running Linux as OS). It's the following:

./pttest.exe: /lib/libpthread.so.0: no version information available (required by ./pttest.exe)

I did my research and found out that's because it's a dynamic lib, and I'm compiling the application with a higher version than the one available on my simulator.

My question is: how to find force my cross-compiler to compile the application with the same pthread lib version of my simulator? Is there anywhere I can download different versions of pthreads? And how to set it?

Sorry, I'm quite a newbie in that area.


Solution

  • Try compiling your application statically, e.g.

    gcc -static -o myapplication myapplication.c