Bug 239661
| Summary: | [CMake] Could NOT find Ruby | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
| Component: | CMake | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | fujii.hironori |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Michael Catanzaro
We have some weird mystery with CMake's tests for Ruby:
-- Could NOT find Ruby (missing: Ruby_INCLUDE_DIR Ruby_LIBRARY Ruby_CONFIG_INCLUDE_DIR) (found suitable version "2.5.9", minimum required is "1.9")
This has been broken for as long as I remember, probably 5+ years or more. After CMake prints this line, it just... keeps going, with no apparent problems whatsoever. It seems like a harmless warning, but it's dumb and I'm curious what's going on.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Fujii Hironori
The warning means it founds ruby command, but ruby library.
There is a comment about this.
https://github.com/WebKit/WebKit/blob/c0fdd48006a448510939c08c02422208dfc98bdb/Source/cmake/WebKitCommon.cmake#L190,L192
> # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
> # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
> # for finding only the Ruby interpreter.
FindRuby should have `COMPONENTS Interpreter` like FindPython.
https://cmake.org/cmake/help/latest/module/FindRuby.html
https://cmake.org/cmake/help/latest/module/FindPython.html
Fujii Hironori
FindRuby: Distinguish Interpreter and Development components (#20474) · Issues · CMake / CMake · GitLab
https://gitlab.kitware.com/cmake/cmake/-/issues/20474