Cmake install无法在MSVC上获取ASan

g6baxovj  于 2023-10-20  发布在  其他
关注(0)|答案(1)|浏览(262)

我一直在尝试在msvc上启用杀毒程序来构建laptop(我正在测试一个未合并的PR)。我在运行cmake --install . --prefix=(folder) --config=Debug后得到这种错误

-- Finding prerequisites of lmms.exe

--

warning: cannot resolve item 'clang_rt.asan_dynamic-x86_64.dll'

  possible problems:

    need more directories?

    need to use InstallRequiredSystemLibraries?

    run in install tree instead of build tree?

-- warning: gp_resolved_file_type non-absolute file 'clang_rt.asan_dynamic-x86_64.dll' returning type 'other' -- possibly incorrect

--

warning: cannot resolve item 'clang_rt.asan_dynamic-x86_64.dll'

  possible problems:

    need more directories?

    need to use InstallRequiredSystemLibraries?

    run in install tree instead of build tree?

--

warning: cannot resolve item 'clang_rt.asan_dynamic-x86_64.dll'

  possible problems:

    need more directories?

    need to use InstallRequiredSystemLibraries?

    run in install tree instead of build tree?

CMake Error at D:/BuildAndGit/lmms/cmake/modules/InstallDependencies.cmake:179 (message):

  Can't resolve dependency clang_rt.asan_dynamic-x86_64.dll.

Call Stack (most recent call first):

  D:/BuildAndGit/lmms/cmake/modules/InstallDependencies.cmake:126 (find_prerequisites)

  cmake/install/cmake_install.cmake:63 (INSTALL_DEPENDENCIES)

  cmake_install.cmake:112 (include)

问公关作者,他也不知道。如果有要求,我可以在这里链接PR。我正在与LMMS团队讨论这个问题,但我正在寻找额外的信息。
我试着用cmake编译并安装laptop。它构建得很好,但无法安装。

g52tjvyc

g52tjvyc1#

我找到了答案:就像He3lixxx说的,我将包含clang_rt.asan_dynamic-x86_64.dll的目录添加到path(即C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\Hostx64\x64)一次,但没有工作。然后我再次运行cmake并重新构建clean,这解决了所有问题。

相关问题