New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gollvm: syscall.DT_UNKNOWN is no defined, during the build process, for rkt #41404
Comments
https://github.com/golang/sys/blob/master/unix/zerrors_linux.go#L490 - DT_UNKNOWN is expected to have 0x0 value Ivan |
Change https://golang.org/cl/254941 mentions this issue: |
I'll update my patch in 254941 for DT_UNKNOWN. Regarding go:linkname only supported for functions -- this is a known issue, see #30771 for example. The rkt code in question (reaching into the runtime to grab references to unexported variables) is not something that we want to encourage-- a package like this can potentially break on any new Go release as runtime internals change. |
Add a few more explicit references to enumeration constants (RUSAGE_SELF, DT_UNKNOWN) in sysinfo.c to insure that their hosting enums are emitted into DWARF, when using a clang host compiler during the gollvm build. Updates golang/go#41382. Updates golang/go#41404. Change-Id: Id0ed7a82ae5dc98ccffa5269a7147e0171c9b0ea Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/254941 Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Than McIntosh <thanm@google.com>
Add a few more explicit references to enumeration constants (RUSAGE_SELF, DT_UNKNOWN) in sysinfo.c to insure that their hosting enums are emitted into DWARF, when using a clang host compiler during the gollvm build. Updates golang/go#41382. Updates golang/go#41404. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/254941
This problem should now be fixed at head. The issue with go:linkname being applied to an unexported variable in the runtime package is still open, however, that will require a more general solution outside of gollvm in particular. Closing this bug, please reopen if need be. |
Hello again.
I was trying to build an archived project, rkt - so I expected to use stable source code base, for testing purposes.
What version of Go are you using (
go version
)?go version go1.15rc2 gollvm LLVM 12.0.0git linux/amd64
Does this issue reproduce with the latest release?
Probably.
What operating system and processor architecture are you using (
go env
)?go env
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfish81/.cache/go-build" GOENV="/home/oceanfish81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfish81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfish81/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/tools" GCCGO="/usr/local/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build520867872=/tmp/go-build -gno-record-gcc-switches -funwind-tables"What did you do?
I was searching for Go files - and tried to build inside a sub-folder:
@thanm , that's not the only constant for auto-generation (as for today).
@cherrymui , are you familiar with the cause of this bug?
Ivan
The text was updated successfully, but these errors were encountered: