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
Windows Support Phase 1 #17497
Windows Support Phase 1 #17497
Conversation
Guys, this compiles and runs (passes unit tests and the daemon works, the dashboard works, etc) on Windows, using either CYGWIN or MSYS2. MSYS2 is without emulation. So, everything is quite faster. Also, it supports cross compilation, so that it can be integrated to our CI. |
@vkalintiris please fix the protobuf in cmake. This is mergeable! |
Most of the work is re-structuring. I added some native Windows functions (Windows API) to get the number of processors, and similar. I also emulated The changes are a lot, because I had to rename a lot of things and create an abstraction layer that is easier to manage. But all this code is only running on Windows. On all other systems there shouldn't be any code changes. |
@ilyam8 please test that macos compilation works. There may be some includes missing here or there. |
…ns to work on unaligned objects too.
…now not using pthread_cancel; more fixes
The installer will install everything under C:\netdata by default. It will: - Install msys2 at C:\netdata - Install netdata dependencies with pacman - Install the agent itself under C:\netdata\opt You can start the agent by running an MSYS shell with C:\netdata\msys2_shell.cmd and then start the agent normally with: /opt/netdata/usr/sbin/netdata -D There are a more couple things to work on: - Verify publisher. - Install all deps not just libuv & protobuf. - Figure out how we want to auto-start the agent as a service. - Check how to uninstall things.
Implements partially #92
MSYSTEM=MSYS
)MSYSTEM=MSYS
and CYGWIN)HKEY_PERFORMANCE_DATA
(known as Performance Counters, or perflib) library for accessing any raw low-level windows performance data. This has been implemented in the netdata way, for fast access to these counters.Global changes in Netdata:
uuid_t
has been renamed tond_uuid_t
because it conflicts with windows definitions.netdata_thread_cleanup_push()
andnetdata_thread_cleanup_pop()
with__attribute__((cleanup(...)))
. This was problematic on windows (calling the destructor multiple times) and it also helps us achieve pthreads independence.phtread_cancel()
has been eliminated from the code base. It has been replaced with a new mechanism to signal the threads which check for such cancellation signals without blocking on I/O (reads, writes, connections, sleep, etc).Issues remaining
MSYSTEM=MSYS
, or under CYGWIN). Some features have been ported natively to windows APIs, but POSIX is still required.src/web/gui/v0
) which are not supported by windows (they could be supported by enabling windows developer mode and settinggit config core.symlinks true
, but this leads to typechange issues of all symlink files making difficult to commit changes back).:
. These files cannot be checked out to Windows filesystems.