devMEremenko / XcodeBenchmark

XcodeBenchmark measures the compilation time of a large codebase on iMac, MacBook, and Mac Pro
MIT License
3.14k stars 356 forks source link

Build Failure with BoringSSL-RPC #514

Closed polanfong closed 3 weeks ago

polanfong commented 1 month ago

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.

ilsinszkibal commented 1 month ago

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:

Screenshot 2024-10-11 at 23 57 27
devMEremenko commented 3 weeks ago

@ilsinszkibal, thank you, I've updated the project

SevkiBekir commented 2 weeks ago

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