-
Notifications
You must be signed in to change notification settings - Fork 292
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this daemon be compiled with windows #136
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. |
@manojc99 Do you have any updates from your side? |
you can comile by using cygwin on windows, I have done |
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>
.
|
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);
|
@chenlimingcn You can edit your comment above to put the diff in the diff code block. ```diff - removed + added ``` |
@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. |
@ssugiura have done as above |
Awesome, Will try this and update |
I have compiled it with cygwin before and it works, if you need I can share the compiled file to you. |
@koreyoshi-wang , Have you done with cygwin without the change proposed by @chenlimingcn , or any other steps required? |
@koreyoshi-wang This is a friendly reminder. Please let us know how you compiled for Windows. |
Hi @chenlimingcn , I got the below error while doing make install on cygwin. $ make install |
Hi ssugiura, I have replaced a dependence (pthreads |
@koreyoshi-wang can you please share the precompiled binaries |
dlt.zip |
@koreyoshi-wang Thank you for sharing the binary. Could you able to fix filter issue? Can you please share build instructions for windows? |
@koreyoshi-wang @senthil4321 Any update on this? |
@koreyoshi-wang Could you please let me know a way to replace pthreads dependency for cygwin? |
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. |
Sorry, I have uninstalled my cygwin, you just need to search pthreads in your cygwin library and replace ti. |
@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. |
@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. |
may I get libdlt.dll that exported all symbols? |
If you are asking me; I no longer have access to the build. |
Found this repository which has pre-compile file https://github.com/mbehr1/adlt |
Hello @michael-methner |
I'm building a C++ app on Window by Visual Studio. I also finish installing DLT daemon by Cygwin on window. |
Hello @thanhthieuBKDN |
@koreyoshi-wang hi, is there any way to set the value of the port in dlt-receive.exe? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Is it possible to compile this with windows and create a dll instead of so file.
The text was updated successfully, but these errors were encountered: