Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-package] CRAN issue with unqualified call to 'std::move' #5661

Closed
shiyu1994 opened this issue Jan 4, 2023 · 3 comments · Fixed by #5662
Closed

[R-package] CRAN issue with unqualified call to 'std::move' #5661

shiyu1994 opened this issue Jan 4, 2023 · 3 comments · Fixed by #5662

Comments

@shiyu1994
Copy link
Collaborator

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

For the ease of access, the URL is copied below
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

@jameslamb
Copy link
Collaborator

Thank you for sharing this! I can work on it today.

Can't believe we need to do another one of these 😫

@jameslamb
Copy link
Collaborator

jameslamb commented Jan 4, 2023

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.

Screen Shot 2023-01-04 at 2 28 41 PM

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.

I'll put up a fix here shortly.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2023
@jameslamb jameslamb changed the title [CRAN] unqualified call to 'std::move' [R-package] CRAN issue with unqualified call to 'std::move' Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants