Xcode 7 compile error : “Command failed due to signal: Segmentation fault: 11”

前端 未结 25 2156
耶瑟儿~
耶瑟儿~ 2020-12-01 05:37

Yesterday I installed the official Xcode 7 and when I tried to open one of my Swift projects, appeared an alert saying that the new Xcode version wants to update my swift co

相关标签:
25条回答
  • 2020-12-01 05:59

    Look at the other warning you see around.

    My case pointed me to problem with iOS9 and GoogleAds. See here: https://developers.google.com/admob/ios/ios9

    Short answer was to disable build setting ENABLE_BITCODE.

    My error:

    ld: '/pp/src/shared_js/libs/GoogleMobileAdsSdkiOS-7.3.1/GoogleMobileAds.framework/GoogleMobileAds(GADGestureIdUtil.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
    clang: error: unable to execute command: Segmentation fault: 11
    clang: error: linker command failed due to signal (use -v to see invocation)
    
    0 讨论(0)
  • 2020-12-01 06:00

    This indicates that some Required method/func is missing from your code. In my case I was using ObjectMapper and in my class I was forgot to include required init() method which causes this "Command failed due to signal: Segmentation fault: 11"

    required init?(_ map: Map) {
    
    }
    
    0 讨论(0)
  • 2020-12-01 06:00

    Did you try re-opening the project and/or re-adding your scheme? I did it and the error was gone.

    0 讨论(0)
  • 2020-12-01 06:02

    Restart xcode. Clean build (cmd+k, cmd+shift+k and clean build folder -> option+cmd+shift+k) It should fix the problem.

    0 讨论(0)
  • 2020-12-01 06:06

    For me, this was caused by declaring a struct in a final class' extension:

    final class X {
        ...
    } 
    
    extension X {
        struct Y {
            ...
        }
    }
    
    0 讨论(0)
  • 2020-12-01 06:06

    I received this error when attempting to compile with Xcode 8.2.1. I am using Cocoa Pods and suspected one of the pods was the issue, as some of the pod's files were referenced in the lengthy error output from the compiler. After quitting Xcode and running pod update in my project directory (via Terminal), I was able to compile successfully when I re-opened my project.

    0 讨论(0)
提交回复
热议问题