Получение clang: error: команда компоновщика не выполнена с кодом выхода 1 - PullRequest
1 голос
/ 08 марта 2019

Я пытаюсь построить свой код. И когда я пытаюсь сделать: go build я получаю ошибку ниже:

/usr/local/opt/go/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//IOKit.framework/Versions/A/IOKit.tbd and library file /System/Library/Frameworks//IOKit.framework/Versions/A/IOKit are out of sync. Falling back to library file for linking.
duplicate symbol _FetchPEMRootsCTX509_MountainLion in:
    /var/folders/v8/94mqr56n2yqd9pcj8rd21cyr0000gp/T/go-link-418396971/000033.o
    /var/folders/v8/94mqr56n2yqd9pcj8rd21cyr0000gp/T/go-link-418396971/000036.o
duplicate symbol _FetchPEMRootsCTX509 in:
    /var/folders/v8/94mqr56n2yqd9pcj8rd21cyr0000gp/T/go-link-418396971/000033.o
    /var/folders/v8/94mqr56n2yqd9pcj8rd21cyr0000gp/T/go-link-418396971/000036.o
duplicate symbol _useOldCodeCTX509 in:
    /var/folders/v8/94mqr56n2yqd9pcj8rd21cyr0000gp/T/go-link-418396971/000033.o
    /var/folders/v8/94mqr56n2yqd9pcj8rd21cyr0000gp/T/go-link-418396971/000036.o
ld: 3 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Пробовал искать эту проблему, но не смог найти ничего убедительного. Может ли кто-нибудь помочь мне с:

  1. О чем эта ошибка? Поскольку моя программа работает нормально, как в go run отлично работает.
  2. Как мне его отладить? Например, есть ли еще какие-нибудь флаги, которые я могу использовать, которые дадут мне дополнительные логи? Я попытался go build -v и вывод был таким же.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...