Closed NicknameNotTaken closed 2 years ago
Hello, thank you for your detailed issue.
It seems to be a recurring issue due to some vcpkg packages, see https://github.com/microsoft/vcpkg/issues/24028
Some dependency pull libpthread but DFIR-Orc should not link with it. If I remember correctly it is boost-multimap which is greedy. I will try to remove that dep in the future.
It is not possible to build from master branch (or any 'official' commit) because DFIR-Orc does not use vcpkg's new overlay feature. DFIR-Orc forks vcpkg to add custom fixes (see branch 'dfir-orc/2021.12.01'). One can eventually try rebase on vcpkg's master it but it is not always that easy.
cd external/vcpkg
# git clean -fdX # BEWARE: delete any files which are not comitted (built artefacts...)
git remote add microsoft https://github.com/microsoft/vcpkg.git
git fetch microsoft
git checkout dfir-orc/2021.05.12
git rebase microsoft/master
I am not surprised this seems to work, see 1. Good news.
Compiler error is trigerred on UnitTestHelper.cpp which is not required. May be switching vcpkg's branch created somme issue ?
I will check myself but I guess it should be working as Azure pipelines run those tests. I the meantime you can try to build DFIR-Orc without tests. Either use a new directory or delete CMakeCache.txt first.
cmake -G "Visual Studio 16 2019" -A Win32 -DORC_BUILD_TEST=OFF ..
Removed the dependency to libwinpthread with
diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake
index 39208f6fb..bb26f367c 100644
--- a/ports/fmt/portfile.cmake
+++ b/ports/fmt/portfile.cmake
@@ -42,7 +42,7 @@ endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_cmake_config_fixup()
-vcpkg_fixup_pkgconfig()
+#vcpkg_fixup_pkgconfig() # do not pull pkg-config and msys2 libraries like libwinpthread
if(VCPKG_TARGET_IS_WINDOWS)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake
index 3d154cbec..8951b307b 100644
--- a/ports/spdlog/portfile.cmake
+++ b/ports/spdlog/portfile.cmake
@@ -42,7 +42,7 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/spdlog)
-vcpkg_fixup_pkgconfig()
+#vcpkg_fixup_pkgconfig() # do not pull pkg-config and msys2 libraries like libwinpthread
vcpkg_copy_pdbs()
# use vcpkg-provided fmt library (see also option SPDLOG_FMT_EXTERNAL above)
Hello,
Thanks a lot for your anwsers. Removing the libwinpthread dependency (in cli11, fmt, and spdlog) and sticking to the fork of vcpkg did it (no need for ORC_BUILD_TEST=OFF). All the cmake operations went smoothly.
Thanks again!
Hi,
I tried compiling dfir-orc by following the Readme, but still got issues.
Here is what i did, from a Windows 10 (
Microsoft Windows [version 10.0.19044.1645]
):From here, several issues:
The libwinpthread can't be found:
If i switch to the branch "master" of vcpkg and regenerate it (
bootstrap-vcpkg.bat
), the packages are found and installed. But then, the exact same issue as #61 appears.Trying my luck, i removed this dependency in the project and this step finally succeeds (reminder:
cmake -G "Visual Studio 16 2019" -A Win32 ..
):Onto the next command then:
cmake --build . --config MinSizeRel -- -maxcpucount
. But here, i get a TON of build errors... Example for OrcLib:The issues are the same for the x64 version.
Any help would be appreciated 🙏
Cheers