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

Search Path for Included Headers was not Reworked to Address Changes in Xcode 14.3 #6866

Open
thekief opened this issue May 16, 2023 · 0 comments

Comments

@thekief
Copy link

thekief commented May 16, 2023

Starting with Xcode 14.3 the SDKs shipped out via xcode had some changes in regard to the availablity of headers files in certain paths. One noteable change has been that cxxabi.h is not available anymore under

<xcode root>/usr/include/cxxabi.h

but only under

<xcode root>/usr/include/c++/v1/cxxabi.h

This breaks the clang compiler search for included headers, as has been described previously in apple/swift#64936. There are differences between the headers searched in the clang compiler shipped with Xcode

clang -cc1 version 14.0.3 (clang-1403.0.22.14.1) default target arm64-apple-darwin22.1.0
<ignored headers to be being duplicated>
#include "..." search starts here:
#include <...> search starts here:
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/Sentry/Public
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/Sentry/include
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Installations
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Recording
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Recording/Monitors
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Recording/Tools
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Reporting/Filters
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Reporting/Filters/Tools
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Reporting/Tools
 <redacted>/Build/Intermediates.noindex/ArchiveIntermediates/Project/BuildProductsPath/Debug-iphoneos (framework directory)
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks (framework directory)
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/Developer/Library/Frameworks (framework directory)
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include/c++/v1
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3/include
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks (framework directory)
End of search list.

and one built using the build-toolchain script found in the https://github.com/apple/swift/ repository

clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target arm64-apple-darwin22.1.0
<ignored headers to be being duplicated>
#include "..." search starts here:
#include <...> search starts here:
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/Sentry/Public
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/Sentry/include
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Installations
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Recording
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Recording/Monitors
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Recording/Tools
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Reporting/Filters
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Reporting/Filters/Tools
 <redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Reporting/Tools
 <redacted>/Build/Intermediates.noindex/ArchiveIntermediates/Project/BuildProductsPath/Debug-iphoneos (framework directory)
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks (framework directory)
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/Developer/Library/Frameworks (framework directory)
 /Library/Developer/Toolchains/swift-LOCAL-2023-05-14-a.xctoolchain/usr/bin/../include/c++/v1
 /Users/obfuscator-builder/swift-compiler/swift-nightly-install/Library/Developer/Toolchains/swift-LOCAL-2023-05-14-a.xctoolchain/usr/lib/clang/13.0.0/include
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks (framework directory)
End of search list.
<redacted>/SourcePackages/checkouts/sentry-cocoa/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_CPPException.cpp:35:10: fatal error: 'cxxabi.h' file not found
#include <cxxabi.h>
         ^~~~~~~~~~
1 error generated.

Manual adding the missing include paths leads to an error due to a duplicated definition.

Note: The version mismatch of the compilers is due to an issue described in apple/swift#63163

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

No branches or pull requests

1 participant