Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17426

zabbix-agent2 compilation of pkg/tls/tls.go fails with go 1.14

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 4.4.7rc1, 5.0.0alpha3, 5.0 (plan)
    • 4.4.5, 4.4.6
    • Agent (G)
    • None
    • Arch Linux
      go 1.14
      zabbix 4.4.6 (also 4.4.5)
    • Sprint 62 (Mar 2020)
    • 0.25

      Steps to reproduce:

      Building zabbix-agent2 with go 1.14 fails. Building it with go 1.13.7 works as expected.

      The full build script I'm using is here, but it's probably not very interesting since this is likely caused by a change in the go compiler: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/zabbix&id=c3d26c23c962a95cdea62f65f19b04dc363ae416

      Result:

      make[2]: Entering directory '/build/zabbix/src/zabbix-4.4.6/src/go'
      CGO_CFLAGS="-I/usr/include" CGO_LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now   -L/usr/lib -L/usr/lib  -Wl,--start-group   /build/zabbix/src/zabbix-4.4.6/src/zabbix_agent/logfiles/libzbxlogfiles.a       /build/zabbix/sr
      c/zabbix-4.4.6/src/libs/zbxcomms/libzbxcomms.a  /build/zabbix/src/zabbix-4.4.6/src/libs/zbxcommon/libzbxcommon.a        /build/zabbix/src/zabbix-4.4.6/src/libs/zbxcrypto/libzbxcrypto.a        /build/zabbix/src/zabbix-4.4.6/src/libs/
      zbxsys/libzbxsys.a      /build/zabbix/src/zabbix-4.4.6/src/libs/zbxnix/libzbxnix.a      /build/zabbix/src/zabbix-4.4.6/src/libs/zbxconf/libzbxconf.a    /build/zabbix/src/zabbix-4.4.6/src/libs/zbxhttp/libzbxhttp.a    /build/zabbix/sr
      c/zabbix-4.4.6/src/libs/zbxcompress/libzbxcompress.a    /build/zabbix/src/zabbix-4.4.6/src/libs/zbxregexp/libzbxregexp.a        /build/zabbix/src/zabbix-4.4.6/src/libs/zbxsysinfo/libzbxagentsysinfo.a         /build/zabbix/src/zabbix
      -4.4.6/src/libs/zbxsysinfo/common/libcommonsysinfo.a    /build/zabbix/src/zabbix-4.4.6/src/libs/zbxsysinfo/simple/libsimplesysinfo.a    /build/zabbix/src/zabbix-4.4.6/src/libs/zbxsysinfo/linux/libspechostnamesysinfo.a       /build/z
      abbix/src/zabbix-4.4.6/src/libs/zbxsysinfo/linux/libspecsysinfo.a       /build/zabbix/src/zabbix-4.4.6/src/libs/zbxexec/libzbxexec.a    /build/zabbix/src/zabbix-4.4.6/src/libs/zbxalgo/libzbxalgo.a    /build/zabbix/src/zabbix-4.4.6/s
      rc/libs/zbxjson/libzbxjson.a    -lm -ldl  -lresolv -lpcre   -lz -lpthread -lssl -lcrypto -lldap -llber   -lcurl -Wl,--end-group" go build -ldflags="-X zabbix.com/pkg/version.titleMessage=zabbix_agent2 -X 'zabbix.com/pkg/version.comp
      ileDate=`date +"%b %_d %Y"`' -X zabbix.com/pkg/version.compileTime=`date +%H:%M:%S` -X zabbix.com/pkg/version.compileOs=`go env GOOS` -X zabbix.com/pkg/version.compileArch=`go env GOARCH` -X main.confDefault=/etc/zabbix/zabbix_agent
      2.conf" -o bin ./...                                                                                                
      # zabbix.com/pkg/tls                             
      pkg/tls/tls.go:867:174: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_error
      pkg/tls/tls.go:877:114: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_ready
      pkg/tls/tls.go:883:184: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_recv
      pkg/tls/tls.go:907:165: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_send
      pkg/tls/tls.go:932:113: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_close
      pkg/tls/tls.go:951:158: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_validate_issuer_and_subject
      pkg/tls/tls.go:960:156: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_description
      pkg/tls/tls.go:972:114: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_connected
      pkg/tls/tls.go:975:115: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_connected
      pkg/tls/tls.go:976:120: cannot use _cgo0 (type _Ctype_tls_lp_t) as type *_Ctype_struct___0 in argument to _Cfunc_tls_handshake
      pkg/tls/tls.go:976:120: too many errors     

      Expected:
      Build should complete successfully just like it did with go 1.13.7

            wiper Andris Zeila
            Bluewind Florian Pritz
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: