Can this daemon be compiled with windows #564
Replies: 32 comments
-
@manojc99 I'm afraid that current DLT cannot be compiled on Windows. It seems initial version of dlt-daemon supported Windows, but after that it was considered for Linux usage only, so some headers, which are not available on Windows, are not excluded for Windows. |
Beta Was this translation helpful? Give feedback.
-
@manojc99 Do you have any updates from your side? |
Beta Was this translation helpful? Give feedback.
-
you can comile by using cygwin on windows, I have done |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply Rimon. Any instructions that you can share please
…On Wed, 25 Sep 2019, 3:28 pm Rimon Chen, ***@***.***> wrote:
you can comile by using cygwin on windows, I have done
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#136>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHT32UP6GOFE63AWBQ2T2F3QLMY5JANCNFSM4HYPGSZQ>
.
|
Beta Was this translation helpful? Give feedback.
-
git pull to this version eb3dcd2(master) diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c static int dlt_daemon_init_fifo(DltDaemonLocal *daemon_local)
if (daemon_local->daemonFifoSize != 0) {
/* Set Daemon FIFO size */
- if (fcntl(fd, F_SETPIPE_SZ, daemon_local->daemonFifoSize) == -1) {
+ if (fcntl(fd, FD_SETSIZE, daemon_local->daemonFifoSize) == -1) {
snprintf(str, DLT_DAEMON_TEXTBUFSIZE, "set FIFO size error: %s\n", strerror(errno));
dlt_log(LOG_ERR, str);
}
}
/* Get Daemon FIFO size */
- if ((fifo_size = fcntl(fd, F_GETPIPE_SZ, 0)) == -1) {
+ if ((fifo_size = fcntl(fd, FD_GETSIZE, 0)) == -1) {
snprintf(str, DLT_DAEMON_TEXTBUFSIZE, "get FIFO size error: %s\n", strerror(errno));
dlt_log(LOG_ERR, str);
} diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c * \file dlt_user.c
*/
+ #define PTHREAD_MUTEX_ROBUST PTHREAD_MUTEX_DEFAULT
+ #define pthread_mutex_consistent pthread_mutex_lock
+
#include <stdlib.h> /* for getenv(), free(), atexit() */
#include <string.h> /* for strcmp(), strncmp(), strlen(), memset(), memcpy() */
#include <signal.h> /* for signal(), SIGPIPE, SIG_IGN */
@@ -413,10 +416,10 @@ DltReturnValue dlt_init(void)
}
/* make mutex robust to prevent from deadlock when the segmented thread was cancelled, but held the mutex */
- if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST) != 0) {
- dlt_user_initialised = false;
- return DLT_RETURN_ERROR;
- }
+ //if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST) != 0) {
+ // dlt_user_initialised = false;
+ // return DLT_RETURN_ERROR;
+ //}
pthread_mutex_init(&mq_mutex, &attr);
pthread_mutexattr_destroy(&attr);
|
Beta Was this translation helpful? Give feedback.
-
@chenlimingcn You can edit your comment above to put the diff in the diff code block. ```diff - removed + added ``` |
Beta Was this translation helpful? Give feedback.
-
@chenlimingcn Thanks, great to know that you could compile successfully for Windows too. As suggested from @votrungchi , please modify your comment to show the code diff properly. It's even worth to write it down somewhere in the doc. |
Beta Was this translation helpful? Give feedback.
-
@ssugiura have done as above |
Beta Was this translation helpful? Give feedback.
-
Awesome, Will try this and update |
Beta Was this translation helpful? Give feedback.
-
I have compiled it with cygwin before and it works, if you need I can share the compiled file to you. |
Beta Was this translation helpful? Give feedback.
-
@koreyoshi-wang , Have you done with cygwin without the change proposed by @chenlimingcn , or any other steps required? |
Beta Was this translation helpful? Give feedback.
-
@koreyoshi-wang This is a friendly reminder. Please let us know how you compiled for Windows. |
Beta Was this translation helpful? Give feedback.
-
Hi @chenlimingcn , I got the below error while doing make install on cygwin. $ make install |
Beta Was this translation helpful? Give feedback.
-
Hi ssugiura, I have replaced a dependence (pthreads |
Beta Was this translation helpful? Give feedback.
-
@koreyoshi-wang can you please share the precompiled binaries |
Beta Was this translation helpful? Give feedback.
-
@koreyoshi-wang @senthil4321 Any update on this? |
Beta Was this translation helpful? Give feedback.
-
@koreyoshi-wang Could you please let me know a way to replace pthreads dependency for cygwin? |
Beta Was this translation helpful? Give feedback.
-
No, I just compiled once, and filter didn't work, but I tested Linux Version the same problem, I don not know the recent status. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I have uninstalled my cygwin, you just need to search pthreads in your cygwin library and replace ti. |
Beta Was this translation helpful? Give feedback.
-
@ssugiura @koreyoshi-wang, managed to make the filter work with the windows binary provided. Some points to note. 1. Filter should be in xml format.(Used dlt viewer gui application to create filter) 2. Both Appication ID and Context ID needs to be enabled in the filter. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
@manojc99
and change to(Note these can be copied directly from the if statement above.)
The cygwin environment does not have libsocket, but should have Edit: This compiles the code, but I have not tested functionality. |
Beta Was this translation helpful? Give feedback.
-
may I get libdlt.dll that exported all symbols? |
Beta Was this translation helpful? Give feedback.
-
If you are asking me; I no longer have access to the build. |
Beta Was this translation helpful? Give feedback.
-
Found this repository which has pre-compile file https://github.com/mbehr1/adlt |
Beta Was this translation helpful? Give feedback.
-
Hello @michael-methner |
Beta Was this translation helpful? Give feedback.
-
I'm building a C++ app on Window by Visual Studio. I also finish installing DLT daemon by Cygwin on window. |
Beta Was this translation helpful? Give feedback.
-
Hello @thanhthieuBKDN |
Beta Was this translation helpful? Give feedback.
-
@koreyoshi-wang hi, is there any way to set the value of the port in dlt-receive.exe? |
Beta Was this translation helpful? Give feedback.
-
Hello @humbicho |
Beta Was this translation helpful? Give feedback.
-
Hello all, |
Beta Was this translation helpful? Give feedback.
-
Is it possible to compile this with windows and create a dll instead of so file.
Beta Was this translation helpful? Give feedback.
All reactions