Я пытаюсь построить свой код. И когда я пытаюсь сделать: 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)
Пробовал искать эту проблему, но не смог найти ничего убедительного. Может ли кто-нибудь помочь мне с:
- О чем эта ошибка? Поскольку моя программа работает нормально, как в
go run
отлично работает.
- Как мне его отладить? Например, есть ли еще какие-нибудь флаги, которые я могу использовать, которые дадут мне дополнительные логи? Я попытался
go build -v
и вывод был таким же.