Closed vrtulka23 closed 11 months ago
It sounds like this issue should be filed on the Homebrew project? Or do you have a suggestion for changing yaml-cpp's CMake file?
Well, as I said.
The issue resolves if one sets:
set(YAML_CPP_INCLUDE_DIR "/opt/homebrew/Cellar/yaml-cpp/0.7.0/include")
set(YAML_CPP_LIBRARIES "yaml-cpp")
in the
yaml-cpp-config.cmake
file.
How and where to do it during the Homebrew installation process is up to project developers. Where is the project located?
I have no idea. I think Homebrew is a GitHub project. Have you looked it up?
Ok, I posted it to the Homebrew issues: https://github.com/Homebrew/homebrew-core/issues/136584
Hi, the Homebrew guy said, that it is an issue of yaml-cpp and not Homebrew: https://github.com/Homebrew/homebrew-core/issues/136584
I don't really know anything about Homebrew, but I was going based on your suggestion to set some variable to use a Homebrew path. That's not going in yaml-cpp, obviously.
If yaml-cpp is doing something wrong and you want to fix it, please let me know and I'm happy to accept a PR. But a vague "yaml-cpp doesn't work with Homebrew" isn't a good issue here. Maybe ask on Stack Overflow to try to clarify the issue and then figure out if it's a bug with one of these systems?
Hi there, Homebrew guy here. Based on the discussion at Homebrew/homebrew-core#136584, this issue can be reproduced without using Homebrew at all, so it doesn't seem like this is a Homebrew issue.
One can do this by following your installation instructions from the yaml-cpp-0.7.0 tag. This appears to be fixed on master, though, so it may suffice to cut a new release tag?
The underlying issue is that Homebrew builds only from official releases. The latest yaml-cpp
release is 0.7.0, over two years old now, and therefore didn't capture https://github.com/jbeder/yaml-cpp/pull/1077.
So please update the release number and problem solved!
Ah, makes sense, will do!
Hi,
I was recently trying to install yaml-cpp on my M1 Macbook Pro using Homebrew compiling using CMake. The installation does not run properly. Maybe I miss something, but the variables in yaml-cpp-config.cmake seem to have empty values.
My CMakeList.txt tries to find and include YAML in a following way:
The installation of yaml-cpp using Homebrew creates directory:
/opt/homebrew/Cellar/yaml-cpp/0.7.0/
CMake configuration files are generated here:/opt/homebrew/Cellar/yaml-cpp/0.7.0/share/cmake/yaml-cpp/yaml-cpp-....cmake
File yaml-cpp-config.cmake is defaultly set as:
This obviously does not work, but it can be FIXED manually. One has to set the proper YAML_CPP_INCLUDE_DIR and YAML_CPP_LIBRARIES variables as follow:
I don't know why this happens, but those settings are simply missing in a standard Homebrew installation and library cannot be linked properly by CMake.
The above fix resolves the problem. Please repare it in the source code or explain me what is going on wrong.
Thanks!