msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.28k stars 1.22k forks source link

Package yaml-cpp v0.6.3, missing yaml-cpp.dll #5846

Closed aferrero2707 closed 5 years ago

aferrero2707 commented 5 years ago

Unless I am doing something wrong, the latest version of the yaml-cpp (0.6.3) does not install the yaml-comm.dll file. Version 0.6.2 was installing it.

Is this intentional?

StarWolf3000 commented 5 years ago

It should be noted that 0.6.2 was the only version that packaged the dll. I've checked other revisions, and neither of them includes the dll. It looks like 0.6.2 was built for dynamic linking, not static linking (it has libyaml-cpp.dll.a instead of libyaml-cpp.a).

aferrero2707 commented 5 years ago

In this case, shouldn't the pkgconfig file be modified to reflect the static linking?

The current yaml-cpp.pc for 0.6.3 reads like this:

prefix=/mingw64
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib

Name: Yaml-cpp
Description: A YAML parser and emitter for C++
Version: 0.6.3
Requires:
Libs: -L${libdir} -lyaml-cpp
Cflags: -I${includedir}

My understanding is that the Libs: variable corresponds to a dynamically linked library. I guess it should be modified to something like

Libs: ${libdir}/libyaml-cpp.a

for a statically linked library.

What do you think?

aferrero2707 commented 5 years ago

An update on this, after a bit more investigations... In fact, I now realize that the problem is not in the pkgconfig file, but in other packages that are linked against yaml-cpp.

I am developing a graphical application that does not directly depend on yaml-cpp. The dependency is instead pulled in from OpenColorIO. What happens (I think) is that the current OpenColorIO package has been built against yaml-cpp 0.6.2, and therefore expects a dll that is not available with 0.6.3. Hence my application fails at startup because it cannot resolve all dll dependencies, and the only solution at the moment is to downgrade yaml-cpp to 0.6.2.

I guess this means that all packages that were built against yaml-cpp 0.6.2 are currently broken, and they should be re-built with 0.6.3. Am I right?

Also, is there a specific reason to force static linking for yaml-cpp?

mati865 commented 5 years ago

@aferrero2707 probably it's a bug: https://github.com/msys2/MINGW-packages/blob/4b5a5756b3fdc7e77d1f1ed525237fed9792569a/mingw-w64-yaml-cpp/PKGBUILD#L37 Should be:

-DYAML_BUILD_SHARED_LIBS=ON \
Alexpux commented 5 years ago

Fixed by https://github.com/msys2/MINGW-packages/commit/1dcfa6793a4f3e69152e615a7e003dda23d4250c