Skip to content

Can't build native dependencies on windows #19

@kirsan31

Description

@kirsan31

Hi. I am trying to build whole project on Windows (Visual studio 18.2.2 with cmake and vcpkg integrated) and have problems with databento-cpp dependency (all commands runs from VS 2026 x64 Native Tools Command Prompt):
Image

e:\Projects\Work\databento-dotnet\build>powershell -File build-native.ps1 -Configuration Release -Clean
========================================
Building Databento.Native
Configuration: Release
========================================
Cleaning build directory...
Using vcpkg toolchain: C:\Program Files\Microsoft Visual Studio\18\Community\VC\vcpkg\scripts\buildsystems\vcpkg.cmake

Configuring CMake...
-- Building for: Visual Studio 18 2026
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.26200.
-- The CXX compiler identification is MSVC 19.50.35724.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Fetching databento-cpp...
-- Started CMake for databento v0.49.0...
-- Added all header and implementation files.
CMake Error at C:/Program Files/Microsoft Visual Studio/18/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
  OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files/Microsoft Visual Studio/18/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/Microsoft Visual Studio/18/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-4.1/Modules/FindOpenSSL.cmake:716 (find_package_handle_standard_args)
  C:/Program Files/Microsoft Visual Studio/18/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake:896 (_find_package)
  E:/Projects/Work/databento-dotnet/build/native/_deps/databento-cpp-src/CMakeLists.txt:129 (find_package)


-- Configuring incomplete, errors occurred!
CMake configuration failed
At E:\Projects\Work\databento-dotnet\build\build-native.ps1:62 char:9
+         throw "CMake configuration failed"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (CMake configuration failed:String) [], RuntimeException
    + FullyQualifiedErrorId : CMake configuration failed

Vcpkg not even trying to install databento-cpp's dependencies.
BUT if I am building only databento-cpp directly from build\native\_deps\databento-cpp-src\ directory - all build fine.
So I guess that when building from build-native.ps1 it's somehow missing build\native\_deps\databento-cpp-src\vcpkg.json file 🤔
But setting it thru DVCPKG_MANIFEST_DIR in build-native.ps1 like this:

$vcpkgManifestDir = Join-Path $buildDir "_deps\databento-cpp-src"
....
$cmakeArgs += "-DVCPKG_MANIFEST_DIR=$vcpkgManifestDir -DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain"

didn't solve the problem :( I'm not very good at all these Linux stuff, so that's where my thoughts end - sorry🙄

-------------------------UPD-----------------------

Ok, I think I have found possible reason of the problems - mixing of fetchcontent and vcpkg. So, if databento-cpp uses vcpkg to install dependencies then we also need to use vcpkg instead of fetchcontent to install databento-cpp in all in one solution. But this is not quite trivial task for me :(
Or may be simpler build databento-cpp separately (with separate cmake call)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions