[MDBF-644] install libcurl on amd64-builder Created: 2024-02-01  Updated: 2024-02-08

Status: In Progress
Project: MariaDB Foundation Development
Component/s: Buildbot
Affects Version/s: N/A
Fix Version/s: N/A

Type: New Feature Priority: Major
Reporter: Daniel Black Assignee: Vlad Bogolin
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks MDEV-30432 Refactor connect to use libcurl inste... In Review
Relates
relates to MDEV-26727 REST API from CONNECT SE doesn't work... In Review
relates to MDEV-33420 HASHICORP_KEY_MANAGEMENT fails on Win... Open

 Description   

Required to test MDEV-30432 on Windows.

See https://github.com/MariaDB/server/pull/2996



 Comments   
Comment by Anel Husakovic [ 2024-02-05 ]

Direct link for libcurl for W64 here

Comment by Daniel Black [ 2024-02-05 ]

Installed,

not detected.

Was this a chocolatey install? Can a CMakeOutput.txt/CMakeError.txt be saved from the build to work out its lack of detection.

https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/FindCURL.cmake

Comment by Vlad Bogolin [ 2024-02-05 ]

Curl was installed using choco but libcurl was missing. I have now installed from Anel’s link manually a new version that comes with libcurl for the amd64-windows-packages builder. Not sure if there is any additional env var that needs to be set though.

Comment by Anel Husakovic [ 2024-02-07 ]

I have tested built successfully on windows builder with libcurl by explicitly defining CURL_LIBRARY and CURL_INCLUDE_DIR, using following command:

>> cmake ../server -A x64 -DPLUGIN_ROCKSDB=NO -DMYSQL_MAINTAINER_MODE=ERR -Wno-dev -DCURL_LIBRARY=C:/ProgramData/chocolatey/lib/curl/tools/curl-7.85.0-win64-mingw/lib/libcurl.dll.a -DCURL_INCLUDE_DIR=C:/ProgramData/chocolatey/lib/curl/tools/curl-7.85.0-win64-mingw/include
-- Found CURL: C:/ProgramData/chocolatey/lib/curl/tools/curl-7.85.0-win64-mingw/lib/libcurl.dll.a (found version "7.85.0")
 
The following features have been enabled:
 * CONNECT_REST, Support for REST API in the CONNECT storage engine
 
>> # Only building connect module 
 
>> cmake --build . --verbose --config Debug --target connect -- -m

Library libcurl is properly linked dynamically

>> dumpbin /dependents storage\connect\Debug\ha_connect.dll
Microsoft (R) COFF/PE Dumper Version 14.33.31630.0
Copyright (C) Microsoft Corporation.  All rights reserved.
 
 
Dump of file storage\connect\Debug\ha_connect.dll
 
File Type: DLL
 
  Image has the following dependencies:
 
    ODBC32.dll
    IPHLPAPI.DLL
    libcurl-x64.dll
    server.dll
    KERNEL32.dll
    USER32.dll
    ole32.dll
    OLEAUT32.dll
    ADVAPI32.dll
    WS2_32.dll
    api-ms-win-crt-string-l1-1-0.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-math-l1-1-0.dll
    api-ms-win-crt-convert-l1-1-0.dll
    api-ms-win-crt-stdio-l1-1-0.dll
    api-ms-win-crt-filesystem-l1-1-0.dll
    api-ms-win-crt-time-l1-1-0.dll
    api-ms-win-crt-heap-l1-1-0.dll
    api-ms-win-crt-environment-l1-1-0.dll
    api-ms-win-crt-locale-l1-1-0.dll
    api-ms-win-crt-utility-l1-1-0.dll
 
  Summary
 
        1000 .00cfg
        A000 .data
        6000 .idata
       1A000 .pdata
       DB000 .rdata
        9000 .reloc
        1000 .rsrc
      230000 .text
        1000 _RDATA

The test is now failing

 
worker[01] mysql-test-run: WARNING: Process [mysqld.1 - pid: 45092, winpid: 45092] died after mysql-test-run waited 0 seconds for C:/Users/Administrator/Desktop/anel/bld/mysql-test/var/1/run/mysqld.1.pid to be created.
connect.rest                             w1 [ fail ]
        Test ended at 2024-02-07 13:32:55
 
CURRENT_TEST: connect.rest

The problem that now exists is that PATH variable should be set.

vladbogo can you please add the cmake variables to windows builders and append to env PATH variable C:\ProgramData\chocolatey\lib\curl\tools\curl-7.85.0-win64-mingw\bin ?

Generated at Thu Feb 08 03:39:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.