Libsocketcan missing

Hi,
i’m using this image:
Apalis-iMX6_Reference-Multimedia-Image-upstream-Tezi_6.6.0+build.12
on Apalis Ixora IMX6 2 Gbyte
I have configure socketcan daemon:
[Unit]

Description=Setup SocketCAN interface can0 with a baudrate of 500000

After=multi-user.target

[Service]

Type=oneshot

RemainAfterExit=yes

ExecStartPre=/sbin/ip link set can0 type can bitrate 500000

ExecStart=/sbin/ip link set can0 up

ExecStop=/sbin/ip link set can0 down

[Install]

WantedBy=multi-user.target

then i compile qt can application in imx6 and copy on scb.

When i start application ./can
qt.canbus.plugins.socketcan: Cannot load library socketcan: (socketcan: cannot open shared object file: No such file or directory)

qt.canbus.plugins.socketcan: Cannot load library libsocketcan, some functionality will not be available.

Cannot load library socketcan: (socketcan: cannot open shared object file: No such file or directory)

It seems that libsocketcan is missing so i try download GitHub - linux-can/libsocketcan.
./autogen.sh

autoreconf


./autogen.sh: line 20: autoreconf: command not found

autoreconf is missing so:
wget https://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz

tar -xvf autoconf-latest.tar.gz

cd autoconf-2.72/

./configure
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a race-free mkdir -p… /bin/mkdir -p
checking for gawk… no
checking for mawk… no
checking for nawk… no
checking for awk… awk
checking whether make sets $(MAKE)… no
checking whether make supports nested variables… no
checking build system type… armv7l-unknown-linux-gnueabihf
checking host system type… armv7l-unknown-linux-gnueabihf
configure: autobuild project… GNU Autoconf
configure: autobuild revision… 2.72
configure: autobuild hostname… apalis-imx6-11305048
configure: autobuild timestamp… 20240409T185827Z
checking for a shell whose -n mode is known to work… /bin/sh
checking for characters that cannot appear in file names… none
checking whether directories can have trailing spaces… yes
checking for expr… /usr/bin/expr
checking for GNU M4 that supports accurate traces… configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.8 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.

i try make
-sh: make: command not found.

Please somebody can helpme to have canbus works?
Thank you in advantages.
Patrick

Hello @ck182,

The problem you are facing is that the required library is not available on the reference multimedia image.

The reference multimedia image is intended for testing only.
When you start developing your application you need to create your own image using the Yocto Project, which may be based on the Toradex Reference Multimedia Image.

On your custom image, you can add the necessary packages for your application.
The recommended approach to build applications for the image would be to generate an SDK for it using the Yocto project. This way you guarantee that the application is built against the correct libraries which are available on the final image.

For more information on this topic, please check the documentation on BSP Layers and Reference Images for Yocto Project Software | Toradex Developer Center.


There are a few alternatives to the steps outlined above:

  • Using a Boot2Qt image: The Apalis iMX6 has Boot2Qt images provided by Qt. These can be used during development and include most if not all of the available Qt libraries. The main disadvantage of this approach is that this image is intended for evaluation and development, for production the required Qt libraries will need to be integrated into a Yocto Project image regardless.
  • Using Torizon OS: Torizon OS is a production-ready Linux distribution from Toradex. It allows for application development using docker containers, which bypasses the requirement for a Yocto Project build for many projects. The OS is open-source free to use. We provide an IDE extension and documentation about how to develop Qt projects on Torizon. Torizon OS can also be easily connected to the Torizon Cloud for OS and Application updates and many other features.

Best Regards,
Bruno

Thank you Bruno.
Not happy but it is okay.