Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keystone build failure (static/mixed/dynamic CRT/CMake). #19473

Closed
angelfor3v3r opened this issue Aug 10, 2021 · 1 comment · Fixed by #19491
Closed

Keystone build failure (static/mixed/dynamic CRT/CMake). #19473

angelfor3v3r opened this issue Aug 10, 2021 · 1 comment · Fixed by #19491
Assignees
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:port-bug The issue is with a library, which is something the port should already support

Comments

@angelfor3v3r
Copy link

Host Environment

  • OS: Windows
  • Compiler: MSVC/MSBuild

Failure logs

-- Performing post-build validation
Invalid crt linkage. Expected Debug,Dynamic, but the following libs had:

    C:\Sources\vcpkg\packages\keystone_x64-mixed\debug\lib\keystone.lib: Debug,Static

To inspect the lib files, use:
    dumpbin.exe /directives mylibfile.lib
Invalid crt linkage. Expected Release,Dynamic, but the following libs had:

    C:\Sources\vcpkg\packages\keystone_x64-mixed\lib\keystone.lib: Release,Static

Additional context
I'm using a custom triplet file like so:

# x64-mixed.cmake
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

if(UNIX)
    set(VCPKG_CMAKE_SYSTEM_NAME Linux)
endif()

if(${PORT} MATCHES "mimalloc")
    set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()

Inside my project's CMake file:

# Use the custom triplet for Vcpkg.
set(VCPKG_OVERLAY_TRIPLETS "${CMAKE_SOURCE_DIR}/triplets")
set(VCPKG_TARGET_TRIPLET "x64-mixed")

And for building:

// From build directory:
cmake .. -G "Visual Studio 16 2019" -T host=x64 -A x64 -DCMAKE_BUILD_TYPE="Release"
cmake --build . --config "Release"
@NancyLi1013 NancyLi1013 added category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:port-bug The issue is with a library, which is something the port should already support labels Aug 10, 2021
@NancyLi1013
Copy link
Contributor

This issue also exists on x64-windows-static-md. I will fix this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants