react-native: Regression -- 0.72 fails to compile on iOS with use_frameworks! :linkage => :static when using pnpm
New Version
0.72.1
Old Version
0.71.11
Build Target(s)
iOS development
Output of react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.4
CPU: (10) arm64 Apple M1 Pro
Memory: 63.72 MB / 16.00 GB
Shell:
version: 0.80.0
path: /Users/imagio/.cargo/bin/nu
Binaries:
Node:
version: 18.16.0
path: ~/Library/Caches/fnm_multishells/62216_1687887822404/bin/node
Yarn:
version: 1.22.19
path: ~/Library/pnpm/yarn
npm:
version: 9.7.2
path: ~/Library/pnpm/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.11.3
path: /Users/imagio/.asdf/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: Flamingo 2022.2.1 Patch 2 Flamingo 2022.2.1 Patch 2
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.4.1
path: /usr/bin/javac
Ruby:
version: 3.1.2
path: /Users/imagio/.asdf/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.1
wanted: 0.72.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Issue and Reproduction Steps
Reproduction: https://github.com/evelant/rn072-pnpm-monorepo-ios-frameworks-static-bug
React-native 0.72 fails to compile for iOS when using use_frameworks! :linkage => :static
The following build commands failed:
CompileC /Users/imagio/Library/Developer/Xcode/DerivedData/testproj-aijjqxpffhriwvdbnbtslrapnlmx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-utils.build/Objects-normal/arm64/RunLoopObserver.o /Users/imagio/dev/test/node_modules/.pnpm/react-native@0.72.1_@babel+core@7.20.2_@babel+preset-env@7.20.2_react@18.2.0/node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-utils' from project 'Pods')
(1 failure)
To reproduce:
pnpm install
cd apps/testproj/ios
USE_FRAMEWORKS=static pod install
cd ..
pnpm react-native run-ios
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 24 (4 by maintainers)
Commits related to this issue
- Fix build failure on iOS with pnpm and use_frameworks! (#38158) Summary: Fix build failure on iOS with pnpm and use_frameworks! due to cocoapods copying symlinked headers to wrong paths When using p... — committed to facebook/react-native by deleted user a year ago
- Fix build failure on iOS with pnpm and use_frameworks! (#38158) Summary: Fix build failure on iOS with pnpm and use_frameworks! due to cocoapods copying symlinked headers to wrong paths When using p... — committed to expo/react-native by deleted user a year ago
I get the error: ‘react/debug/react_native_assert.h’ file not found, React-utils/RunLoopObserver. This is my Podfile:
@evelant how to apply above patch ? when tried with patch-package it says invalid patch file
can you try running
USE_FRAMEWORKS=static NO_FLIPPER=1 pod install
? Flipper is not compatible withuse_frameworks
(and it will never be).