Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28107

S3 doesn't build if CURL is in non-default location

    XMLWordPrintable

Details

    Description

      If a path to CURL has to be provided explicitly via cmake options, S3 is able to recognize the presence of CURL, but later cannot find included files.

        C:\_home\10.6x\storage\maria\libmarias3\libmarias3/marias3.h(26,10): error C1083:  Cannot open include file: 'curl/curl.h': No such file or directory [C:\_home\10.6x\storage\maria\aria.vcxproj]
      C:\_home\10.6x\storage\maria\libmarias3\libmarias3/marias3.h(26,10): error C1083: #include <curl/curl.h> [C:\_home\10.6x\storage\maria\aria.vcxproj]
      ...
      

      The files are there and other components find them.

      This seems to be fixing the problem, although I'm not sure whether it's the right way:

      diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt
      index 284837403d9..9dfdfd42171 100644
      --- a/storage/maria/CMakeLists.txt
      +++ b/storage/maria/CMakeLists.txt
      @@ -122,6 +122,7 @@ IF(NOT PLUGIN_S3 STREQUAL NO)
       ENDIF()
       
       IF (CURL_FOUND AND NOT APPLE)
      +  INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
         LINK_DIRECTORIES(${PC_CURL_LIBDIR})
         MYSQL_ADD_PLUGIN(s3 ha_s3.cc ${S3_SOURCES} COMPONENT s3-engine
           LINK_LIBRARIES curl z STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf)
      

      The failure is from Windows, but I guess it may happen elsewhere.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.