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

Add support for clang-tools v16 #145

Closed
mirenradia opened this issue May 10, 2023 · 6 comments · Fixed by #146
Closed

Add support for clang-tools v16 #145

mirenradia opened this issue May 10, 2023 · 6 comments · Fixed by #146
Labels
enhancement New feature or request

Comments

@mirenradia
Copy link
Contributor

I tried using this action from the main branch with version: 16 since clang-tools v0.8.0 added support for clang tools v16 but I got no output (similar to the problem with v15 in #139). Please see this workflow run in mirenradia/cpp-linter-action-test. The output I expect can be seen from the preceding workflow run.

@2bndy5
Copy link
Collaborator

2bndy5 commented May 10, 2023

Are you using ubuntu-latest? If so, there's a known seg fault problem for that platform when using the static binaries downloaded with clang-tools-pip. See compatibility chart in that repo's README.

Alternatively, you can ensure that the dynamically linked binaries are installed before the cpp-linter step.

@mirenradia
Copy link
Contributor Author

mirenradia commented May 10, 2023

Are you using ubuntu-latest? If so, there's a known seg fault problem for that platform when using the static binaries downloaded with clang-tools-pip. See compatibility chart in that repo's README.

I am using ubuntu-22.04 (which I think is the same as ubuntu-latest). I did see that note but I don't get a segfault with v14 or v15 which the table seems to suggest.

Alternatively, you can ensure that the dynamically linked binaries are installed before the cpp-linter step.

Yes, this was the next thing I tried and it works as expected (see this workflow run).

@mirenradia
Copy link
Contributor Author

mirenradia commented May 10, 2023

I think I don't get a segfault with v14 and 15 because clang-tools installs the normal clang-tidy-xx and clang-format-xx packages but these aren't available for v16.

@2bndy5
Copy link
Collaborator

2bndy5 commented May 10, 2023

I think I don't get a segfault with v14 and 15 because clang-tools installs the normal clang-tidy-xx and clang-format-xx packages but these aren't available for v16.

I assume "normal packages" means those acquired via apt-get. Hmm, I see that apt-get update is done beforehand. I'm not sure this is a problem we can solve. Usually, the PPA is updated by LLVM for new releases.

clang tools v16 but I got no output (similar to the problem with v15 in #139).

IIRC, that issue was suffering from a seg fault as well. The typical seg fault message may not be showing up in the log, but I suspect it is still seg faulting for v16.

@mirenradia
Copy link
Contributor Author

I assume "normal packages" means those acquired via apt-get. Hmm, I see that apt-get update is done beforehand. I'm not sure this is a problem we can solve. Usually, the PPA is updated by LLVM for new releases.

The official Ubuntu repositories don't always have the latest LLVM releases so one solution might be to add one of the LLVM PPAs (described here). Of course, this could be done manually as I have done but it would be nice if this was done automatically somewhere in these lines.

@2bndy5
Copy link
Collaborator

2bndy5 commented May 11, 2023

A PR would be welcome. Looking at that commit, the only changes we would require is saving the install script to the $GITHUB_ACTION_PATH (which is different from the runner's workspace). So, something like

wget https://apt.llvm.org/llvm.sh -O $GITHUB_ACTION_PATH/llvm_install.sh
chmod +x $GITHUB_ACTION_PATH/llvm_install.sh
sudo $GITHUB_ACTION_PATH/llvm_install.sh {{ version }}

@shenxianpeng shenxianpeng added the enhancement New feature or request label May 19, 2023
shenxianpeng added a commit that referenced this issue May 19, 2023
* Added clang v16 to README and action description #145

* Added versions back to README and action description #145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants