-
Notifications
You must be signed in to change notification settings - Fork 2
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
Test iostream include #13
Conversation
I have already encountered the issue:
It means clang-tidy is not able to find the libstdc++ on the host. Installing a C++ compiler may fix the issue. |
Right, but isn't that what should be solved by #11, which is included in this PR? |
#11 provides builtin includes, which is different than the stdlibc++. The link suggests using |
I confirm it is the absence of XCode on the MacOS builder (or the tunability to find it) that makes Working version on Apple M1 with XCode installed:
Issue without XCode:
I tried to include the libcxx shipped with llvm in the clang_tidy package diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0fa8ac..a6b4e78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,3 +47,9 @@ install(
${CMAKE_BINARY_DIR}/llvm/lib/clang/${CLANG_TIDY_VERSION}/include
DESTINATION clang_tidy/data/lib/clang/${CLANG_TIDY_VERSION}
)
+
+install(
+ DIRECTORY
+ ${CMAKE_BINARY_DIR}/llvm-project/libcxx/include/
+ DESTINATION clang_tidy/data/include/c++/v1
+) but then I have the following issue with clang-tidy:
WDYT @renefritze ? |
My use case for the tidy wheel actually is a (linux) container with no compiler setup, so generally I'd say that no compiler should be necessary. But practically I'd be happy to just install xcode in the tests for now and maybe add a note to the readme. |
I've had a look at the list of installed versions for the macos runners. So while there's a default, it does not seem to get picked up, right? OTOH there's also brew-installed gccs and llvms in the machine. |
Thank you for merging the debug code. We can now clearly see that XCode is not found. |
I'm trying a github action to setup xcode here |
pipeline running here 🤞 |
The build is still failing but we can see that clang-tidy is trying to exploit
But for some reason, the path is invalid. Maybe it is worth trying without the step |
Yeah, no worries. I'm happy to try that, since I also have no insight. Not even a MacOS user. |
1fd7d8f
to
d894192
Compare
I dropped 38c6ee3 from the branch and new pipeline is running |
The new pipeline failed again. If you don't have a new idea/insight into what's wrong @tristan0x, I propose we should just ignore the failure for now:
|
I have no idea at the moment. I am good with your plan, I am not even sure (3) is necessary as it works on my 2 macOS environments but no strong opinion about that. |
This change fixes the issue referenced in Clang FAQ https://clang.llvm.org/docs/FAQ.html#i-get-errors-about-some-headers-being-missing-stddef-h-stdarg-h To reproduce the issue with 14.0.6: ``` $ docker run --rm -ti python bash $ pip install clang-tidy==14.0.6 $ echo "include <iostream>" > foo.cpp $ clang-tidy foo.cpp Error while trying to load a compilation database: Could not auto-detect compilation database for file "foo.cpp" No compilation database found in / or any parent directory fixed-compilation-database: Error while opening fixed database: No such file or directory json-compilation-database: Error while opening JSON database: No such file or directory Running without flags. 1 error generated. Error while processing /foo.cpp. /usr/include/wchar.h:35:10: error: 'stddef.h' file not found [clang-diagnostic-error] ^~~~~~~~~~ Found compiler error(s). ```
* ensure that clang-tidy binary file exists and is executable * run clang-tidy on a very simple C++ file Fixes #1
d894192
to
6290af4
Compare
The other platforms' tests worked out. Via the actions summary I learned that the macOS image we're using is being discontinued. So I'm going to try the tests on the newest macOS 12 image, without the xfailing before merging this PR. |
It is worth trying the new setup indeed. Yes I am using Monterey with both
Intel and Silicon chips
…On Sat, Jul 23, 2022, 10:09 AM René Fritze ***@***.***> wrote:
The other platforms' tests worked out. Via the actions summary I learned
that the macOS image we're using is being discontinued. So I'm going to try
the tests on the newest macOS 12 image, without the xfailing before merging
this PR.
@tristan0x <https://github.com/tristan0x> are your working mac
environments also macOS 12 already?
—
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACZ36ZFQKXAG3TCLC2M6KTVVOSDLANCNFSM53VNZQMA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Pipeline with all-newest base images and xfailing dropped is now running |
That failed early since I also add the qemu build in the branch, new pipeline |
Good news, updating the MacOS image did indeed get rid of the environment problem. |
I wanted to release tidy 13 for you @tristan0x since this whole setup will take longer still to properly fix and I do not have many cycles to spare atm. However the upload job did not upload wheels and also did not fail 😞 |
Did the upload manually now |
Thank you very much @renefritze |
1b2c09a
to
82fe96a
Compare
f010b11
to
cabd864
Compare
e510ae4
to
2ba8679
Compare
c6906a4
to
2a6db68
Compare
f433775
to
1523ba9
Compare
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.7.0 to 2.8.1. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.7.0...v2.8.1) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
18cb31b
to
66c06ab
Compare
This is a merge of @tristan0x's #12 and #11 so we can run tests on the result.
The test from the sdist tarball build went through. The mac one didn't