I am trying to add the libgomp library to the container and there are no errors when building container or application. But when I try to run my application on the toradex board the output shows
“libgomp.so.1: cannot open shared object file: No such file or directory”.
When I then check the libraries in the container it has not been installed.
I followed the instructions on How to do C/C++ Development on Torizon | Toradex Developer Center to find the right packages. I am working on a Windows machine using Visual Studio 19.0 with the Toradex Extension. In the Torizon C/C++ Application Configuration I added following devpackages:
libgcc-8-dev:arm64 libgomp1:arm64 libgomp-dev:arm64
I have been trying several variations of the above but without any luck. Can somebody help me with this?
I believe that you have not set the extrapackages property for your project.
The devpackages property is used for compilation time, when your application is compiled. Here should be listed the dev versions of packages (just like you did, except for the libgomp1, which is a package for runtime, not compilation time). But these packages won’t be featured inside the runtime container, which is good: as they have much more data/information than what is needed for runtime, their addition would make the application container larger.
Then, there is the property extrapackages. Here should be listed the runtime versions of the packages (like the libgomp1 that you need), that have only what is needed for your application runtime.
It now works!
Somehow there was no property “extrapackages” in that list where the “devpackages” property is listed. Maybe I deleted it mistakenly some time ago. I could add it with the “new property” button and I added the libgomp1 library.