invertase / react-native-firebase

πŸ”₯ A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.54k stars 2.19k forks source link

πŸ”₯ Unable to build in Release. Error in CompileC RNFirebaseFunctions.m ... #1825

Closed agarant closed 5 years ago

agarant commented 5 years ago

Issue

I can build in dev, but I cannot create a release. Below is the compile step that is failing. What is strange is that I'm not using RNFirebaseFunctions.

The following build commands failed:
CompileC /Users/<user-name>/Library/Developer/Xcode/DerivedData/<project-name>-hcxhqlbhbudqgmcfgzxtkqhvdlpb/Build/Intermediates.noindex/ArchiveIntermediates/<project-name>/IntermediateBuildFilesPath/RNFirebase.build/Release-iphoneos/RNFirebase.build/Objects-normal/armv7/RNFirebaseFunctions.o RNFirebase/functions/RNFirebaseFunctions.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

I tried adding RNFirebaseFunctions but got these 2 compilation errors:

CompileC /Users/<user-name>/Library/Developer/Xcode/DerivedData/<project-name>-hcxhqlbhbudqgmcfgzxtkqhvdlpb/Build/Intermediates.noindex/ArchiveIntermediates/<project-name>/IntermediateBuildFilesPath/RNFirebase.build/Release-iphoneos/RNFirebase.build/Objects-normal/armv7/RNFirebaseFunctions.o RNFirebase/functions/RNFirebaseFunctions.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/<user-name>/Library/Developer/Xcode/DerivedData/<project-name>-hcxhqlbhbudqgmcfgzxtkqhvdlpb/Build/Intermediates.noindex/ArchiveIntermediates/<project-name>/IntermediateBuildFilesPath/RNFirebase.build/Release-iphoneos/RNFirebase.build/Objects-normal/armv7/RNFirebaseAdMobRewardedVideo.o RNFirebase/admob/RNFirebaseAdMobRewardedVideo.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

Things that I tried without success:

Other info


Project Files

iOS

ios/Podfile:

platform :ios, '9.0'

target '<project-name>' do
  use_frameworks!

  pod 'FBSDKCoreKit'
  pod 'FBSDKShareKit'
  pod 'FBSDKLoginKit'

  pod 'Firebase/Core', '~> 5.15.0'
  pod 'Firebase/Messaging', '~> 5.15.0'

  target '<project-name>Tests' do
    inherit! :search_paths
    # Pods for testing
  end
end

Environment


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Salakar commented 5 years ago

Make sure you're building using the correct version on fastlane as this error sounds like you're using an older xcode version to build with;

https://docs.fastlane.tools/actions/xcversion/

agarant commented 5 years ago

That was it, thank you! πŸ˜€ Quick question, what in the error message tip you that I was using an older xcode version ?

henrymoulton commented 4 years ago

I've come across this error while using App Center Build, any reason this would happen?

henrymoulton commented 4 years ago
CompileC /Users/vsts/Library/Developer/Xcode/DerivedData/Encounter-egxnnpwevwecdmffslmntmpovzrq/Build/Intermediates.noindex/ArchiveIntermediates/Encounter/IntermediateBuildFilesPath/RNFirebase.build/Release-iphoneos/RNFirebase.build/Objects-normal/armv7/RNFirebaseAdMob.o RNFirebase/admob/RNFirebaseAdMob.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/vsts/agent/2.155.1/work/1/s/Encounter/node_modules/react-native-firebase/ios
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode_10.3.app/Contents/Developer/usr/bin:/Library/Frameworks/Mono.framework/Versions/4/bin:/Users/vsts/.nvm/versions/node/v10.16.3/bin:/usr/local/lib/ruby/gems/2.6.0/bin:/usr/local/opt/ruby/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/vsts/bin:/Users/vsts/.yarn/bin:/usr/local/go/bin:/Users/vsts/Library/Android/sdk/tools:/Users/vsts/Library/Android/sdk/platform-tools:/Users/vsts/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vsts/.azcopy"
    /Applications/Xcode_10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/vsts/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vsts/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditio...

** ARCHIVE FAILED **

The following build commands failed:
    CompileC /Users/vsts/Library/Developer/Xcode/DerivedData/Encounter-egxnnpwevwecdmffslmntmpovzrq/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/RNFirebase.build/Release-iphoneos/RNFirebase.build/Objects-normal/armv7/RNFirebaseAdMobRewardedVideo.o RNFirebase/admob/RNFirebaseAdMobRewardedVideo.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

@Salakar any ideas? It's running through xCode 10.3

mikehardy commented 4 years ago

@henrymoulton you posted incomplete information on a bug closed in January, that's not going to result in a good use of anyone's time. Please file a new bug with template fully filled out. Simply based on your error snippet though, I'd make 100% sure you had a fully up to date Google MobileAds SDK (failing to compile on that object smells like #2363) and you might npm i -g react-native-clean-project && react-native clean-project-auto to wipe out any stale Xcode derived data cache