COVESA / dlt-daemon

Diagnostic Log and Trace.
https://covesa.github.io/dlt-daemon/
Mozilla Public License 2.0
357 stars 286 forks source link

How to install and compile DLT-daemon on QNX #543

Closed kk29-val closed 8 months ago

kk29-val commented 9 months ago

Hello, I am new to QNX platform and want to install and compile the dlt-daemon on QNX... please provide me details.

minminlittleshrimp commented 9 months ago

Hello @kk29-val As you might know, QNX is now close source. Hence, we could not provide you the specific way. Some basic information I could list from Internet and from my experience:

Regards DLT team

kk29-val commented 9 months ago

Thanks for the suggestion @minminlittleshrimp , I cross compile and generate shared library but that shared library I have to flash it on QNX board so on QNX board on which location that file should be flashed?

minminlittleshrimp commented 9 months ago

Great, so you could flash to /usr/lib or /lib or even /lib64, I mean it depends on your company requirement or on your own.

kk29-val commented 9 months ago

Hello @minminlittleshrimp, sorry for the inconvenience but while compiling I got this error:

In file included from /home/patelhet/Veoneer/DLt/dlt-daemon/src/system/dlt-system.c:46: /home/patelhet/Veoneer/DLt/dlt-daemon/src/system/dlt-system.h:57:10: fatal error: systemd/sd-journal.h: No such file or directory

include <systemd/sd-journal.h>

      ^~~~~~~~~~~~~~~~~~~~~~

compilation terminated. src/system/CMakeFiles/dlt-system.dir/build.make:62: recipe for target 'src/system/CMakeFiles/dlt-system.dir/dlt-system.c.o' failed make[2]: [src/system/CMakeFiles/dlt-system.dir/dlt-system.c.o] Error 1 CMakeFiles/Makefile2:800: recipe for target 'src/system/CMakeFiles/dlt-system.dir/all' failed make[1]: [src/system/CMakeFiles/dlt-system.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

minminlittleshrimp commented 9 months ago

Hello @kk29-val This is because you are activating the flag to build dlt-system which is dlt adapter for Linux base, on QNX you only need DLT QNX SYSTEM. If it is possible could you upload your Makefile here? I could quickly check the option for you. Regards

minminlittleshrimp commented 9 months ago

In case you want to know more about DLT, please checkout Michael’s talk here: Discussion number https://github.com/COVESA/dlt-daemon/discussions/488

You could find in the link another link to boschtube (public). I really refer you to watch the video since I think it is quite basic and comprehensive for new dlt contributor.

Thank you

kk29-val commented 9 months ago

CMakeLists.txt

This is my cmakelists.txt file

kk29-val commented 9 months ago

Hello @minminlittleshrimp , After turning OFF "WITH_DLT_SYSTEM", still facing same issue

lvklevankhanh commented 9 months ago

Hello @kk29-val ,

Please install the below package: sudo apt-get install libsystemd-dev

Regards,

kk29-val commented 9 months ago

Hello @lvklevankhanh ,thank you for the support , now I successfully cross compile... @minminlittleshrimp and @lvklevankhanh after that which file need to flash it on QNX?

minminlittleshrimp commented 9 months ago

Hello, It depends on your demand. For binaries: /usr/bin or /bin, idk For libdlt: /usr/lib or /lib or even /lib64 For config file: /etc Please run: “$sudo make install” on your dev environment and refer to the stdout logs for further information. Regards

kk29-val commented 8 months ago

Hello @minminlittleshrimp @lvklevankhanh , which binaries , libraries and config file needd to flash it on QNX?

minminlittleshrimp commented 8 months ago

It depends on your demand, dlt-daemon, dlt-receive, dlt-qnx-system, etc. The lib is libdlt.so and config file for dlt is dlt.conf, dlt-qnx-system.conf, etc

kk29-val commented 8 months ago

okay @minminlittleshrimp , In my case I am flashing this file on Qualcommn QNX so I don't have permission to copy those files in /usr/bin or /usr/lib so thats why when I run binary "./dlt-daemon" then I got this error:

./dlt-daemon

Cannot open configuration file: /usr/local/etc/dlt.conf [ 410.090456]~DLT~1089587~NOTICE ~Starting DLT Daemon; DLT Package Version: 2.18.10 STABLE, Package Revision: v2.18.10_6_g4ed1b97, build on Oct 6 2023 10:55:15 -SYSTEMD -SYSTEMD_WATCHDOG -TEST -SHM

[ 410.090456]~DLT~1089587~WARNING ~dlt_daemon_unix_socket_open: bind() error (Permission denied) [ 410.090456]~DLT~1089587~CRITICAL ~Could not create and open app socket. [ 410.090456]~DLT~1089587~ERROR ~Unable to initialize app socket. [ 410.090456]~DLT~1089587~CRITICAL ~Initialization of local connections failed!

minminlittleshrimp commented 8 months ago

Please check the permission mode, is it granted for read access? 644 is ok

kk29-val commented 8 months ago

@minminlittleshrimp , Actually as i mentioned before dlt.conf is not in that /usr/local/etc folder bcoz I don't have access to those folder , I only have access to /var folder so in that /var I create one folder and in that folder I copy my dlt.conf and dlt-qnx-system.conf files and for those I already give permissions, and for my binaries I create another folder so in that I copied my binaries dlt-daemon and dlt-qnx-system and also give permission to those binaries and then run the ./dlt-daemon then I got above mentioned error....

michael-methner commented 8 months ago

not a bug.