Skip to content

Commit ec62904

Browse files
authored
fix CI issues related to moving dependencies (#4023)
1 parent 14a94d3 commit ec62904

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

dev/CMakePresetsMamba.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
{
2424
"cacheVariables": {
2525
"BUILD_MICROMAMBA": "ON",
26-
"BUILD_STATIC": "ON"
26+
"BUILD_STATIC": "ON",
27+
"ENABLE_WIN32_XMLLITE": "ON"
2728
},
2829
"hidden": true,
2930
"name": "mamba-static"

dev/environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies:
4747
- scikit-build
4848
# libmambapy dependencies
4949
- python
50-
- pybind11
50+
- pybind11<3.0.0
5151
# libmambapy-stubs build dependencies
5252
- mypy # For stubgen
5353
- setuptools

libmamba/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,15 @@ macro(libmamba_create_target target_name linkage output_name)
563563

564564
set(CMAKE_PREFIX_PATH "$ENV{VCPKG_ROOT}/installed/x64-windows-static-md/")
565565

566+
# TODO AND CONTEXT: We found a link error in libarchive which lacked a link to XmlLite
567+
# which is provided by Windows. libarchive has cmake scripts doing the necessary work to
568+
# link that library but for some reason we couldnt identify it is not linking in this
569+
# specific case (it was before but the version changed apparently). As a workaround we
570+
# manually link with that required library but a better solution would be to find why
571+
# libarchive doesnt do it itself.
572+
set(SYSTEM_PROVIDED_LIBRARIES XmlLite.lib) # required by libarchive
573+
set(ENABLE_WIN32_XMLLITE ON)
574+
566575
# For Windows we have a vcpkg based build system right now.
567576
find_package(LibArchive MODULE REQUIRED)
568577
find_package(CURL CONFIG REQUIRED)
@@ -582,6 +591,7 @@ macro(libmamba_create_target target_name linkage output_name)
582591
${target_name}
583592
PUBLIC
584593
${CRYPTO_LIBRARIES}
594+
${SYSTEM_PROVIDED_LIBRARIES}
585595
${LibArchive_LIBRARY}
586596
${LIBXML2_LIBRARY}
587597
${ICONV_LIBRARY}

libmamba/src/util/encoding.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// The full license is in the file LICENSE, distributed with this software.
66

77
#include <array>
8+
#include <cassert>
89
#include <cstdint>
910
#include <cstring>
1011
#include <ranges>

vcpkg.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"dependencies": [
44
"zstd",
55
"curl",
6+
"libiconv",
7+
{
8+
"features": ["iconv", "lzma", "zlib"],
9+
"name": "libxml2"
10+
},
611
{
712
"name": "winreg",
813
"platform": "windows"

0 commit comments

Comments
 (0)