Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[yaml-cpp] Application links always against release version #19701

Closed
Carbenium opened this issue Aug 22, 2021 · 3 comments · Fixed by #19703
Closed

[yaml-cpp] Application links always against release version #19701

Carbenium opened this issue Aug 22, 2021 · 3 comments · Fixed by #19703
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@Carbenium
Copy link
Contributor

Describe the bug
Since yaml-cpp got upgraded to 0.7.0 in #19272, projects built in Debug mode link against the release version of the library leading to ABI incompatibilities.

Below a shortened sample output during build of the application in Debug mode. Notice how it is correctly linking against the debug build of boost but uses the release version of yaml-cpp.

[...] -- C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe [...] vcpkg_installed\x64-windows\debug\lib\boost_program_options-vc140-mt-gd.lib vcpkg_installed\x64-windows\lib\yaml-cpp.lib [...]

Also yaml-cppd.dll is not copied to the output directory.

Environment

  • OS: Windows
  • Compiler: MSVC 19.29.30133

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install yaml-cpp
  2. Build application in debug mode

Expected behavior
Application links against debug version of yaml-cpp and yaml-cppd.dll is copied to the output directory.

@autoantwort
Copy link
Contributor

Do you have a custom cmake file for yaml or how do you find the lib? I think the debug lib is called libyaml-cppd (at least on mac)

@autoantwort
Copy link
Contributor

Can you test #19703?

@Carbenium
Copy link
Contributor Author

Do you have a custom cmake file for yaml or how do you find the lib? I think the debug lib is called libyaml-cppd (at least on mac)

Nope, no custom find module.

Can you test #19703?

Thanks for the quick fix! It resolves the issue for me. Application build tested in Debug and RelWithDebInfo configuration. It correctly links against yaml-cppd.dll with the former config and against yaml-cpp.dll with the latter. Can't test with other OSs though, since I'm using vcpkg only on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants