Build Failure with BoringSSL-RPC
System Version: 14.4 Xcode 15.4 Hardware Overview Model Name: MacBook Pro Model Identifier: Mac15,7 Total Number of Cores: 12 (6 performance and 6 efficiency) Memory: 36 GB
Build results in a few of these error messages:
error: unsupported option '-G' for target 'arm64-apple-ios14.5' (in target 'BoringSSL-GRPC' from project 'Pods')
Summary of build failures:
The following build commands failed:
ScanDependencies /XcodeBenchmark-master/DerivedData/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/BoringSSL-GRPC.build/Objects-normal/arm64/x_val.o /Users/polanfong/Downloads/XcodeBenchmark-master/Pods/BoringSSL-GRPC/src/crypto/x509/x_val.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'BoringSSL-GRPC' from project 'Pods')
ScanDependencies /XcodeBenchmark-master/DerivedData/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/BoringSSL-GRPC.build/Objects-normal/arm64/x_x509a.o /Users/polanfong/Downloads/XcodeBenchmark-master/Pods/BoringSSL-GRPC/src/crypto/x509/x_x509a.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'BoringSSL-GRPC' from project 'Pods')
ScanDependencies /XcodeBenchmark-master/DerivedData/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/BoringSSL-GRPC.build/Objects-normal/arm64/x_x509.o /Users/polanfong/Downloads/XcodeBenchmark-master/Pods/BoringSSL-GRPC/src/crypto/x509/x_x509.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'BoringSSL-GRPC' from project 'Pods')
CompileC /XcodeBenchmark-master/DerivedData/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/BoringSSL-GRPC.build/Objects-normal/arm64/tls_record.o /Users/polanfong/Downloads/XcodeBenchmark-master/Pods/BoringSSL-GRPC/src/ssl/tls_record.cc normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'BoringSSL-GRPC' from project 'Pods')
CompileC /XcodeBenchmark-master/DerivedData/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/BoringSSL-GRPC.build/Objects-normal/arm64/tls_method.o /Users/polanfong/Downloads/XcodeBenchmark-master/Pods/BoringSSL-GRPC/src/ssl/tls_method.cc normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'BoringSSL-GRPC' from project 'Pods')
I've tried the solution from https://stackoverflow.com/questions/78608693/boringssl-grpc-unsupported-option-g-for-target-arm64-apple-ios15-0 but that didn't resolve the issue.
I've had the same issues with Xcode 16.0 and found the solution here
Change the bottom of the pod file to: Podfile_copy.txt
Run pod install --no-repo-update and run the benchmark script again:
@ilsinszkibal, thank you, I've updated the project
Thank you!
I added BoringSSL-GRPC part into post_install, then build is succeeded in react native
installer.pods_project.targets.each do |t|
if t.name == 'BoringSSL-GRPC'
t.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
end