[ZBX-24186] Agent2 plugins building does not support ARM64 arch Created: 2024 Mar 05  Updated: 2024 Apr 30  Resolved: 2024 Apr 24

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I)
Affects Version/s: None
Fix Version/s: 6.0.30rc1, 6.4.15rc1, 7.0.0rc1, 7.0 (plan)

Type: Problem report Priority: Major
Reporter: Alexey Pustovalov Assignee: Mihails Prihodko
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Sub-task
part of ZBXNEXT-9144 Agent 2 loadable plugins support on ... Reopened
Team: Team B
Sprint: S24-W16/17
Story Points: 2

 Description   

Makefile for Zabbix agent 2 plugins does not support any other arches except x86 and amd64. It must support all arches which is possible to use: arm, s390, ppc64le...



 Comments   
Comment by Mihails Prihodko [ 2024 Mar 27 ]

The script supports cross-compilation on Linux for other CPU architectures (if the plugin supports it). For Windows targets, a plugin should be compiled on Windows. Cross-compilation is not supported for Windows ARM/ARM64 targets due to problems with windres.

On non-Windows, the script can take GOOS and GOARCH variables directly or translate OS to GOOS and ARCH to GOARCH.
On Windows, the ARCH variable is expected to be defined, if cross-compilation for a different CPU architecture is desired. The script can not detect Windows resources based on GOARCH.

Translation rules (from left to right):

OS GOOS
Windows_NT windows
ARCH GOARCH
x86 386
AMD64 amd64
ARM arm
ARM64 arm64

 
Linux examples:

make
make ARCH="ARM64"
make GOOS="android" ARCH="ARM64"
make GOARCH="arm64"
make GOOS="android"  GOARCH="arm64"

Windows examples:

mingw32-make --help
Usage: mingw32-make [options] [target] ...
Options:
  -e, --environment-overrides
                              Environment variables override makefiles.
mingw32-make
mingw32-make -e ARCH="AMD64"
Comment by Mihails Prihodko [ 2024 Apr 24 ]

Available in:

  PostgreSQL MongoDB MSSQL
7.0.0rc1 16d5e2eb2a4 649b07e6123 51eff613f71
6.4.15rc1 07f8aae6ca6 0ec027e4508 ea27dae68fa
6.0.30rc1 16cc1913a1d 5b21d15d067 67a6d369af3
Generated at Wed May 21 06:55:18 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.