question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails due to header files missing when using -fcxx-modules flag (AppDelegate.mm)

See original GitHub issue

Description

I can’t build the iOS project, always get the error <projectpath>/ios/Pods/Headers/Public/Yoga/yoga/YGNode.h:14:10: ‘BitUtils.h’ file not found. I tried cleaning up everything, reinstalling pods with repo update etc. etc., didn’t work…

Version

0.68.1

Output of npx react-native info

info Fetching system and libraries information… System: OS: macOS 12.3.1 CPU: (8) arm64 Apple M1 Memory: 146.02 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.0 - ~/Library/Caches/fnm_multishells/10309_1650316313370/bin/node Yarn: 1.22.15 - ~/Library/Caches/fnm_multishells/10309_1650316313370/bin/yarn npm: 8.7.0 - ~/Library/Caches/fnm_multishells/10309_1650316313370/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild Languages: Java: 11.0.14.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

I was currently upgrading from 0.66.3 to 0.68.1 and did all the steps in the upgrade helper to do so. Afterwards the build is not working.

Snack, code example, screenshot, or link to a repository

image

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:29 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
stage88commented, May 28, 2022

I managed to temporarily fix this by copying the files (which are symbolic links anyway) from ios/Pods/Headers/Private/Yoga/yoga to ios/Pods/Headers/Public/Yoga/yoga, started with BitUtils.h then ended up dragging a few more until it built successfully.

For me this started happening (maybe, still have to confirm but 99% sure) after I installed expo.

3reactions
pedpesscommented, Aug 11, 2022

@cortinico @pedpess In the migration steps here, there is an info box saying exactly that! 😄

Aha! It’s indeed there @cipolleschi 😄 tks. This page should be marketed more because I was not even aware it existed. I guess most of us are using the RNUpgradeHelper and reading what are the warnings there that we should be aware of before migrating to newer versions

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where does GCC look to find its header files?
In practical use, though, #include is used to copy in header files that describe other modules which will be linked and referred to...
Read more >
XCode can't find header files for archive build - Apple Developer
My setup is a main project with a CordovaLib sub project (I'm using Worklight/MobileFirst architecture). My research seems to point to the provisioning ......
Read more >
Xcode can't find header file - Stack Overflow
Make sure you all Public Header appears in Public Section else drag and drop .h file to public enter image description here.
Read more >
[Solved]-Using @import from clang? - appsloveworld
Your input file is Objective-C++ (from the .mm extension) but modules aren't yet ready for C++. There's a seperate flag, -fcxx-modules, but even...
Read more >
CLion fails to find some of my headers. Where does it search ...
CLion searches through the same places CMake does. Set the include_directories variable in CMake to provide the headers path to the IDE....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found