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

Zabbix agent 7.0.0alpha8 fails to build on Windows

XMLWordPrintable

    • Icon: Patch request Patch request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.0alpha8
    • Agent (G)
    • None
    • Windows

      The Windows agent Makefile lacks reference to the newly added charset.c, so it isn't built and can't be linked in, resulting in the 1st error below for zbx_determine_charset not being resolved. Adding charset.o to the list of objects to include in the Makefile resolves this issue (see attached patch).

      Additionally, the zbx_http_request_sync_perform function calls sleep() under the next_attempt label (goto), but sleep() is a POSIX function and not available on Windows. Including zbxthreads.h and changing the sleep() call to zbx_sleep(), a macro defined as sleep() on POSIX but SleepEx() on Windows, resolves this issue (see attached patch).

       

      Steps to reproduce:

      1. Build 7.0.0alpha8 agent on Windows

      Result:

      The build fails in the linking stage with the following 2 errors:

      http.o : error LNK2019: 未解決の外部シンボル zbx_determine_charset が関数 zbx_http_convert_to_utf8 で参照されました。
      http.o : error LNK2019: 未解決の外部シンボル sleep が関数 zbx_http_request_sync_perform で参照されました。

      The 1st error translates into English as: unresolved external symbol zbx_determine_charset referenced in function zbx_http_convert_to_utf8.

      The 2nd error translates into English as: unresolved external symbol sleep referenced in function zbx_http_request_sync_perform.

      Expected:
      The build succeeds.

            fvilarnovo Facundo Vilarnovo
            Justin.Boffemmyer Justin Boffemmyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: