Hi,
I’m trying to install libsocketcan package in TorizonC/C++ project inside a container for in Colibri-imx7-1GO, to use SocketCAN APIs.
I added devpackages : libsocketcan-dev:#%platform.debian-arch%# extrapackage : libsocketcan2
In the Makefile, I added -lsocketcan to generate the lib ($(CC) -o $@ $^ $(CFLAGS) -lsocketcan)
After re-building the container and trying to execute the output file in the target device, I got this error:
./can-test: error while loading shared libraries: libsocketcan.so.2: cannot open shared object file: No such file or directory
First of all before we make any assumptions can you check whether the error message is accurate or not?
You can get a shell into the container by running this on the device while the container is running, docker exec -it <container ID/name> bash. Then you can manually check if libsocketcan.so.2 file really does not exist.
Wait are you executing can-test inside the container? Or how are you executing it exactly? You mentioned that the container was created using our IDE extension is the IDE extension not executing the container/application?
The libraries and packages outside of the container are irrelevant since the application is meant to be executing in the context of the container.