Closed feiquan123 closed 3 years ago
need run go get -u github.com/shirou/gopsutil
to update github.com/shirou/gopsutil
version
go: downloading github.com/shirou/gopsutil v3.21.6+incompatible
go get: upgraded github.com/shirou/gopsutil v3.21.2+incompatible => v3.21.6+incompatible
error again when run make
CGO_ENABLED=1 GO111MODULE=on go build -tags codes -ldflags '-L/opt/homebrew/opt/llvm/lib -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=v5.2.0-alpha-391-g7726e5519-dirty" -X "github.com/pingcap/tidb/util/versioninfo.TiDBBuildTS=2021-07-26 09:38:12" -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitHash=7726e55191a84cfa1c0b0440ec994065659f8ae2" -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitBranch=master" -X "github.com/pingcap/tidb/util/versioninfo.TiDBEdition=Community" ' -o bin/tidb-server tidb-server/main.go
# command-line-arguments
flag provided but not defined: -L/opt/homebrew/opt/llvm/lib
usage: link [options] main.o
-B note
add an ELF NT_GNU_BUILD_ID note when using ELF
-E entry
set entry symbol name
-H type
set header type
-I linker
use linker as ELF dynamic linker
...
i ran brew install llvm
==> Summary
🍺 /opt/homebrew/Cellar/llvm/12.0.1: 9,791 files, 1.5GB
my $LDFLAGS
same with -ldflags '-L/opt/homebrew/opt/llvm/lib ...'
echo $LDFLAGS
-L/opt/homebrew/opt/llvm/lib
success install 🤓
set LDFLAGS
is empyt
run LDFLAGS= make
Yep, gopsutil
does not compile with the llvm installed by homebrew.
Close it as the problem is resolved.
Bug Report
can't build master branch on MAC M1
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
follow Quick start:
2. What did you expect to see? (Required)
success build master branch on Mac M1
3. What did you see instead (Required)
run
make
error:4. What is your TiDB version? (Required)
master
go env: