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

folly/folly-config.h file not found #4285

Closed
hellforever opened this issue Jan 31, 2022 · 5 comments
Closed

folly/folly-config.h file not found #4285

hellforever opened this issue Jan 31, 2022 · 5 comments

Comments

@hellforever
Copy link

hellforever commented Jan 31, 2022

How frequently does the bug occur?

All the time

Description

I tried to build the project on Xcode, but every time I got this issue: folly/folly-config.h file not found. I tried to clear Xcode cache and delete pods directories, but it is the same.

Stacktrace & log output

/xxx/ios/Pods/Headers/Public/RCT-Folly/folly/portability/Config.h:20:10: 'folly/folly-config.h' file not found

/xxx/node_modules/realm/react-native/ios/RealmReact/RealmAnalytics.mm:57:9: in file included from /xxx/node_modules/realm/react-native/ios/RealmReact/RealmAnalytics.mm:57:

/xxx/node_modules/realm/react-native/ios/RealmReact/RealmAnalytics.h:57:9: in file included from /xxx/node_modules/realm/react-native/ios/RealmReact/RealmAnalytics.h:57:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:10: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:18:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/assert.h:44:10: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/assert.h:44:

/xxx/ios/Pods/Headers/Public/RCT-Folly/folly/portability/stdlib.h:21:10: in file included from /xxx/ios/Pods/Headers/Public/RCT-Folly/folly/portability/stdlib.h:21:

Can you reproduce the bug?

Yes, always

Reproduction Steps

rm -rf node_modules/
npm install
cd ios and run pod install
click build on Xcode
Podfile:

platform :ios, '11.0'

project 'XX',
'DevDebug' => :debug,
'QADebug' => :debug,
'ProdDebug' => :debug,
'DevRelease' => :release,
'QARelease' => :release,
'ProdRelease' => :release

require_relative "../node_modules/@react-native-community/cli-platform-ios/native_modules"

pre_install do |installer|
$RNMBGL.pre_install(installer)
end

target 'XXX' do
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/React/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-logger', :path => '../node_modules/react-native/ReactCommon/logger'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'react-native-pager-view', :path => '../node_modules/react-native-pager-view'

pod 'RNSVG', :path => '../node_modules/react-native-svg'

pod 'GoogleUtilities', '6.7.2'

pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
permissions_path = '../node_modules/react-native-permissions/ios'

pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"

pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'

pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'

pod 'react-native-geolocation', :path => '../node_modules/@react-native-community/geolocation'

pod 'react-native-slider', :path => '../node_modules/@react-native-community/slider'

pod 'ReactNativeART', :path => '../node_modules/@react-native-community/art'
pod 'react-native-progress-view', :path => '../node_modules/@react-native-community/progress-view'

pod 'RNI18n', :path => '../node_modules/react-native-i18n'
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'

pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox-gl/maps'
$ReactNativeMapboxGLIOSVersion = '6.2.1'

pod 'RCT-Folly', :podspec => '../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec'
pod 'boost', :podspec => '../node_modules/react-native/third-party-podspecs/boost.podspec'
pod 'React-perflogger', :path => '../node_modules/react-native/ReactCommon/reactperflogger'
pod 'React-runtimeexecutor', :path => '../node_modules/react-native/ReactCommon/runtimeexecutor'

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

pod 'SSZipArchive', '2.2.2'
pod 'RNNativeFetchModule', :path => '../node_modules/native-fetch'

pod 'react-native-ble-plx', :path => '../node_modules/react-native-ble-plx'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'RNZipArchive', :path => '../node_modules/react-native-zip-archive'
pod 'react-native-pdf', :path => '../node_modules/react-native-pdf'

pod 'react-native-view-shot', :path => '../node_modules/react-native-view-shot'

pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app'

pod 'RNFBMessaging', :path => '../node_modules/@react-native-firebase/messaging'

pod 'RNFBIid', :path => '../node_modules/@react-native-firebase/iid'

pod 'RNFBPerf', :path => '../node_modules/@react-native-firebase/perf'

pod 'RNFBCrashlytics', :path => '../node_modules/@react-native-firebase/crashlytics'

pod 'RNFBAnalytics', :path => '../node_modules/@react-native-firebase/analytics'
pod 'react-native-config', :path => '../node_modules/react-native-config'

end

post_install do |installer|
installer.pods_project.targets.each do |target|
targets_to_ignore = %w(React yoga)
if targets_to_ignore.include? target.name
target.remove_from_project
end
end
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
$RNMBGL.post_install(installer)
end

Version

10.20.0-beta1

What SDK flavour are you using?

MongoDB Realm (i.e. Sync, auth, functions)

Are you using encryption?

No, not using encryption

Platform OS and version(s)

MacOS iOS

Build environment

Which debugger for React Native: ..
System:
OS: macOS 11.5.2
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 562.37 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node
Yarn: Not Found
npm: 6.14.15 - ~/.nvm/versions/node/v14.18.3/bin/npm
Watchman: 2022.01.17.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /Users/fepc-412/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
API Levels: 29, 30, 31
Build Tools: 28.0.3, 29.0.1, 29.0.2, 30.0.1, 30.0.2, 30.0.3, 31.0.0
System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs ARM 64 v8a, android-31 | Google APIs Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8092744
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_291 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.1 => 0.67.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Cocoapods version

1.10.1

@takameyer
Copy link
Contributor

@hellforever I believe this is due to your Podfile. Currently you do not have to link all your libraries in the Podfile itself, as React Native does this for you. You can remove all lines with :path => '../node_modules I would recommend using the current React Native template as a reference.

I'm also unsure what this section is doing:

post_install do |installer|
installer.pods_project.targets.each do |target|
targets_to_ignore = %w(React yoga)
if targets_to_ignore.include? target.name
target.remove_from_project
end
end
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
$RNMBGL.post_install(installer)
end

If you are trying to fix your project for an M1 Mac, you can use this code block from the aforementioned template:

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end

Let me know if this helps!

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Feb 1, 2022
@JaioSkura
Copy link

Hi! Same problem here. I tried @takameyer solution but didn't work for me.
I am not working with a M1 Mac, any ideas around?

@hellforever
Copy link
Author

@JaioSkura I removed realm dependency from my libraries in Xcode. Then it works. Realm is also working
image

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Feb 9, 2022
@kraenhansen
Copy link
Member

@hellforever great news! I just checked my Xcode project and it doesn't have Realm in the "libraries". Do you remember if you added that manually at some point?

@sync-by-unito sync-by-unito bot removed the Needs-Attention Reporter has responded. Review comment. label Feb 10, 2022
@gfirmacionpear
Copy link

@hellforever what version of realm were you using when you encountered this error?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants