Skip to content

XCode/CocoaPods fails to find yoga/config/Config.h on RN 0.73.2 #69

@msolomon

Description

@msolomon

After upgrading to RN 0.73 (from an ancient version), my builds consistently fail when trying to compile dependencies for this project. Specifically, when XCode tries to compile the pods for nodejs-mobile-react-native, it fails with:

In file included from /Users/mike/MyProject/node_modules/nodejs-mobile-react-native/ios/rn-bridge.cpp:2: /Users/mike/MyProject/node_modules/react-native/ReactCommon/yoga/yoga/node/Node.h:16:10 'yoga/config/Config.h' file not found

I suspect there is something wrong with how nodejs-mobile-react-native's cocoapod is specifying its dependencies. Does this ring true, or do you have any suggestions on how to follow up?

I'm running Node v21.6.0, I followed install instructions recently, pods are up to date, etc..
I think this is the same problem causing #68 and #62, but I wanted to focus in on the yoga dependency issue.

In more detail, when I run xcodebuild -workspace MyProject.xcworkspace -configuration Debug -scheme MyProject (or equivalent in XCode or through yarn run ios), I get:

[...]

CompileC /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/Objects-normal/arm64/rn-bridge.o /Users/mike/MyProject/node_modules/nodejs-mobile-react-native/ios/rn-bridge.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'nodejs-mobile-react-native' from project 'Pods')
    cd /Users/mike/MyProject/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -ivfsstatcache /Users/mike/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos17.2-21C52-884b7f60ac6761a492c03f282b824eb9.sdkstatcache -target arm64-apple-ios13.4 -fmessage-length\=190 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -std\=gnu++17 -stdlib\=libc++ -fmodules -fmodules-cache-path\=/Users/mike/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/mike/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Index.noindex/DataStore -iquote /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/nodejs-mobile-react-native-generated-files.hmap -I/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/nodejs-mobile-react-native-own-target-headers.hmap -I/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/nodejs-mobile-react-native-all-non-framework-target-headers.hmap -ivfsoverlay /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/all-product-headers.yaml -iquote /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/nodejs-mobile-react-native-project-headers.hmap -I/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Products/Debug-iphoneos/nodejs-mobile-react-native/include -I/Users/mike/MyProject/ios/Pods/Headers/Private -I/Users/mike/MyProject/ios/Pods/Headers/Private/nodejs-mobile-react-native -I/Users/mike/MyProject/ios/Pods/Headers/Public -I/Users/mike/MyProject/ios/Pods/Headers/Public/DoubleConversion -I/Users/mike/MyProject/ios/Pods/Headers/Public/RCT-Folly -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-Core -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-callinvoker -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-cxxreact -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-debug -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-hermes -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-jsi -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-jsinspector -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-logger -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-perflogger -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-rendererdebug -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-runtimeexecutor -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-runtimescheduler -I/Users/mike/MyProject/ios/Pods/Headers/Public/React-utils -I/Users/mike/MyProject/ios/Pods/Headers/Public/SocketRocket -I/Users/mike/MyProject/ios/Pods/Headers/Public/Yoga -I/Users/mike/MyProject/ios/Pods/Headers/Public/fmt -I/Users/mike/MyProject/ios/Pods/Headers/Public/glog -I/Users/mike/MyProject/ios/Pods/Headers/Public/hermes-engine -I/Users/mike/MyProject/ios/Pods/Headers/Public/libevent -I/Users/mike/MyProject/ios/Pods/Headers/Public/nodejs-mobile-react-native -I/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/DerivedSources-normal/arm64 -I/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/DerivedSources/arm64 -I/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/DerivedSources -F/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Products/Debug-iphoneos/nodejs-mobile-react-native -F/Users/mike/MyProject/node_modules/nodejs-mobile-react-native/ios -F/Users/mike/MyProject/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal -F/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/hermes-engine/Pre-built -F/Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/nodejs-mobile-react-native -fmodule-map-file\=/Users/mike/MyProject/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/mike/MyProject/ios/Pods/Headers/Public/folly/RCT-Folly.modulemap -fmodule-map-file\=/Users/mike/MyProject/ios/Pods/Headers/Public/jsi/React-jsi.modulemap -fmodule-map-file\=/Users/mike/MyProject/ios/Pods/Headers/Public/react_debug/React-debug.modulemap -fmodule-map-file\=/Users/mike/MyProject/ios/Pods/Headers/Public/react_renderer_debug/React-rendererdebug.modulemap -fmodule-map-file\=/Users/mike/MyProject/ios/Pods/Headers/Public/react_utils/React-utils.modulemap -fmodule-map-file\=/Users/mike/MyProject/ios/Pods/Headers/Public/yoga/Yoga.modulemap -I/Users/mike/MyProject/ios/Pods/../../node_modules/nodejs-mobile-react-native/ios/libnode/include/node/ -include /Users/mike/MyProject/ios/Pods/Target\ Support\ Files/nodejs-mobile-react-native/nodejs-mobile-react-native-prefix.pch -MMD -MT dependencies -MF /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/Objects-normal/arm64/rn-bridge.d --serialize-diagnostics /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/Objects-normal/arm64/rn-bridge.dia -c /Users/mike/MyProject/node_modules/nodejs-mobile-react-native/ios/rn-bridge.cpp -o /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/Objects-normal/arm64/rn-bridge.o -index-unit-output-path /Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/Objects-normal/arm64/rn-bridge.o
In file included from /Users/mike/MyProject/node_modules/nodejs-mobile-react-native/ios/rn-bridge.cpp:2:
/Users/mike/MyProject/node_modules/react-native/ReactCommon/yoga/yoga/node/Node.h:16:10: fatal error: 'yoga/config/Config.h' file not found
#include <yoga/config/Config.h>
         ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.

[...]

** BUILD FAILED **

The following build commands failed:
    CompileC /Users/mike/Library/Developer/Xcode/DerivedData/MyProject-btskxwsuhzvbxabantuodyccbyys/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nodejs-mobile-react-native.build/Objects-normal/arm64/rn-bridge.o /Users/mike/MyProject/node_modules/nodejs-mobile-react-native/ios/rn-bridge.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'nodejs-mobile-react-native' from project 'Pods')
(1 failure)

Also, thanks for maintaining this library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions