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

[ci] [R-package] clang16 CI jobs failing: "error: templates must have C++ linkage" #6607

Closed
jameslamb opened this issue Aug 14, 2024 · 0 comments · Fixed by #6642
Closed

Comments

@jameslamb
Copy link
Collaborator

Description

(clang16, R-devel) CI jobs have been failing here for the last few days, with this error in the installation of {fs}

In file included from error.cc:1:
In file included from ./error.h:5:
In file included from /opt/R/devel/lib/R/include/Rinternals.h:47:
In file included from /opt/R/devel/lib/R/include/R_ext/Error.h:30:
In file included from /opt/R/devel/lib/R/include/R_ext/RS.h:30:
/usr/lib/llvm-16/bin/../include/c++/v1/cstring:117:1: error: templates must have C++ linkage
template <class _Tp>
^~~~~~~~~~~~~~~~~~~~
/opt/R/devel/lib/R/include/Rinternals.h:37:1: note: extern "C" language linkage specification begins here
extern "C" {
^
1 error generated.
make[1]: *** [/opt/R/devel/lib/R/etc/Makeconf:202: error.o] Error 1
make[1]: Leaving directory '/tmp/RtmpZZyG7J/R.INSTALLb894784240/fs/src'
ERROR: compilation failed for package ‘fs’

That looks like an incompatibility between R's own headers and clang-16, not something LightGBM needs to fix.

Reproducible example

This is happening in all CI builds.

Example from #6600: (build link)

Environment info

N/A

Additional Comments

{fs} is passing this check currently on CRAN: https://cran.r-project.org/web/checks/check_results_fs.html

CRAN is still running the clang16 check: https://cran.r-project.org/web/checks/check_issue_kinds.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant