RESOLVED FIXED 208948
[CMake] Lots of developer warnings with cmake 3.17.0-rc2
https://bugs.webkit.org/show_bug.cgi?id=208948
Summary [CMake] Lots of developer warnings with cmake 3.17.0-rc2
Michael Catanzaro
Reported 2020-03-11 15:03:10 PDT
We have this warning when building with CMake 3.17.0-rc2: -- Found Perl: /usr/bin/perl (found suitable version "5.30.1", minimum required is "5.10.0") CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PerlModules_JSON::PP) does not match the name of the calling package (PerlModules). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): Source/cmake/FindPerlModules.cmake:68 (find_package_handle_standard_args) Source/cmake/WebKitCommon.cmake:18 (find_package) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. -- Found PerlModules_JSON::PP: TRUE -- Found PerlModules: TRUE found components: JSON::PP
Attachments
Patch (1.58 KB, patch)
2020-03-11 15:47 PDT, Konstantin Tokarev
no flags
Patch (20.19 KB, patch)
2020-03-11 16:37 PDT, Konstantin Tokarev
no flags
Patch (5.72 KB, patch)
2020-03-11 16:56 PDT, Konstantin Tokarev
annulen: review-
Patch (19.66 KB, patch)
2020-03-12 15:43 PDT, Konstantin Tokarev
no flags
Patch (11.16 KB, patch)
2020-03-12 15:49 PDT, Konstantin Tokarev
no flags
Michael Catanzaro
Comment 1 2020-03-11 15:09:25 PDT
BTW I don't understand how to fix it. The call in WebKitCommon.cmake looks fine, so I guess CMake doesn't like how we've implemented our FindPerlModules.cmake.
Don Olmstead
Comment 2 2020-03-11 15:20:16 PDT
(In reply to Michael Catanzaro from comment #1) > BTW I don't understand how to fix it. The call in WebKitCommon.cmake looks > fine, so I guess CMake doesn't like how we've implemented our > FindPerlModules.cmake. Looks like you're rewriting all the perl to be python.
Don Olmstead
Comment 3 2020-03-11 15:35:19 PDT
(In reply to Michael Catanzaro from comment #0) > We have this warning when building with CMake 3.17.0-rc2: > > > -- Found Perl: /usr/bin/perl (found suitable version "5.30.1", minimum > required is "5.10.0") > CMake Warning (dev) at > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): > The package name passed to `find_package_handle_standard_args` > (PerlModules_JSON::PP) does not match the name of the calling package > (PerlModules). This can lead to problems in calling code that expects > `find_package` result variables (e.g., `_FOUND`) to follow a certain > pattern. > Call Stack (most recent call first): > Source/cmake/FindPerlModules.cmake:68 (find_package_handle_standard_args) > Source/cmake/WebKitCommon.cmake:18 (find_package) > CMakeLists.txt:169 (include) > This warning is for project developers. Use -Wno-dev to suppress it. > > -- Found PerlModules_JSON::PP: TRUE > -- Found PerlModules: TRUE found components: JSON::PP I'm going to guess that it wants things like find_package(PerlModules COMPONENTS JSON::PP) in a similar vein how the builtin FindICU and our FindHarfbuzz.cmake works.
Konstantin Tokarev
Comment 4 2020-03-11 15:47:45 PDT
Stephan Szabo
Comment 5 2020-03-11 16:00:52 PDT
This looks like it was added in: https://github.com/Kitware/CMake/commit/ee4673c1ae1e4a1aa4687412717567c2ffbb501b and there's a NAME_MISMATCHED argument to quiet the message. However, it seems like trying to call the function for each component is not the intended usage, so the patch seems like a better fix.
Michael Catanzaro
Comment 6 2020-03-11 16:09:26 PDT
Thanks Konstantin. Sadly, I missed a few spots. Looks like FindHarfBuzz.cmake, FindSQLite3.cmake, FindATSPI.cmake, FindWPEBackend-fdo.cmake, FindOpenJPEG.cmake, and FindLibseccomp.cmake are all also affected. Sorry I didn't initially notice this: CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (HarfBuzz). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:45 (find_package_handle_standard_args) Source/cmake/FindHarfBuzz.cmake:68 (include) Source/cmake/OptionsGTK.cmake:27 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (SQLite3). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:45 (find_package_handle_standard_args) Source/cmake/FindSQLite3.cmake:57 (include) Source/cmake/OptionsGTK.cmake:33 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (ATSPI). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:45 (find_package_handle_standard_args) Source/cmake/FindATSPI.cmake:33 (include) Source/cmake/OptionsGTK.cmake:38 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (WPEBACKEND_FDO) does not match the name of the calling package (WPEBackend-fdo). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): Source/cmake/FindWPEBackend-fdo.cmake:47 (find_package_handle_standard_args) Source/cmake/OptionsGTK.cmake:221 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (PkgConfig) does not match the name of the calling package (OpenJPEG). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:45 (find_package_handle_standard_args) Source/cmake/FindOpenJPEG.cmake:55 (include) Source/cmake/OptionsGTK.cmake:376 (find_package) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message): The package name passed to `find_package_handle_standard_args` (LIBSECCOMP) does not match the name of the calling package (Libseccomp). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): Source/cmake/FindLibseccomp.cmake:45 (find_package_handle_standard_args) Source/cmake/BubblewrapSandboxChecks.cmake:7 (find_package) Source/cmake/OptionsGTK.cmake:452 (include) Source/cmake/WebKitCommon.cmake:56 (include) CMakeLists.txt:169 (include) This warning is for project developers. Use -Wno-dev to suppress it.
Konstantin Tokarev
Comment 7 2020-03-11 16:37:04 PDT
Konstantin Tokarev
Comment 8 2020-03-11 16:56:32 PDT
Konstantin Tokarev
Comment 9 2020-03-11 16:58:01 PDT
Remaining warnings should be fixed similarly to Libseccomp patch (note that you either rename variables, or Find*.cmake files, or both - depends on which naming you prefer)
Michael Catanzaro
Comment 10 2020-03-12 13:50:04 PDT
First two patches look OK. I'm not fond of changing all these variables to use lowercase naming, which is inconsistent with WebKit's CMake code style. We should adopt targets instead.
WebKit Commit Bot
Comment 11 2020-03-12 14:33:48 PDT
Comment on attachment 393296 [details] Patch Clearing flags on attachment: 393296 Committed r258358: <https://trac.webkit.org/changeset/258358>
WebKit Commit Bot
Comment 12 2020-03-12 14:42:24 PDT
Comment on attachment 393304 [details] Patch Clearing flags on attachment: 393304 Committed r258361: <https://trac.webkit.org/changeset/258361>
WebKit Commit Bot
Comment 13 2020-03-12 14:42:26 PDT
All reviewed patches have been landed. Closing bug.
Konstantin Tokarev
Comment 14 2020-03-12 14:43:02 PDT
(In reply to Michael Catanzaro from comment #10) > I'm not fond of changing all these variables to use lowercase naming, which > is inconsistent with WebKit's CMake code style. We should adopt targets > instead. It was a mistake of mine, FPHSA is totally fine with uppercase variables. However, some renames are still needed as there are packages where variables prefix mismatches package name. This affects WPEBackend-fdo and stuff in Source/ThirdParty/libwebrtc/cmake. (As for the latter, I think it's totally wrong that these files live in ThirdParty as they are WebKit-specific, and they should be moved to the same place with other Find-modules. But it's a separate thing)
Konstantin Tokarev
Comment 15 2020-03-12 14:44:30 PDT
Reopening to add new version of third patch
Konstantin Tokarev
Comment 16 2020-03-12 15:43:08 PDT
Konstantin Tokarev
Comment 17 2020-03-12 15:49:33 PDT
WebKit Commit Bot
Comment 18 2020-03-13 11:11:03 PDT
Comment on attachment 393425 [details] Patch Clearing flags on attachment: 393425 Committed r258412: <https://trac.webkit.org/changeset/258412>
WebKit Commit Bot
Comment 19 2020-03-13 11:11:05 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.