Comments (6)
Linux: It seems that the issue had been raised in sentry-native before, but the proposed fixed was never forwarded to vcpkg:
getsentry/sentry-native#596
(My first impression is that it needs a patch to compile pthread_create_linux.cc
only if BUILD_SHARED_LIBS
.)
from vcpkg.
@Patrix9999, Thanks for posting this issue, regarding the first problem on Windows, I have not reproduced your problem locally. Here is my reproduction example.
CMakeLists:
cmake_minimum_required(VERSION 3.5)
project(test)
find_package(sentry CONFIG REQUIRED)
add_executable(test CMakeProject1.cpp)
target_link_libraries(test PRIVATE sentry::sentry)
CMakeProject1.cpp:
=#include <stdio.h>
#include <sentry.h>
int main()
{
printf("%s\n", "HELLO WORLD");
return 0;
}
Config:
1> CMake generation started for configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 17 2022" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\CMakeProject1\out\install\x64-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/Feature-test/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\test\source\repos\CMakeProject1" 2>&1"
1> Working directory: C:\Users\test\source\repos\CMakeProject1\out\build\x64-Debug
1> [CMake] -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
1> [CMake] -- The C compiler identification is MSVC 19.39.33523.0
1> [CMake] -- The CXX compiler identification is MSVC 19.39.33523.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Configuring done (7.3s)
1> [CMake] -- Generating done (0.1s)
1> [CMake] -- Build files have been written to: C:/Users/test/source/repos/CMakeProject1/out/build/x64-debug
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.
from vcpkg.
@Patrix9999, Thanks for posting this issue, regarding the first problem on Windows, I have not reproduced your problem locally. Here is my reproduction example. CMakeLists:
cmake_minimum_required(VERSION 3.5) project(test) find_package(sentry CONFIG REQUIRED) add_executable(test CMakeProject1.cpp) target_link_libraries(test PRIVATE sentry::sentry)
CMakeProject1.cpp:
=#include <stdio.h> #include <sentry.h> int main() { printf("%s\n", "HELLO WORLD"); return 0; }
Config:
1> CMake generation started for configuration: 'x64-Debug'. 1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 17 2022" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\CMakeProject1\out\install\x64-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/Feature-test/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\test\source\repos\CMakeProject1" 2>&1" 1> Working directory: C:\Users\test\source\repos\CMakeProject1\out\build\x64-Debug 1> [CMake] -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045. 1> [CMake] -- The C compiler identification is MSVC 19.39.33523.0 1> [CMake] -- The CXX compiler identification is MSVC 19.39.33523.0 1> [CMake] -- Detecting C compiler ABI info 1> [CMake] -- Detecting C compiler ABI info - done 1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped 1> [CMake] -- Detecting C compile features 1> [CMake] -- Detecting C compile features - done 1> [CMake] -- Detecting CXX compiler ABI info 1> [CMake] -- Detecting CXX compiler ABI info - done 1> [CMake] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped 1> [CMake] -- Detecting CXX compile features 1> [CMake] -- Detecting CXX compile features - done 1> [CMake] -- Configuring done (7.3s) 1> [CMake] -- Generating done (0.1s) 1> [CMake] -- Build files have been written to: C:/Users/test/source/repos/CMakeProject1/out/build/x64-debug 1> Extracted CMake variables. 1> Extracted source files and headers. 1> Extracted code model. 1> Extracted toolchain configurations. 1> Extracted includes paths. 1> CMake generation finished.
I'll try to come up with reproducable sample project that has this issue.
from vcpkg.
From my initial tests i can conclude that this missing ZLIB::ZLIB
issue (windows-only) occurs when we will be using a triplet that statically compiles, everything works fine when the sentry gets compiled as dynamic library.
Here's a very simple project that has this issue (i've removed all of the fancy configuration files, to present the issue in a simplest way)
test-app.zip
The problem occurs during generation stage while using triplet that statically compiles the code, e.g: x64-windows-static
.
How to generate/build the project:
- create
build
subfolder inside the project structure - cd into
build
directory - run
cmake .. -DCMAKE_TOOLCHAIN_FILE=ABSOLUTE_PATH_TO_VCPKG_ROOT_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
Such project won't be generated correctly, and it will produce the following error:
CMake Error at build/vcpkg_installed/x64-windows-static/share/sentry/sentry_crashpad-targets.cmake:105 (set_target_prope rties):
The link interface of target "sentry_crashpad::zlib" contains:
ZLIB::ZLIB
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
The issue can be avoided by compiling the vcpkg ports as dynamic libraries, or by adding additional zlib
port dependency, but i still think that this is unintended behaviour, mostly because accoring to vcpkg, port should be self contained, correct me if i'm wrong (maybe i'm missing something out).
from vcpkg.
@Patrix9999, thanks for the repro project, I have reproduced this Windows bug and fixed it, I will submit it in my PR.
from vcpkg.
No problem, i'm just glad that i was able to help you to find a solution to this problem quicker (i would personally try to open a pull request, but unfortunately i didn't have time to investigate what might be the issue).
Good job 👍
from vcpkg.
Related Issues (20)
- [expected-lite] update to 0.7.0 + 0.8.0
- [qt5-webengine] Build error on x86-windows HOT 17
- [boost-thread] Build error on x64-windows HOT 3
- [libpq] Build error on x64-windows HOT 7
- [openssl] Build error on x64-android HOT 3
- [numcpp] change boost dependencies to a feature
- [libsystemd] Build error on x64-linux HOT 1
- [qt5-webengine] Build error on x86-windows [Windows detecting a virus and causing the build to fail] HOT 3
- [pcl] Build error on x64-linux-dynamic HOT 1
- [cpp-httplib] update to 0.16.0
- [fastrtps2.14.0] <Debug mode crashes>
- [GDCM] update to 3.0.24
- [fastrtps2.14.0] <Missing fast-discovery-serverd-1.0.1.exe during construction> HOT 1
- [qt] update to 6.7.2 HOT 2
- Incorrect documentation when using manifest mode with CMake HOT 3
- [protobuf] Build error on x64-windows HOT 2
- Build error on x64-windows HOT 3
- [ceres] Build error on x64-windows HOT 1
- [ceres] Build error on x64-windows: Overload in 'extern "C"' HOT 2
- [ffmpeg] Unclear error when building in path with spaces in manifest mode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcpkg.