You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: DEVELOPER_GUIDE: add instructions for windows 2022 (#9522)
* Adds Windows 2022 setup instructions. step-by-step for setting up the environment to build Fluent Bit on Windows Server 2022, including Visual Studio installation, Flex and Bison setup, and dependency management using vcpkg.
* Corrected references from Chocolatey to vcpkg for dependency installation, aligning the local build guide with the tools used in CI.
Signed-off-by: Jorge Niedbalski <[email protected]>
Co-authored-by: Jorge Niedbalski <[email protected]>
Copy file name to clipboardExpand all lines: DEVELOPER_GUIDE.md
+130-1
Original file line number
Diff line number
Diff line change
@@ -711,7 +711,8 @@ The dependencies must be present:
711
711
712
712
* Microsoft Visual Studio C/C++ toolchain. The CI automation uses MSVC 2019 at time of writing. MSVC Community Edition works fine.
713
713
*[CMake](https://cmake.org/) 3.x on the `PATH`
714
-
* A build of [OpenSSL](https://www.openssl.org/) as static libraries, pointed to by the `-DOPENSSL_ROOT_DIR` CMake variable. The CI automation uses [Chocolatey](https://chocolatey.org/) to `choco install -y openssl`.
714
+
* A build of [OpenSSL](https://www.openssl.org/) as static libraries, pointed to by the `-DOPENSSL_ROOT_DIR` CMake variable.
715
+
* The CI automation uses vcpkg to install dependencies [](https://github.com/fluent/fluent-bit/blob/master/.github/workflows/call-build-windows.yaml#L148)
715
716
*`flex.exe` and `bison.exe` must be present on the `PATH`. The CI automation uses https://github.com/lexxmark/winflexbison.
716
717
717
718
Assuming that `cmake` is on the `PATH`, Visual Studio is installed,
@@ -731,6 +732,134 @@ The build output will be `bin\Debug\fluent-bit.exe`.
731
732
732
733
If in doubt, check the CI and build automation files referenced above for specifics.
733
734
735
+
### Building on a Windows Server 2022
736
+
737
+
The following steps have been tested on a Windows Server 2022 Datacenter edition on top of GCP.
738
+
739
+
1.**Download and Install Visual Studio 2022** (Community Edition)
740
+
-**Download**: Go to [Visual Studio Download Page](https://visualstudio.microsoft.com/downloads/).
741
+
-**Install**:
742
+
- Select **Community Edition** and check the following components during installation:
743
+
- **Desktop development with C++**
744
+
- **Linux development with C++**
745
+
746
+
2.**Install Flex and Bison**
747
+
1. Create a new file called `setup-flex-bison.ps1` and paste the following script:
- Replace `C:/path/to/your/vcpkg_installed/x64-windows-static` with the actual path where `vcpkg` installed OpenSSL and LibYAML.
850
+
- When installing with `vcpkg`, you can also specify a different install root using `--x-install-root`.
851
+
- This will generate a Visual Studio solution file, which you can open and compile.
852
+
853
+
7. **Run the binary build**
854
+
855
+
```bash
856
+
cmake --build . --parallel 4 --clean-first
857
+
```
858
+
859
+
**Notes**:
860
+
- You can choose to omit the `--parallel` option.
861
+
- The `--clean-first` option will clear cache and start a fresh clean build.
862
+
734
863
### Valgrind
735
864
736
865
[Valgrind](https://valgrind.org/) is a tool that will help you detect and diagnose memory issues in your code. It will check for memory leaks and invalid memory accesses.
0 commit comments