Skip to content

Bug: Can't build LLAMA_CURL=ON to embed curl on windows x64 build. #9937

@AnthonyEmiom

Description

@AnthonyEmiom

What happened?

When I build the following:

cmake -B build -DGGML_CUDA=ON -DLLAMA_CURL=ON
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.20348.
-- OpenMP found
-- Using llamafile
-- CUDA found
-- Using CUDA architectures: 52;61;70;75
-- ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- CMAKE_GENERATOR_PLATFORM:
-- x86 detected
CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-

3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
Call Stack (most recent call first):

C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/FindCURL.cmake:196 (find_package_handle_standard_args)
common/CMakeLists.txt:81 (find_package)

-- Configuring incomplete, errors occurred!

Name and Version

version: 3928 (66c2c93)
built with MSVC 19.41.34123.0 for x64

What operating system are you seeing the problem on?

Windows

Relevant log output

the following envars are set:

CURL_INCLUDE_DIR=C:\Tools\Curl\curl-8.10.1_5-win64-mingw\include
CURL_LIBRARY=C:\Tools\Curl\curl-8.10.1_5-win64-mingw\lib

 Directory of C:\Tools\Curl\curl-8.10.1_5-win64-mingw\include

17/10/2024  10:20    <DIR>          .
17/10/2024  10:20    <DIR>          ..
17/10/2024  10:20    <DIR>          brotli
17/10/2024  10:20    <DIR>          curl
17/10/2024  10:20             5,792 libpsl.h
17/10/2024  10:20            60,665 libssh2.h
17/10/2024  10:20             4,942 libssh2_publickey.h
17/10/2024  10:20            17,369 libssh2_sftp.h
17/10/2024  10:20    <DIR>          nghttp2
17/10/2024  10:20    <DIR>          nghttp3
17/10/2024  10:20    <DIR>          ngtcp2
17/10/2024  10:20    <DIR>          openssl
17/10/2024  10:20            16,546 zconf.h
17/10/2024  10:20            26,433 zdict.h
17/10/2024  10:20            96,829 zlib.h
17/10/2024  10:20           175,838 zstd.h
17/10/2024  10:20             4,532 zstd_errors.h

Directory of C:\Tools\Curl\curl-8.10.1_5-win64-mingw\lib

17/10/2024  10:20    <DIR>          .
17/10/2024  10:20    <DIR>          ..
17/10/2024  10:20           134,498 libbrotlicommon.a
17/10/2024  10:20            56,790 libbrotlidec.a
17/10/2024  10:20         3,329,616 libcrypto.a
17/10/2024  10:20         1,662,308 libcurl.a
17/10/2024  10:20            16,226 libcurl.dll.a
17/10/2024  10:20           301,336 libnghttp2.a
17/10/2024  10:20           249,706 libnghttp3.a
17/10/2024  10:20           454,518 libngtcp2.a
17/10/2024  10:20            41,116 libngtcp2_crypto_quictls.a
17/10/2024  10:20            68,354 libpsl.a
17/10/2024  10:20           443,048 libssh2.a
17/10/2024  10:20           680,946 libssl.a
17/10/2024  10:20           123,878 libz.a
17/10/2024  10:20           845,984 libzstd.a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-unconfirmedhigh severityUsed to report high severity bugs in llama.cpp (Malfunctioning hinder important workflow)stale

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions