Zabbix fails to compile with libcURL <= 7.19.1

XMLWordPrintable

    • Type: Incident report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.0alpha1
    • Component/s: Proxy (P), Server (S)
    • None

      According to configure.ac, Zabbix supports building with at least libcURL 7.13.1.

      In practice, this is not the case, due to the zbxembed libraries httprequest.c module:

      Making all in zbxembed
      httprequest.c:354:40: error: use of undeclared identifier 'CURLOPT_TIMEOUT_MS'; did you mean 'CURLOPT_TIMEOUT'?
             ZBX_CURL_SETOPT(ctx, request->handle, CURLOPT_TIMEOUT_MS, timeout_ms - elapsed_ms, err);
                                                   ^~~~~~~~~~~~~~~~~~
                                                   CURLOPT_TIMEOUT
      httprequest.c:63:50: note: expanded from macro 'ZBX_CURL_SETOPT'
             if (CURLE_OK != (err = curl_easy_setopt(handle, opt, value)))                                   \
                                                             ^
      /home/jxl/scm/git/curl/fakeroot/include/curl/curl.h:461:3: note: 'CURLOPT_TIMEOUT' declared here
      CINIT(TIMEOUT, LONG, 13),
      ^
      /home/jxl/scm/git/curl/fakeroot/include/curl/curl.h:405:33: note: expanded from macro 'CINIT'
      #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
                                     ^
      <scratch space>:211:1: note: expanded from here
      CURLOPT_TIMEOUT
      ^
      httprequest.c:576:41: error: use of undeclared identifier 'CURLOPT_USERNAME'
                     ZBX_CURL_SETOPT(ctx, request->handle, CURLOPT_USERNAME, username, err);
                                                           ^
      httprequest.c:579:41: error: use of undeclared identifier 'CURLOPT_PASSWORD'; did you mean 'CURLOPT_PORT'?
                     ZBX_CURL_SETOPT(ctx, request->handle, CURLOPT_PASSWORD, password, err);
                                                           ^~~~~~~~~~~~~~~~
                                                           CURLOPT_PORT
      httprequest.c:63:50: note: expanded from macro 'ZBX_CURL_SETOPT'
             if (CURLE_OK != (err = curl_easy_setopt(handle, opt, value)))                                   \
                                                             ^
      /home/jxl/scm/git/curl/fakeroot/include/curl/curl.h:429:3: note: 'CURLOPT_PORT' declared here
      CINIT(PORT, LONG, 3),
      ^
      /home/jxl/scm/git/curl/fakeroot/include/curl/curl.h:405:33: note: expanded from macro 'CINIT'
      #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
                                     ^
      <scratch space>:193:1: note: expanded from here
      CURLOPT_PORT
      ^
      3 errors generated.
      make[3]: *** [Makefile:462: httprequest.o] Error 1
      

      The above option use was introduced in commits for [ZBX-20405] improved timeouts in JS and [ZBXNEXT-6441] added function to configure HTTP authentication for embedded scripts. CURLOPT_TIMEOUT_MS and CURLOPT_{USERNAME,PASSWORD} shipped with the 7.16.2 and 7.19.2 releases of cURL respectively. The ZBXNEXT-6441 changes were merged on January 18th 2021, making Zabbix incompatible with 7.13.1 for at least 2 years. 

      The oldest release still shipped by a Linux distribution was 7.26.0, by Mandriva. The BSDs generally ship much newer releases.

      I propose bumping the minimum compatible version to at least 7.19.2 to avoid managing more compatibility patches to maintain support for the older versions.

            Assignee:
            Zabbix Development Team
            Reporter:
            Juris Lambda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: