[R-package] CRAN issue with unqualified call to 'std::move'
shiyu1994 opened this issue · 3 comments
Description
I got another email from CRAN on 1st Jan for the warning message about using std::move
.
[????????? [ripley@stats.ox.ac.uk](mailto:ripley@stats.ox.ac.uk) ????????? https://aka.ms/LearnAboutSenderIdentification?????????????]
Dear maintainer,
Please see the problems shown on
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcran.r-project.org%2Fweb%2Fchecks%2Fcheck_results_lightgbm.html&data=05%7C01%7Cyushi2%40microsoft.com%7C49c424fd62d04f5b8b4f08daebe41f99%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638081662299407642%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nUv6e%2FkMPULboNqb%2BRsp8uJgpeM%2FkBNeCt3%2FmGwtKFk%3D&reserved=0>.
Please correct before 2023-01-15 to safely retain your package on CRAN.
The CRAN Team
Thank you for sharing this! I can work on it today.
Can't believe we need to do another one of these 😫
The specific errors CRAN is telling us about are as follows.
Version: 3.3.4
Check: whether package can be installed
Result: WARN
Found the following significant warnings:
io/json11.cpp:207:47: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
io/json11.cpp:216:51: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
io/json11.cpp:225:53: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
io/json11.cpp:268:60: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
io/json11.cpp:272:36: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
io/json11.cpp:276:37: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
io/json11.cpp:381:41: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
io/json11.cpp:150:39: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
See ‘/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/lightgbm.Rcheck/00install.out’ for details.
* used C++ compiler: ‘Debian clang version 15.0.6’
Those are showing up on the r-devel-linux-x86_64-debian-clang and r-devel-linux-x86_64-fedora-clang CRAN check flavors.
Seems that CRAN is using clang-15
in those tests, as seen at https://cran.r-project.org/web/checks/check_flavors.html#r-devel-linux-x86_64-debian-clang.
But in the image LightGBM uses in its CI to try to replicate that (rhub/debian-clang-devel
), we're getting an older version of clang
.
docker run \
--rm \
rhub/debian-clang-devel \
clang --version
returns
Debian clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
I've reported that upstream, at r-hub/rhub-linux-builders#63.
And I see other reports about this type of warning being caused by -Wunqualified-std-cast-call
in LLVM/clang 15.x.
- https://bugs.mysql.com/bug.php?id=108870
- commaai/openpilot#25686
- ^this is even about the exact same JSON-parsing code from DropBox that we're getting a warning about
- https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg267993.html
- nodejs/node#45543
I'll put up a fix here shortly.
This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.