DFIR-ORC / dfir-orc

Forensics artefact collection tool for systems running Microsoft Windows
https://dfir-orc.github.io
GNU Lesser General Public License v2.1
388 stars 42 forks source link

error compilation orc build-x64 #43

Closed logictech506 closed 3 years ago

logictech506 commented 3 years ago

Hello, I got the following error while compiling ORC (build-x64) :

C:\dfir-orc\build-x64>cmake -G "Visual Studio 16 2019" -A x64 -T v141_xp ..
-- Found SemVer: 10.1.0 (v10.1.0-rc5)
CMake Warning at CMakeLists.txt:63 (message):
BEWARE: VCPKG is currently compatible ONLY with ENGLISH version of Visual Studio.
CMake Warning at cmake/vcpkg_configure_triplets.cmake:22 (message):
vcpkg: using v141 toolset as v141_xp is not supported
Call Stack (most recent call first):
CMakeLists.txt:68 (vcpkg_configure_triplets)
-- Using vcpkg: C:/dfir-orc/external/vcpkg/vcpkg.exe All installed packages are up-to-date with the local portfiles. -- Install dependencies with: "C:/dfir-orc/external/vcpkg\vcpkg.exe"
--vcpkg-root "C:/dfir-orc/external/vcpkg"
--overlay-triplets=C:/dfir-orc/build-x64/vcpkg/tripletsinstall** 7zip:x64-windows-static boost-algorithm:x64-windows-static boost-dynamic-bitset:x64-windows-static boost-logic:x64-windows-static boost-multi-index:x64-windows-static boost-outcome:x64-windows-static boost-scope-exit:x64-windows-static fmt:x64-windows-static spdlog:x64-windows-static yara:x64-windows-static rapidjson:x64-windows-static cli11:x64-windows-static boost-stacktrace:x64-windows-static Computing installation plan...
warning: vcpkg appears to be in a Visual Studio prompt targeting x86 but is installing packages for x64-windows-static. Consider using --triplet x86-windows or --triplet x86-uwp.
The following packages are already installed: 7zip[core]:x64-windows-static
boost-algorithm[core]:x64-windows-static
boost-dynamic-bitset[core]:x64-windows-static
boost-logic[core]:x64-windows-static
boost-multi-index[core]:x64-windows-static
boost-outcome[core]:x64-windows-static
boost-scope-exit[core]:x64-windows-static
boost-stacktrace[core]:x64-windows-static
cli11[core]:x64-windows-static
fmt[core]:x64-windows-static
rapidjson[core]:x64-windows-static
The following packages will be built and installed:
spdlog[core]:x64-windows-static
yara[core]:x64-windows-static
Package 7zip:x64-windows-static is already installed
Package boost-algorithm:x64-windows-static is already installed
Package boost-dynamic-bitset:x64-windows-static is already installed
Package boost-logic:x64-windows-static is already installed
Package boost-multi-index:x64-windows-static is already installed
Package boost-outcome:x64-windows-static is already installed
Package boost-scope-exit:x64-windows-static is already installed
Package boost-stacktrace:x64-windows-static is already installed
Package cli11:x64-windows-static is already installed
Package fmt:x64-windows-static is already installed
Package rapidjson:x64-windows-static is already installed
Detecting compiler hash for triplet x64-windows-static...
Starting package 12/2: spdlog:x64-windows-static
Building package spdlog[core]:x64-windows-static...
Could not locate cached archive:
C:\Users\User\AppData\Local\vcpkg\archives\f7\f7d16c3f5f09a80f8ba67d97359fd474060dfe3a.zip
-- [OVERLAY] Loading triplet configuration from: C:\dfir-orc\build-x64\vcpkg\triplets\x64-windows-static.cmake
-- Using cached C:/dfir-orc/external/vcpkg/downloads/gabime-spdlog-cbe9448650176797739dbab13961ef4c07f4290f.tar.gz
-- Cleaning sources at C:/dfir-orc/external/vcpkg/buildtrees/spdlog/src/4c07f4290f-62f220f1e1.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/dfir-orc/external/vcpkg/downloads/gabime-spdlog-cbe9448650176797739dbab13961ef4c07f4290f.tar.gz
-- Applying patch fix-featurebuild.patch
-- Applying patch 0001-Perfect-forwarding-for-arguments.patch
-- Using source at C:/dfir-orc/external/vcpkg/buildtrees/spdlog/src/4c07f4290f-62f220f1e1.clean
-- Configuring x64-windows-static
-- Building x64-windows-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:142 (message):
Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j2
Working Directory: C:/dfir-orc/external/vcpkg/buildtrees/spdlog/x64-windows-static-dbg See logs for more information:
C:\dfir-orc\external\vcpkg\buildtrees\spdlog\install-x64-windows-static-dbg-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:93 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/spdlog/portfile.cmake:27 (vcpkg_install_cmake)
scripts/ports.cmake:135 (include)
Error: Building package spdlog:x64-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: spdlog:x64-windows-static
Vcpkg version: 2020.06.15-nohash
Additionally, attach any relevant sections from the log files above.
CMake Error at cmake/vcpkg.cmake:115 (message):
Failed to install packages: 1
Call Stack (most recent call first):
cmake/vcpkg.cmake:205 (vcpkg_install_packages)
CMakeLists.txt:129 (vcpkg_install)
-- Configuring incomplete, errors occurred!

(my vcpkg version is up to date) Does someone know how to solve this problem ? Thank you for your help

fabienfl-orc commented 3 years ago

Hello, are you using x64 developer prompt ?

image

If this is the case, can you post the content of the following file ?

C:\dfir-orc\external\vcpkg\buildtrees\spdlog\install-x64-windows-static-dbg-out.log

logictech506 commented 3 years ago

Thank you for your answer Yes, I used x64 developer prompt. Here is the content of the file C:\dfir-orc\external\vcpkg\buildtrees\spdlog\install-x64-windows-static-dbg-out.log :

[1/10] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe /TP -DFMT_LOCALE -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -IC:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\include -IC:\dfir-orc\external\vcpkg\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /std:c++17 /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /DNTDDI_VERSION=0x05010200 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\spdlog.dir\src\file_sinks.cpp.obj /FdCMakeFiles\spdlog.dir\spdlog.pdb /FS -c C:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\src\file_sinks.cpp [2/10] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe /TP -DFMT_LOCALE -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -IC:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\include -IC:\dfir-orc\external\vcpkg\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /std:c++17 /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /DNTDDI_VERSION=0x05010200 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\spdlog.dir\src\spdlog.cpp.obj /FdCMakeFiles\spdlog.dir\spdlog.pdb /FS -c C:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\src\spdlog.cpp [3/10] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe /TP -DFMT_LOCALE -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -IC:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\include -IC:\dfir-orc\external\vcpkg\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /std:c++17 /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /DNTDDI_VERSION=0x05010200 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\spdlog.dir\src\color_sinks.cpp.obj /FdCMakeFiles\spdlog.dir\spdlog.pdb /FS -c C:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\src\color_sinks.cpp [4/10] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe /TP -DFMT_LOCALE -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -IC:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\include -IC:\dfir-orc\external\vcpkg\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /std:c++17 /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /DNTDDI_VERSION=0x05010200 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\spdlog.dir\src\stdout_sinks.cpp.obj /FdCMakeFiles\spdlog.dir\spdlog.pdb /FS -c C:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\src\stdout_sinks.cpp [5/10] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe /TP -DFMT_LOCALE -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -IC:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\include -IC:\dfir-orc\external\vcpkg\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /std:c++17 /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /DNTDDI_VERSION=0x05010200 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\spdlog.dir\src\cfg.cpp.obj /FdCMakeFiles\spdlog.dir\spdlog.pdb /FS -c C:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\src\cfg.cpp [6/10] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe /TP -DFMT_LOCALE -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -IC:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\include -IC:\dfir-orc\external\vcpkg\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /std:c++17 /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /DNTDDI_VERSION=0x05010200 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\spdlog.dir\src\async.cpp.obj /FdCMakeFiles\spdlog.dir\spdlog.pdb /FS -c C:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\src\async.cpp [7/10] cmd.exe /C "cd . && C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\lib.exe /machine:x64 /nologo /out:spdlogd.lib CMakeFiles\spdlog.dir\src\spdlog.cpp.obj CMakeFiles\spdlog.dir\src\stdout_sinks.cpp.obj CMakeFiles\spdlog.dir\src\color_sinks.cpp.obj CMakeFiles\spdlog.dir\src\file_sinks.cpp.obj CMakeFiles\spdlog.dir\src\async.cpp.obj CMakeFiles\spdlog.dir\src\cfg.cpp.obj && cd ." [8/10] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\cl.exe /TP -DFMT_LOCALE -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -IC:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\include -IC:\dfir-orc\external\vcpkg\installed\x64-windows-static\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /std:c++17 /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /DNTDDI_VERSION=0x05010200 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /Foexample\CMakeFiles\example.dir\example.cpp.obj /Fdexample\CMakeFiles\example.dir\ /FS -c C:\dfir-orc\external\vcpkg\buildtrees\spdlog\src\4c07f4290f-62f220f1e1.clean\example\example.cpp [9/10] cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=example\CMakeFiles\example.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\link.exe example\CMakeFiles\example.dir\example.cpp.obj /out:example\example.exe /implib:example\example.lib /pdb:example\example.pdb /version:0.0 /machine:x64 /nologo /debug /INCREMENTAL /subsystem:console spdlogd.lib C:\dfir-orc\external\vcpkg\installed\x64-windows-static\debug\lib\fmtd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." FAILED: example/example.exe cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=example\CMakeFiles\example.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\link.exe example\CMakeFiles\example.dir\example.cpp.obj /out:example\example.exe /implib:example\example.lib /pdb:example\example.pdb /version:0.0 /machine:x64 /nologo /debug /INCREMENTAL /subsystem:console spdlogd.lib C:\dfir-orc\external\vcpkg\installed\x64-windows-static\debug\lib\fmtd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ." LINK Pass 1: command "C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\HostX64\x64\link.exe example\CMakeFiles\example.dir\example.cpp.obj /out:example\example.exe /implib:example\example.lib /pdb:example\example.pdb /version:0.0 /machine:x64 /nologo /debug /INCREMENTAL /subsystem:console spdlogd.lib C:\dfir-orc\external\vcpkg\installed\x64-windows-static\debug\lib\fmtd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:example\CMakeFiles\example.dir/intermediate.manifest example\CMakeFiles\example.dir/manifest.res" failed (exit code 1120) with the following output: fmtd.lib(format.cc.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck_EH4 example\example.exe : fatal error LNK1120: 1 unresolved externals ninja: build stopped: subcommand failed.

fabienfl-orc commented 3 years ago

Did you previously build DFIR-Orc in another version ? Using the same build directory and vcpkg directory ?

The missing symbol could relate to mixed Windows SDK version. In the recent release candidate the targeted build environment is more precise. The previously vcpkg packages or build artifacts could still expect the previous dependencies.