Steps to reproduce:
- Build Agent 2 in Windows with the following steps
>cd zabbix-6.0.19rc1\build\mingw >set PATH=C:\mingw64\bin;C:\Program Files\Go\bin;%PATH% >set CURL=C:\curl-8.1.2-mingw64 >set PCRE2=C:\pcre2-10.42-mingw64 >set OPENSSL=C:\openssl-1.1.1u-mingw64 >mingw32-make
Result:
set CGO_CFLAGS= -O2 -g -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\Users\Administrator\zabbix-6.0.19rc1\build\mingw\..\..\build\win32\include -IC:\Users\Administrator\zabbix-6.0.19rc1\build\mingw\..\..\build\mingw -IC:\Users\Administrator\zabbix-6.0.19rc1\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -IC:\openssl-1.1.1u-mingw64\include -DPCRE2_STATIC -IC:\pcre2-10.42-mingw64\include -DHAVE_PCRE2_H=1 set CGO_LDFLAGS= -LC:\openssl-1.1.1u-mingw64\lib -LC:\pcre2-10.42-mingw64\lib set GOARCH=amd64 set CGO_ENABLED=1 for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j set BUILD_DATE=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2% set BUILD_TIME=%ldt:~8,2%:%ldt:~10,2%:%ldt:~12,2% set GOLDFLAGS=-X zabbix.com/pkg/version.compileOs=windows -X zabbix.com/pkg/version.compileArch=amd64 -X main.confDefault=zabbix_agent2.win.conf -X main.applicationName=zabbix_agent2 -X zabbix.com/pkg/version.compileDate=%BUILD_DATE% set GOLDFLAGS=%GOLDFLAGS% -X zabbix.com/pkg/version.compileTime=%BUILD_TIME% cd C:\Users\Administrator\zabbix-6.0.19rc1\build\mingw\..\..\src\go go build -tags " openssl pcre2" -ldflags="%GOLDFLAGS%" -o C:\Users\Administrator\zabbix-6.0.19rc1\build\mingw\..\..\bin\win64\zabbix_agent2.exe zabbix.com/cmd/zabbix_agent2 # zabbix.com/pkg/zbxcmd pkg\zbxcmd\zbxcmd_windows.go:51:75: undefined: exec.ErrDot pkg\zbxcmd\zbxcmd_windows.go:127:75: undefined: exec.ErrDot mingw32-make: *** [Makefile:199: C:\Users\Administrator\zabbix-6.0.19rc1\build\mingw\..\..\bin\win64\zabbix_agent2.exe] Error 2
Expected:
Success build.