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: disable Ccache in integration pipeline #1043

Merged
merged 1 commit into from
Feb 24, 2022
Merged

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Feb 23, 2022

Summary

Ccache is interfering with how Xcode finds libclang_rt.ubsan_osx_dynamic.dylib in the integration pipeline.

Changelog

[Internal] [Fixed] - Disable Ccache to fix Xcode not being able to find libclang_rt.ubsan_osx_dynamic.dylib

Test Plan

Integration pipeline should be green.

@tido64 tido64 requested a review from a team as a code owner February 23, 2022 20:12
Copy link

@HeyImChris HeyImChris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, how is it messing with the sanitizers?

@tido64
Copy link
Member Author

tido64 commented Feb 23, 2022

Curious, how is it messing with the sanitizers?

This is just a guess on my part, but it looks like when Xcode looks for the sanitizer libraries, it finds the path of clang, e.g. /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang, and straight up replaces bin/clang with lib/clang/13.0.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib.

When we integrated Ccache, we added a wrapper in react-native-test-app/scripts/clang and told xcodebuild to use it instead. If you look at the build error in #1306, Xcode was looking for /Users/runner/work/1/s/react-native-test-app/lib/clang/13.0.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib. It simply replaced scripts/clang with where it assumes the ubsan dylib is.

@mikehardy
Copy link

This is fascinating! The speedups with ccache are too large for me to ignore personally but I'm happy to know a bit more about the vague-sounding "ccache can cause problems" warnings that I have even re-told to other people, based on seeing how brew treats it.

So the conditions that can cause this failure are that you have static analysis (of some type?) enabled on your workspace, and in that case Xcode makes some assumptions about path for direct path manipulation and boom, failure?

@tido64
Copy link
Member Author

tido64 commented Mar 30, 2022

So the conditions that can cause this failure are that you have static analysis (of some type?) enabled on your workspace, and in that case Xcode makes some assumptions about path for direct path manipulation and boom, failure?

That's one problem that I recently hit. I recall seeing some issues with passing flags that were unknown to Ccache a few years back, but they probably have fixed that by now. I'm sure there are other issues, but I haven't personally seen them.

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

Successfully merging this pull request may close these issues.

None yet

4 participants