[genivi-dlt] genivi-diagnostic-log-and-trace Digest, Vol 55, Issue 7

amber bhardwaj amber.bhardwaj10 at gmail.com
Tue May 30 11:38:25 EDT 2017


Hello,

This error is coming because of two reason-
1. You didn't build dlt-daemon code so when you're trying to use log macro
then it is saying undefined reference error.
2. If you already built the dlt-daemon code successfully then the generated
".so" file is not present in default searching path.

Best Regards,
Amber Bhardwaj

On 30-May-2017 8:15 PM, <
genivi-diagnostic-log-and-trace-request at lists.genivi.org> wrote:

> Send genivi-diagnostic-log-and-trace mailing list submissions to
>         genivi-diagnostic-log-and-trace at lists.genivi.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.genivi.org/mailman/listinfo/genivi-
> diagnostic-log-and-trace
>
> or, via email, send a message with subject or body 'help' to
>         genivi-diagnostic-log-and-trace-request at lists.genivi.org
>
> You can reach the person managing the list at
>         genivi-diagnostic-log-and-trace-owner at lists.genivi.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of genivi-diagnostic-log-and-trace digest..."
>
>
> Today's Topics:
>
>    1. undefined reference to dlt_* when compiling Logging example
>       from dlt_user_manual.txt (Prigent, Christophe)
>    2. Re: undefined reference to dlt_* when compiling Logging
>       example from dlt_user_manual.txt (Prigent, Christophe)
>    3. Re: Hello, I ask for Something about DLT
>       (Lipka, Christoph (ADITG/ESA))
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 30 May 2017 12:12:17 +0000
> From: "Prigent, Christophe" <christophe.prigent at intel.com>
> To: "genivi-diagnostic-log-and-trace at lists.genivi.org"
>         <genivi-diagnostic-log-and-trace at lists.genivi.org>
> Subject: [genivi-dlt] undefined reference to dlt_* when compiling
>         Logging example from dlt_user_manual.txt
> Message-ID:
>         <AC81B6AA7676DD448250A85A459C1F41A5199511 at IRSMSX108.ger.
> corp.intel.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Good morning,
>
> I have some compilation errors when I'm trying the logging example from
> https://github.com/GENIVI/dlt-daemon/blob/master/doc/dlt_user_manual.txt
> (section "=== Logging example").
> How can I solve it?
>
> Thank you,
> Christophe.
>
> dltdemo.c:
> ----------
> #include <stdio.h>
> #include <dlt/dlt.h>
>
> DLT_DECLARE_CONTEXT(mycontext);
>
> int main()
> {
>    int num;
>
>    DLT_REGISTER_APP("MYAP","My Application");
>    DLT_REGISTER_CONTEXT(mycontext,"MYCT", "My Context");
>
>    printf("Hello world");
>
>    for(num=0;num<10;num++) {
>       DLT_LOG(mycontext,DLT_LOG_INFO,DLT_STRING("Hello
> world"),DLT_INT(num));
>       sleep(1);
>    }
>
>    DLT_UNREGISTER_CONTEXT(mycontext);
>    DLT_UNREGISTER_APP();
>
>    return 0;
> }
>
> Steps:
> ------
> christophe at XPS12-9Q33 ~/dev/logging-example $ gcc -o dltdemo -ldlt
> dltdemo.c
> dltdemo.c:2:17: fatal error: dlt.h: No such file or directory
> compilation terminated.
> christophe at XPS12-9Q33 ~/dev/logging-example $ locate dlt.h
> /usr/include/qdlt/qdlt.h
> /usr/local/include/dlt/dlt.h
>
> With #include <dlt/dlt.h> instead of #include <dlt.h>:
>
> christophe at XPS12-9Q33 ~/dev/logging-example $ gcc -o dltdemo -ldlt
> dltdemo.c
> /tmp/ccqfNZ9M.o: In function `main':
> dltdemo.c:(.text+0x72): undefined reference to `dlt_check_library_version'
> dltdemo.c:(.text+0x81): undefined reference to `dlt_register_app'
> dltdemo.c:(.text+0x95): undefined reference to `dlt_register_context'
> dltdemo.c:(.text+0xe0): undefined reference to `dlt_user_log_write_start'
> dltdemo.c:(.text+0x103): undefined reference to `dlt_user_log_write_string'
> dltdemo.c:(.text+0x11a): undefined reference to `dlt_user_log_write_int'
> dltdemo.c:(.text+0x129): undefined reference to `dlt_user_log_write_finish'
> dltdemo.c:(.text+0x151): undefined reference to `dlt_unregister_context'
> dltdemo.c:(.text+0x156): undefined reference to `dlt_unregister_app'
> collect2: error: ld returned 1 exit status
> christophe at XPS12-9Q33 ~/dev/logging-example $
>
> Info:
> -----
> Distro: Linux Mint 18.1 Serena
> Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
> gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
>
>
> ---------------------------------------------------------------------
> Intel Corporation SAS (French simplified joint stock company)
> Registered headquarters: "Les Montalets"- 2, rue de Paris,
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 30 May 2017 14:25:53 +0000
> From: "Prigent, Christophe" <christophe.prigent at intel.com>
> To: "Prigent, Christophe" <christophe.prigent at intel.com>,
>         "genivi-diagnostic-log-and-trace at lists.genivi.org"
>         <genivi-diagnostic-log-and-trace at lists.genivi.org>
> Subject: Re: [genivi-dlt] undefined reference to dlt_* when compiling
>         Logging example from dlt_user_manual.txt
> Message-ID:
>         <AC81B6AA7676DD448250A85A459C1F41A5199629 at IRSMSX108.ger.
> corp.intel.com>
>
> Content-Type: text/plain; charset="utf-8"
>
> My bad, the problem is solved using command:
> $ gcc dltdemo.c -o dltdemo -ldlt
>
> -----Original Message-----
> From: genivi-diagnostic-log-and-trace [mailto:genivi-diagnostic-log-
> and-trace-bounces at lists.genivi.org] On Behalf Of Prigent, Christophe
> Sent: Tuesday, May 30, 2017 2:12 PM
> To: genivi-diagnostic-log-and-trace at lists.genivi.org
> Subject: [genivi-dlt] undefined reference to dlt_* when compiling Logging
> example from dlt_user_manual.txt
>
> Good morning,
>
> I have some compilation errors when I'm trying the logging example from
> https://github.com/GENIVI/dlt-daemon/blob/master/doc/dlt_user_manual.txt
> (section "=== Logging example").
> How can I solve it?
>
> Thank you,
> Christophe.
>
> dltdemo.c:
> ----------
> #include <stdio.h>
> #include <dlt/dlt.h>
>
> DLT_DECLARE_CONTEXT(mycontext);
>
> int main()
> {
>    int num;
>
>    DLT_REGISTER_APP("MYAP","My Application");
>    DLT_REGISTER_CONTEXT(mycontext,"MYCT", "My Context");
>
>    printf("Hello world");
>
>    for(num=0;num<10;num++) {
>       DLT_LOG(mycontext,DLT_LOG_INFO,DLT_STRING("Hello
> world"),DLT_INT(num));
>       sleep(1);
>    }
>
>    DLT_UNREGISTER_CONTEXT(mycontext);
>    DLT_UNREGISTER_APP();
>
>    return 0;
> }
>
> Steps:
> ------
> christophe at XPS12-9Q33 ~/dev/logging-example $ gcc -o dltdemo -ldlt
> dltdemo.c
> dltdemo.c:2:17: fatal error: dlt.h: No such file or directory compilation
> terminated.
> christophe at XPS12-9Q33 ~/dev/logging-example $ locate dlt.h
> /usr/include/qdlt/qdlt.h /usr/local/include/dlt/dlt.h
>
> With #include <dlt/dlt.h> instead of #include <dlt.h>:
>
> christophe at XPS12-9Q33 ~/dev/logging-example $ gcc -o dltdemo -ldlt
> dltdemo.c
> /tmp/ccqfNZ9M.o: In function `main':
> dltdemo.c:(.text+0x72): undefined reference to `dlt_check_library_version'
> dltdemo.c:(.text+0x81): undefined reference to `dlt_register_app'
> dltdemo.c:(.text+0x95): undefined reference to `dlt_register_context'
> dltdemo.c:(.text+0xe0): undefined reference to `dlt_user_log_write_start'
> dltdemo.c:(.text+0x103): undefined reference to `dlt_user_log_write_string'
> dltdemo.c:(.text+0x11a): undefined reference to `dlt_user_log_write_int'
> dltdemo.c:(.text+0x129): undefined reference to `dlt_user_log_write_finish'
> dltdemo.c:(.text+0x151): undefined reference to `dlt_unregister_context'
> dltdemo.c:(.text+0x156): undefined reference to `dlt_unregister_app'
> collect2: error: ld returned 1 exit status
> christophe at XPS12-9Q33 ~/dev/logging-example $
>
> Info:
> -----
> Distro: Linux Mint 18.1 Serena
> Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0) gcc version 5.4.0
> 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
>
>
> ---------------------------------------------------------------------
> Intel Corporation SAS (French simplified joint stock company) Registered
> headquarters: "Les Montalets"- 2, rue de Paris,
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
>
> This e-mail and any attachments may contain confidential material for the
> sole use of the intended recipient(s). Any review or distribution by others
> is strictly prohibited. If you are not the intended recipient, please
> contact the sender and delete all copies.
> _______________________________________________
> genivi-diagnostic-log-and-trace mailing list genivi-diagnostic-log-and-
> trace at lists.genivi.org
> http://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace
> ---------------------------------------------------------------------
> Intel Corporation SAS (French simplified joint stock company)
> Registered headquarters: "Les Montalets"- 2, rue de Paris,
> 92196 Meudon Cedex, France
> Registration Number:  302 456 199 R.C.S. NANTERRE
> Capital: 4,572,000 Euros
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> ------------------------------
>
> Message: 3
> Date: Tue, 30 May 2017 14:43:58 +0000
> From: "Lipka, Christoph (ADITG/ESA)" <clipka at de.adit-jv.com>
> To: "genivi-diagnostic-log-and-trace at lists.genivi.org"
>         <genivi-diagnostic-log-and-trace at lists.genivi.org>
> Subject: Re: [genivi-dlt] Hello, I ask for Something about DLT
> Message-ID:
>         <B63DFC502E5CF24DB70737388130C5910D1958A6 at HI2EXCH01.adit-jv.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi SangJune,
>
> I am trying to figure out what you actually want to achieve. What is your
> understanding of “DLT sync mechanism” (between Daemon and Viewer)? The DLT
> Daemon is the server and the DLT Viewer is a client that first has to
> connect to the DLT Daemon.
> In the current implementation, the DLT daemon will call
> “dlt_daemon_process_client_connect()” when the DLT Viewer connects to the
> daemon and  “dlt_daemon_process_client_messages()” when the DLT Viewer
> sends control messages to the DLT Daemon.
> On the other hand, the DLT Daemon will forward all log messages from
> applications to all registered clients (e.g. DLT Viewer) by calling
> “dlt_daemon_process_user_messages()”. So before you can send data on a
> socket, the connection needs to be created / the DLT Daemon has to wait for
> the Viewer to connect.
> How do you receive messages from DLT Applications, if you removed the
> epoll functionality? What do you want to achieve finally?
>
> Best Regards,
> Christoph
>
>
> Von: sangjune.ahn [mailto:sangjune.ahn at lge.com]
> Gesendet: Dienstag, 30. Mai 2017 10:09
> An: Alexander.AW.Wenzel at bmw.de; genivi-diagnostic-log-and-
> trace at lists.genivi.org
> Cc: Gernot.Wirschal at bmw.de; Lipka, Christoph (ADITG/ESA)
> Betreff: RE: Hello, I ask for Something about DLT
>
> Hello, Dear DLT mailing list guys.
>
> I`m sangjune.ahn (LGE junior researcher)
> With the help of Alexander, when I made DLT offline trace function based
> on QNX in 3 months ago.
> Now, I try to make it DLT real time function(socket send) based on QNX.
> Because DLT Viewer is so comfortable and convenience.
>
> But I have a problem with "dlt_daemon_socket_send()"
> Internal function.
> I sent data by socket send().
> (before I open the socket open process by "dlt_daemon_local_connection_init()
> -> dlt_daemon_socket_open() ")
> As result, socket send is failed.
> <I don`t use handler and Epoll because our system doesn't need to be
> multiple connections.(Reason of first - Just 1:1 connection, 1 target, and
> 1 viewer, Reason of second - QNX OS not supported Epoll, so Epoll is not
> available.>
> Originally, DLT daemon(Linux) connected by the callback =
> dlt_connection_get_callback() function(And internal switch case).
>
> Maybe I guess If the sync mechanism of the daemon and the viewer is
> established, those are would be doing well.
> Actually, I don`t understand exactly what about DLT sync mechanism(viewer
> request and target response).
>
> If anyone knows about well, could you explain to me in detail?
> Please, I need your help.
>
> BR
> thank you.
> SangJune.Ahn
> From: Alexander.AW.Wenzel at bmw.de<mailto:Alexander.AW.Wenzel at bmw.de>
> [mailto:Alexander.AW.Wenzel at bmw.de]
> Sent: Monday, May 29, 2017 4:03 PM
> To: sangjune.ahn at lge.com<mailto:sangjune.ahn at lge.com>
> Cc: Gernot.Wirschal at bmw.de<mailto:Gernot.Wirschal at bmw.de>;
> clipka at jp.adit-jv.com<mailto:clipka at jp.adit-jv.com>
> Subject: AW: Hello, I ask for Something about DLT
>
> Hello Sangjune,
>
> The dlt-daemon is maintained currentlys by Christoph Lipka, see CC. Also
> the Offline Trace functionality is developed by him.
>
> I do not understand your question, perhaps you can be more precise what is
> your current problem.
> Please ask your questions to the DLT Mailinglist
> genivi-diagnostic-log-and-trace at lists.genivi.org<mailto:
> genivi-diagnostic-log-and-trace at lists.genivi.org>, perhaps the community
> around DLT can help you there.
>
> Best regards
>
>    Alex
>
> --
> BMW Group
> Alexander Wenzel
> Architecture Head Unit
> EE-601
>
> Postanschrift:
> 80788 München
>
> Tel: +49-89-382-54199
> Mobil: +49-151-601-54199
> Mail: alexander.aw.wenzel at bmw.de<mailto:alexander.aw.wenzel at bmw.de>
> Web: http://www.bmwgroup.com/
> --------------------------------------------------------------------
> Bayerische Motoren Werke Aktiengesellschaft
> Vorstand: Harald Krüger (Vorsitzender),
> Milagros Caiña Carreiro-Andree, Markus Duesmann,
> Klaus Fröhlich, Nicolas Peter, Ian Robertson,
> Peter Schwarzenbauer, Oliver Zipse.
> Vorsitzender des Aufsichtsrats: Norbert Reithofer
> Sitz und Registergericht: München HRB 42243
> --------------------------------------------------------------------
>
> Von: sangjune.ahn [mailto:sangjune.ahn at lge.com]
> Gesendet: Freitag, 26. Mai 2017 07:55
> An: Wenzel Alexander, EE-601 <Alexander.AW.Wenzel at bmw.de<mailto:
> Alexander.AW.Wenzel at bmw.de>>
> Betreff: RE: Hello, I ask for Something about DLT
>
> Hello, Alexander.
>
> I`m sangjune.ahn (LGE junior researcher)
> When I made DLT (version of QNX Cluster)
> I asked you question of DLT for much time.
> Alexander you helped me by reply to email.
> And I impressed your effort.
> As the Result, I made complete DLT log offline trace function.
> My colleagues think like that.
> The current development environment is much easier than before.
> So we feel our gratitude for your efforts.
>
> But Not satisfied with the current development environment,
> I would like to create additional new functions.
> And I try to make DLT Real time sync function of dlt_daemon_socket_send
> with DLT viewer.
>
> But I have a problem with the connection between target and DLT viewer.
> Actually, I don`t understand what exactly control message to send to the
> viewer by a socket.
>
> Now operating like this following picture.(base_on_QNX.png)
> So first time to DLT viewer send to Dlt daemon.
> And daemon first time to send response data.
>
> If do you think of a problem with something.
> Actually, I don`t know how operating dlt mechanism.
> DLT is so difficult.
> And I need to your opinion.
> How can I solve this problem?
>
> Finally, I add to attached picture of based on the Linux connection
> log.(base_on_linux.png)
>
> Best Regard.
> I love it DLT.
>
> From: sangjune.ahn [mailto:sangjune.ahn at lge.com]
> Sent: Friday, November 04, 2016 10:28 AM
> To: 'Alexander.AW.Wenzel at bmw.de' <Alexander.AW.Wenzel at bmw.de<mailto:
> Alexander.AW.Wenzel at bmw.de>>
> Subject: RE: Hello, I ask for Something about DLT
>
> Hello ~ alexander
> I`m sangjune.ahn
>
> When I was before 1 moth, I asked question and many things about DLT to
> you.
> And now I made completely Our platform(Cluster) log system saved to DLT
> log type.
> < we don`t included dlt daemon and use DLT viewer>
> Thank you so much and I wonder to say about complete..
> Finally Talk to again. thank you so much ~ Alexander !
> You are my hero.<짱짱맨>
>
> Best Regard.
>
> From: Alexander.AW.Wenzel at bmw.de<mailto:Alexander.AW.Wenzel at bmw.de>
> [mailto:Alexander.AW.Wenzel at bmw.de]
> Sent: Wednesday, September 21, 2016 8:13 PM
> To: sangjune.ahn at lge.com<mailto:sangjune.ahn at lge.com>
> Subject: AW: Hello, I ask for Something about DLT
>
> Hello Sangjune,
>
> As I already said please look at the AUTOSAR specification, there you will
> find the protocol specification, which equals the file format. Especially
> look at chapter 7.7.6.1
>
>    Alex
>
> --
> BMW Group
> Alexander Wenzel
> Architect. Connected Drive, I and C Syst.
>
> Postanschrift:
> 80788 München
>
> Tel: +49-89-382-54199
> Mail: alexander.aw.wenzel at bmw.de<mailto:alexander.aw.wenzel at bmw.de>
> Web: http://www.bmwgroup.com/
> --------------------------------------------------------------------
> Bayerische Motoren Werke Aktiengesellschaft
> Vorstand: Harald Krüger (Vorsitzender),
> Milagros Caiña Carreiro-Andree, Klaus Draeger,
> Friedrich Eichiner, Klaus Fröhlich, Ian Robertson,
> Peter Schwarzenbauer, Oliver Zipse.
> Vorsitzender des Aufsichtsrats: Norbert Reithofer
> Sitz und Registergericht: München HRB 42243
> --------------------------------------------------------------------
> Von: sangjune.ahn [mailto:sangjune.ahn at lge.com]
> Gesendet: Mittwoch, 21. September 2016 12:14
> An: Wenzel Alexander, EE-60 <Alexander.AW.Wenzel at bmw.de<mailto:
> Alexander.AW.Wenzel at bmw.de>>
> Betreff: RE: Hello, I ask for Something about DLT
>
> Hello Alexander Wenzel.
>
> Thank you for your comment and information of DLT
> In these days I`m impress about your code and your program of DLT.
>
> But I have feel that complicate about code and I don`t understand of many
> of things.
> So I need to question for 1 things. “How can the DLT to save the log file
> inside of system( eg. /home/log_data/ )
> I need to know that what is the format(DLT-log), if I want to open the log
> in DLT viewer.
>
> Would you explain for where is the code of save the DLT log
> format(function)
> Could you tell me about (eg. if do you need to what is the format, look at
> here (dlt_file_read())
>
> Thank you so much for your effort.
> Best regard.
>
> Sangjune.ahn
> LGE Young Guy..
>
>
> From: Alexander.AW.Wenzel at bmw.de<mailto:Alexander.AW.Wenzel at bmw.de>
> [mailto:Alexander.AW.Wenzel at bmw.de]
> Sent: Monday, September 19, 2016 4:44 PM
> To: sangjune.ahn at lge.com<mailto:sangjune.ahn at lge.com>
> Cc: lutz_helwing at mentor.com<mailto:lutz_helwing at mentor.com>
> Subject: AW: Hello, I ask for Something about DLT
>
> Hello SankJune,
>
> If you need information about the DLT protocol, please look at the AUTOSAR
> DLT standard.
>
> https://www.autosar.org/fileadmin/files/releases/4-2/
> software-architecture/system-services/standard/AUTOSAR_SWS_
> DiagnosticLogAndTrace.pdf
>
> Please look at chapter 7.7.
>
> I hope this helps you finding the missing information.
>
> Best regards
>
>    Alex
>
> --
> BMW Group
> Alexander Wenzel
> Architect. Connected Drive, I and C Syst.
>
> Postanschrift:
> 80788 München
>
> Tel: +49-89-382-54199
> Mail: alexander.aw.wenzel at bmw.de<mailto:alexander.aw.wenzel at bmw.de>
> Web: http://www.bmwgroup.com/
> --------------------------------------------------------------------
> Bayerische Motoren Werke Aktiengesellschaft
> Vorstand: Harald Krüger (Vorsitzender),
> Milagros Caiña Carreiro-Andree, Klaus Draeger,
> Friedrich Eichiner, Klaus Fröhlich, Ian Robertson,
> Peter Schwarzenbauer, Oliver Zipse.
> Vorsitzender des Aufsichtsrats: Norbert Reithofer
> Sitz und Registergericht: München HRB 42243
> --------------------------------------------------------------------
> Von: sangjune.ahn [mailto:sangjune.ahn at lge.com]
> Gesendet: Montag, 19. September 2016 09:32
> An: Wenzel Alexander, EE-60 <Alexander.AW.Wenzel at bmw.de<mailto:
> Alexander.AW.Wenzel at bmw.de>>; lutz_helwing at mentor.com<mailto:
> lutz_helwing at mentor.com>
> Betreff: Hello, I ask for Something about DLT
>
> Hello, I`m researcher in LGE
> My name is SangJune.Ahn.
>
> Now I make it small system(Bad HW performance) of Middleware layer based
> on QNX.
> I have to try make Synchronized with DLT Viewer.
> But Is not used to DLT Manager.(Daemon) ( DLT_offline_trace_write(Mode: wb
> (Write binary?) -> Is not a saved the text type.)
> Now we use this(Log Manager –> just save the Trace information, type of
> text)
> Because this is not heavy than DLT system. So I have to try to save the
> .dlt file format. For synchronized with DLT viewer.
>
> If Do you make this(Log Manager) for Synchronized with DLT viewer, How do
> you will make it ?
> Would you give me that advice.
>
> I found about contact point of fallow here (https://github.com/GENIVI/
> dlt-daemon)
>
> Finally, Sorry for that I don’t` write to English very well.
>
> Thank you & have nice day.
> Best regard.
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> genivi-diagnostic-log-and-trace mailing list
> genivi-diagnostic-log-and-trace at lists.genivi.org
> http://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace
>
> ------------------------------
>
> End of genivi-diagnostic-log-and-trace Digest, Vol 55, Issue 7
> **************************************************************
>



More information about the genivi-diagnostic-log-and-trace mailing list