go: cmd/go: unexpected files left in tmpdir: [dsymutil-f087bc]
What version of Go are you using (go version
)?
$ go version go version go1.19.7 darwin/arm64 $ /opt/homebrew/opt/llvm/bin/clang --version Homebrew clang version 15.0.7 Target: arm64-apple-darwin22.3.0 Thread model: posix InstalledDir: /opt/homebrew/opt/llvm/bin
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/Users/r/Library/Caches/go-build" GOENV="/Users/r/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/r/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/r/go" GOPRIVATE="" GOPROXY="https://goproxy.cn,direct" GOROOT="/Users/r/workspace/testgo/go1.19.7/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/Users/r/workspace/testgo/go1.19.7/go/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.19.7" GCCGO="gccgo" AR="ar" CC="/opt/homebrew/opt/llvm/bin/clang" CXX="/opt/homebrew/opt/llvm/bin/clang++" CGO_ENABLED="1" GOMOD="/dev/null" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/j_/rq9ph2cd3h50w468sgv34lwh0000gn/T/go-build4228174272=/tmp/go-build -gno-record-gcc-switches -fno-common" GOROOT/bin/go version: go version go1.19.7 darwin/arm64 GOROOT/bin/go tool compile -V: compile version go1.19.7 uname -v: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 ProductName: macOS ProductVersion: 13.2.1 BuildVersion: 22D68 lldb --version: lldb-1400.0.38.17 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
What did you do?
Install clang with brew install llvm
.
Then build go with CC=/opt/homebrew/opt/llvm/bin/clang CXX=/opt/homebrew/opt/llvm/bin/clang++ ./all.bash
under src.
What did you expect to see?
build pass
What did you see instead?
Building Go cmd/dist using /Users/robert/workspace/catdb-go. (go1.19.7.1 darwin/arm64)
Building Go toolchain1 using /Users/robert/workspace/catdb-go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for darwin/arm64.
##### Test execution environment.
# GOARCH: arm64
# CPU:
# GOOS: darwin
# OS Version: Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64
##### Testing packages.
ok archive/tar 4.193s
ok archive/zip 2.958s
ok bufio 0.591s
ok bytes 2.737s
ok compress/bzip2 0.354s
ok compress/flate 2.546s
ok compress/gzip 6.626s
ok compress/lzw 1.091s
ok compress/zlib 3.201s
ok container/heap 1.373s
ok container/list 1.626s
ok container/ring 2.140s
ok context 4.763s
ok crypto 0.842s
ok crypto/aes 1.897s
ok crypto/cipher 3.654s
ok crypto/des 3.887s
ok crypto/dsa 3.414s
ok crypto/ecdsa 4.340s
ok crypto/ed25519 4.006s
ok crypto/elliptic 4.576s
ok crypto/hmac 4.969s
ok crypto/internal/boring 5.081s
ok crypto/internal/boring/bcache 5.341s
ok crypto/internal/edwards25519 7.070s
ok crypto/internal/edwards25519/field 7.190s
ok crypto/internal/nistec 5.448s
ok crypto/internal/nistec/fiat 5.300s [no tests to run]
ok crypto/internal/subtle 5.161s
ok crypto/md5 5.181s
ok crypto/rand 5.244s
ok crypto/rc4 5.307s
ok crypto/rsa 5.070s
ok crypto/sha1 5.183s
ok crypto/sha256 5.144s
ok crypto/sha512 5.247s
ok crypto/subtle 5.009s
ok crypto/tls 5.109s
ok crypto/x509 4.531s
ok database/sql 4.718s
ok database/sql/driver 4.657s
ok debug/buildinfo 4.839s
ok debug/dwarf 4.564s
ok debug/elf 4.350s
ok debug/gosym 4.112s
ok debug/macho 4.517s
ok debug/pe 4.581s
ok debug/plan9obj 4.678s
ok embed 4.627s [no tests to run]
ok embed/internal/embedtest 4.840s
ok encoding/ascii85 5.014s
ok encoding/asn1 4.925s
ok encoding/base32 5.154s
ok encoding/base64 5.058s
ok encoding/binary 4.916s
ok encoding/csv 5.095s
ok encoding/gob 4.955s
ok encoding/hex 5.152s
ok encoding/json 5.001s
ok encoding/pem 4.954s
ok encoding/xml 5.215s
ok errors 5.093s
ok expvar 5.257s
ok flag 5.140s
ok fmt 4.702s
ok go/ast 4.670s
ok go/build 5.516s
ok go/build/constraint 5.079s
ok go/constant 5.276s
ok go/doc 5.088s
ok go/doc/comment 5.506s
ok go/format 5.325s
ok go/importer 5.184s
ok go/internal/gccgoimporter 5.257s
ok go/internal/gcimporter 9.432s
ok go/internal/srcimporter 7.480s
ok go/parser 5.204s
ok go/printer 5.234s
ok go/scanner 4.747s
ok go/token 4.868s
ok go/types 6.433s
ok hash 5.027s
ok hash/adler32 4.891s
ok hash/crc32 5.179s
ok hash/crc64 5.340s
ok hash/fnv 5.575s
ok hash/maphash 5.336s
ok html 5.290s
ok html/template 5.233s
ok image 5.093s
ok image/color 5.249s
ok image/draw 5.383s
ok image/gif 12.434s
ok image/jpeg 6.648s
ok image/png 4.817s
ok index/suffixarray 4.860s
ok internal/abi 3.839s
ok internal/buildcfg 3.834s
ok internal/cpu 3.326s
ok internal/diff 3.624s
ok internal/fmtsort 4.462s
ok internal/fuzz 3.988s
ok internal/godebug 4.219s
ok internal/intern 3.526s
ok internal/itoa 3.764s
ok internal/poll 4.768s
ok internal/profile 4.032s
ok internal/reflectlite 4.278s
ok internal/safefilepath 3.693s
ok internal/singleflight 3.938s
ok internal/trace 4.529s
ok internal/unsafeheader 4.040s
ok internal/xcoff 4.638s
ok io 4.090s
ok io/fs 4.027s
ok io/ioutil 4.328s
ok log 4.567s
ok log/syslog 5.955s
ok math 4.071s
ok math/big 4.177s
ok math/bits 4.190s
ok math/cmplx 3.873s
ok math/rand 4.484s
ok mime 4.069s
ok mime/multipart 5.091s
ok mime/quotedprintable 4.963s
ok net 6.306s
ok net/http 9.438s
ok net/http/cgi 4.585s
ok net/http/cookiejar 4.255s
ok net/http/fcgi 4.305s
ok net/http/httptest 4.422s
ok net/http/httptrace 4.820s
ok net/http/httputil 4.949s
ok net/http/internal 4.616s
ok net/http/internal/ascii 5.040s
ok net/http/pprof 8.722s
ok net/internal/socktest 4.956s
ok net/mail 4.777s
ok net/netip 5.013s
ok net/rpc 4.654s
ok net/rpc/jsonrpc 4.795s
ok net/smtp 4.922s
ok net/textproto 4.972s
ok net/url 4.884s
ok os 8.531s
ok os/exec 9.822s
ok os/exec/internal/fdtest 4.519s
ok os/signal 5.950s
ok os/user 4.312s
ok path 4.684s
ok path/filepath 4.170s
ok plugin 4.298s
ok reflect 4.334s
ok regexp 4.018s
ok regexp/syntax 4.415s
ok runtime 55.950s
ok runtime/cgo 3.884s
ok runtime/debug 3.592s
ok runtime/internal/atomic 3.584s
ok runtime/internal/math 4.103s
ok runtime/internal/sys 4.346s
ok runtime/metrics 4.596s
ok runtime/pprof 17.286s
ok runtime/trace 5.363s
ok sort 3.936s
ok strconv 3.872s
ok strings 3.592s
ok sync 4.254s
ok sync/atomic 4.405s
ok syscall 4.762s
ok testing 4.345s
ok testing/fstest 3.743s
ok testing/iotest 3.759s
ok testing/quick 4.106s
ok text/scanner 4.300s
ok text/tabwriter 4.457s
ok text/template 4.775s
ok text/template/parse 4.513s
ok time 6.690s
ok unicode 3.998s
ok unicode/utf16 4.261s
ok unicode/utf8 4.554s
ok cmd/addr2line 9.236s
ok cmd/api 9.043s
ok cmd/asm/internal/asm 4.435s
ok cmd/asm/internal/lex 4.527s
ok cmd/compile/internal/abt 4.640s
ok cmd/compile/internal/amd64 4.597s
ok cmd/compile/internal/dwarfgen 4.924s
ok cmd/compile/internal/importer 4.062s
ok cmd/compile/internal/ir 4.401s
ok cmd/compile/internal/logopt 4.237s
ok cmd/compile/internal/noder 4.831s
ok cmd/compile/internal/reflectdata 4.601s [no tests to run]
ok cmd/compile/internal/ssa 9.325s
ok cmd/compile/internal/syntax 4.863s
ok cmd/compile/internal/test 21.495s
ok cmd/compile/internal/typecheck 9.284s
ok cmd/compile/internal/types 4.107s
ok cmd/compile/internal/types2 4.377s
ok cmd/cover 20.418s
ok cmd/dist 3.914s
ok cmd/doc 4.002s
ok cmd/fix 4.857s
go test proxy running at GOPROXY=http://127.0.0.1:53820/mod
PASS
2023/03/14 17:57:18 unexpected files left in tmpdir: [dsymutil-579a25]
FAIL cmd/go 55.017s
ok cmd/go/internal/auth 3.753s
ok cmd/go/internal/cache 5.255s
ok cmd/go/internal/fsys 4.843s
ok cmd/go/internal/generate 4.666s
ok cmd/go/internal/get 4.737s
ok cmd/go/internal/imports 4.809s
ok cmd/go/internal/load 4.401s
ok cmd/go/internal/lockedfile 4.661s
ok cmd/go/internal/lockedfile/internal/filelock 4.846s
ok cmd/go/internal/modconv 5.273s
ok cmd/go/internal/modfetch 4.910s
ok cmd/go/internal/modfetch/codehost 4.706s
ok cmd/go/internal/modfetch/zip_sum_test 4.803s
ok cmd/go/internal/modindex 5.085s
ok cmd/go/internal/modload 4.966s
ok cmd/go/internal/mvs 5.460s
ok cmd/go/internal/par 5.225s
ok cmd/go/internal/search 7.524s
ok cmd/go/internal/str 8.214s
ok cmd/go/internal/test 8.955s
ok cmd/go/internal/vcs 9.391s
ok cmd/go/internal/web 9.434s
ok cmd/go/internal/work 9.780s
ok cmd/gofmt 9.542s
ok cmd/internal/archive 22.327s
ok cmd/internal/buildid 10.866s
ok cmd/internal/dwarf 10.819s
ok cmd/internal/edit 10.874s
ok cmd/internal/goobj 10.738s
ok cmd/internal/moddeps 11.653s
ok cmd/internal/notsha256 10.947s
ok cmd/internal/obj 10.902s
ok cmd/internal/obj/arm64 10.283s
ok cmd/internal/obj/ppc64 9.832s
ok cmd/internal/obj/riscv 9.595s
ok cmd/internal/obj/s390x 9.188s
ok cmd/internal/obj/x86 19.340s
ok cmd/internal/objabi 8.707s
ok cmd/internal/pkgpath 8.770s
ok cmd/internal/quoted 9.015s
ok cmd/internal/src 9.091s
ok cmd/internal/sys 8.924s
ok cmd/internal/test2json 9.258s
ok cmd/link 26.602s
ok cmd/link/internal/benchmark 9.016s
ok cmd/link/internal/ld 22.978s
ok cmd/link/internal/loader 8.907s
ok cmd/nm 19.877s
ok cmd/objdump 18.330s
ok cmd/pack 27.134s
ok cmd/pprof 10.160s
ok cmd/trace 9.561s
ok cmd/vet 21.569s
FAIL
go tool dist: Failed: exit status 1
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 24 (11 by maintainers)
Commits related to this issue
- cmd/link: work around dsymutils not cleaning temp file Some versions of dsymutils, notably the one in clang 14.0.3, which is shipped in some versions of Xcode, have a bug that it creates a temporary ... — committed to newacorn/go by cherrymui a year ago
- cmd/link: work around dsymutils not cleaning temp file Some versions of dsymutils, notably the one in clang 14.0.3, which is shipped in some versions of Xcode, have a bug that it creates a temporary ... — committed to daemon-p/go by cherrymui a year ago
Instead of passing the flag you can set
DSYMUTIL_REPRODUCER_PATH
to some other path that is ignored, that should work for new and old versions https://github.com/llvm/llvm-project/blob/1e2f87868f6fb64179b02c1076c6b3cd26576907/llvm/tools/dsymutil/Reproducer.cpp#L17FWIW, I ran into this today while working on issue #59446. I exported
DSYMUTIL_REPRODUCER_PATH=$HOME/tmp
and building Go succeeded. So I’m happy with that as a workaround.DSYMUTIL_REPRODUCER_PATH=/dev/null
also works, and does not depend on the existence of$HOME/tmp
.@578559967 Thanks. So this is a bug in LLVM dsymutil. Maybe you want to report there?
I am having the same problem. I am compiling Go 1.20.2 from source, but also using clang 14.0.3 on macOS Ventura 13.3.
I clone the Go repo, check out the branch, “release-branch-1.20,” and then run this command:
Here’s the output of
go env
:The relevant part of the output is: