Open SolomidHero opened 1 year ago
Hi! Any help?
If I'm understanding this issue correctly, https://github.com/facebook/folly/pull/1992 should fix this.
Also https://github.com/facebook/folly/pull/2036 should, in theory, make the existing ASAN suppressions work under MSVC as well.
Hi! I found that using following flag leads to errors
Installation via vcpkg:
my cmake file:
main.cpp:
Errors when building in
Debug
:Outputs
Configure and build
```cmake (base) PS C:\Users\Administrator\folly_helloworld\build> cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=C:\Users\Administrator\vcpkg\scripts\buildsystems\vcpkg.cmake .. -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.20348. -- Found libevent include directory: C:/Users/Administrator/vcpkg/installed/x64-windows/include -- Found libevent component: C:/Users/Administrator/vcpkg/installed/x64-windows/debug/bin/event_cored.dll -- Found libevent component: C:/Users/Administrator/vcpkg/installed/x64-windows/bin/event_core.dll -- Found libevent component: C:/Users/Administrator/vcpkg/installed/x64-windows/debug/bin/event_extrad.dll -- Found libevent component: C:/Users/Administrator/vcpkg/installed/x64-windows/bin/event_extra.dll -- Found libevent 2.2.0 in C:/Users/Administrator/vcpkg/installed/x64-windows CMake Warning at C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1384 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES) C:/Users/Administrator/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/folly-config.cmake:84 (find_dependency) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/vcpkg-cmake-wrapper.cmake:4 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) CMakeLists.txt:53 (find_package) CMake Warning at C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1384 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES) C:/Users/Administrator/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/folly-config.cmake:84 (find_dependency) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/vcpkg-cmake-wrapper.cmake:4 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) CMakeLists.txt:53 (find_package) CMake Warning at C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1384 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES) C:/Users/Administrator/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/folly-config.cmake:84 (find_dependency) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/vcpkg-cmake-wrapper.cmake:4 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) CMakeLists.txt:53 (find_package) CMake Warning at C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1384 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES) C:/Users/Administrator/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/folly-config.cmake:84 (find_dependency) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/vcpkg-cmake-wrapper.cmake:4 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) CMakeLists.txt:53 (find_package) CMake Warning at C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1384 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES) C:/Users/Administrator/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/folly-config.cmake:84 (find_dependency) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/vcpkg-cmake-wrapper.cmake:4 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) CMakeLists.txt:53 (find_package) CMake Warning at C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1384 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES) C:/Users/Administrator/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/folly-config.cmake:84 (find_dependency) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/vcpkg-cmake-wrapper.cmake:4 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) CMakeLists.txt:53 (find_package) CMake Warning at C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1384 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES) C:/Users/Administrator/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/folly-config.cmake:84 (find_dependency) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/vcpkg-cmake-wrapper.cmake:4 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) CMakeLists.txt:53 (find_package) CMake Warning at C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1384 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:1508 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2119 (_Boost_MISSING_DEPENDENCIES) C:/Users/Administrator/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindDependencyMacro.cmake:76 (find_package) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/folly-config.cmake:84 (find_dependency) C:/Users/Administrator/vcpkg/installed/x64-windows/share/folly/vcpkg-cmake-wrapper.cmake:4 (_find_package) C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake:807 (include) CMakeLists.txt:53 (find_package) -- Found folly: C:/Users/Administrator/vcpkg/installed/x64-windows -- Configuring done (0.2s) -- Generating done (0.1s) -- Build files have been written to: C:/Users/Administrator/folly_helloworld/build (base) PS C:\Users\Administrator\folly_helloworld\build> cmake --build . --config=Debug MSBuild version 17.6.3+07e294721 for .NET Framework main.cpp C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(74,1): error C3861: 'n o_sanitize': identifier not found [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxproj ] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(75,1): error C2062: ty pe 'unsigned __int64' unexpected [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(76,58): error C2143: s yntax error: missing ';' before '{' [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxpr oj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(76,58): error C2447: ' {': missing function header (old-style formal list?) [C:\Users\Administrator\folly_helloworld\build \HelloWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(93,1): error C2374: 'f olly::hash::__attribute__': redefinition; multiple initialization [C:\Users\Administrator\folly_hel loworld\build\HelloWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(74,1): message : see d eclaration of 'folly::hash::__attribute__' [C:\Users\Administrator\folly_helloworld\build\HelloWorl d.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(93,1): error C3861: 'n o_sanitize': identifier not found [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxproj ] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(94,1): error C2062: ty pe 'unsigned __int64' unexpected [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(95,58): error C2143: s yntax error: missing ';' before '{' [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxpr oj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(95,58): error C2447: ' {': missing function header (old-style formal list?) [C:\Users\Administrator\folly_helloworld\build \HelloWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(104,1): error C2374: ' folly::hash::__attribute__': redefinition; multiple initialization [C:\Users\Administrator\folly_he lloworld\build\HelloWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(74,1): message : see d eclaration of 'folly::hash::__attribute__' [C:\Users\Administrator\folly_helloworld\build\HelloWorl d.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(104,1): error C3861: ' no_sanitize': identifier not found [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxpro j] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(105,1): error C2062: t ype 'unsigned __int64' unexpected [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxproj ] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(105,55): error C2143: syntax error: missing ';' before '{' [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxp roj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(105,55): error C2447: '{': missing function header (old-style formal list?) [C:\Users\Administrator\folly_helloworld\buil d\HelloWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(526,40): error C2039: 'twang_mix64': is not a member of 'folly::hash' [C:\Users\Administrator\folly_helloworld\build\Hell oWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(49,11): message : see declaration of 'folly::hash' [C:\Users\Administrator\folly_helloworld\build\HelloWorld.vcxproj] C:\Users\Administrator\vcpkg\installed\x64-windows\include\folly/hash/Hash.h(534,2): message : see reference to class template instantiation 'folly::detail::integral_hasherSeems like uses not needed qualifiers from macros
Is there a way to enable sanitizers in program that uses folly? I also don't care if folly itself package uses or not address sanitizer, but other part of my program.