-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/internal/dwarf: Can't run executables w/ debug info on FreeBSD 9.1 #20850
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
Comments
Per https://github.com/golang/go/wiki/MinimumRequirements#freebsd this should work, but we only test FreeBSD 10.1 and 11.0. Maybe 9.1 support rotted. I forget. |
I tried to change gcc version: But problem still exist. |
I tried to build older version of Go. This is maximum version, that builds: All later Go versions have installation problem. |
Do you have COMPAT_FREEBSD32 set? IIRC, that might be required. |
I have this kernel option:
|
|
Probably #6372. FreeBSD 9.1 doesn't have the fix for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=182161, and the latest go source tree dropped the workaround 555da73 |
I added this line
into the src/runtime/sys_freebsd_amd64.s and tried to compile go again, but problem still exist. |
@mikioh, I really doubt it. That would be a problem at run time. The error he's getting is:
... which sounds like the FreeBSD kernel doesn't even like our produced binaries. |
You're right. This is the reason, while I build Go from the source. |
|
From @rsc on golang-dev:
|
@MichaelMonashev, build.golang.org shows that we're still passing all the tests on FreeBSD 9.3. I guess we require FreeBSD 9.3, but I don't remember why. |
CL https://golang.org/cl/47252 mentions this issue. |
Brad, does Go 1.8.3. work on FreeBSD 9.3 ? |
Yes. |
@MichaelMonashev |
gofmt from https://storage.googleapis.com/golang/go1.8.3.freebsd-amd64.tar.gz works fine:
this is very strange. |
Interesting. Probably there are some flags we need to set for gcc on FreeBSD 9.1? |
Try running the problem go through ktrace and see if that sheds any light ktrace /home/xxx/go/bin/go
kdump |
Sorry, I upgraded OS to FreeBSD 9.3. |
FreeBSD 9.3. Add Linux arm64. (required second line) Clarify glibc requirement now that we have second line in notes. OS X to macOS Updates #20850 Change-Id: I684d464ed32a072081726b7c805a346c22c42f97 Reviewed-on: https://go-review.googlesource.com/47252 Reviewed-by: Ian Lance Taylor <[email protected]>
go1.8.3 works fine on FreeBDS 9.3 |
I found one more FreeBSD 9.1 installation.
|
@cherrymui , you're right. Go build fine with CGO_ENABLED=0 . |
I guess that 1) the output of readelf on the executable image and 2) kernel loader warnings in /var/log/messages can tell us a bit more what's going on. |
readelf output here: https://gist.githubusercontent.com/MichaelMonashev/32e4246462eefece1803be123091697c/raw/55a95b126997471dd5cf8c756a9a5314d4771038/readelf.out |
/var/log/messages and /var/log/all have not related massages |
Thanks for the information. Looks like FreeBSD has changed the format of debug information within executable images in between FreeBSD 9.1 and some point, FreeBSD 9.[23] or 10.0? Searching I guess that there's nothing to do with this issue except writing some caveat to Go 1.9 release notes. |
I've already updated https://tip.golang.org/doc/install in 25de52e so that's probably sufficient. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?master from https://go.googlesource.com/go
+
go version go1.4-bootstrap-20170531 freebsd/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOOS="freebsd"
GOPATH=""
GORACE=""
GOROOT="/usr/home/xxx/go1.4"
GOTOOLDIR="/usr/home/xxx/go1.4/pkg/tool/freebsd_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
What did you do?
Try to install go from source.
What did you expect to see?
Successful installation
What did you see instead?
xxx@xxx/home/xxx/go/src>./all.bash
Building Go bootstrap tool.
cmd/dist
Building Go toolchain using /home/xxx/go1.4.
bootstrap/cmd/internal/dwarf
bootstrap/cmd/internal/objabi
bootstrap/cmd/internal/src
bootstrap/cmd/internal/sys
bootstrap/cmd/asm/internal/flags
bootstrap/cmd/internal/bio
bootstrap/math/bits
bootstrap/cmd/internal/gcprog
bootstrap/cmd/compile/internal/syntax
bootstrap/debug/pe
bootstrap/math/big
bootstrap/cmd/internal/obj
bootstrap/cmd/asm/internal/lex
bootstrap/cmd/link/internal/ld
bootstrap/cmd/internal/obj/arm
bootstrap/cmd/internal/obj/arm64
bootstrap/cmd/internal/obj/mips
bootstrap/cmd/internal/obj/ppc64
bootstrap/cmd/internal/obj/s390x
bootstrap/cmd/internal/obj/x86
bootstrap/cmd/compile/internal/types
bootstrap/cmd/asm/internal/arch
bootstrap/cmd/compile/internal/ssa
bootstrap/cmd/asm/internal/asm
bootstrap/cmd/asm
bootstrap/cmd/link/internal/amd64
bootstrap/cmd/link/internal/arm
bootstrap/cmd/link/internal/arm64
bootstrap/cmd/link/internal/mips
bootstrap/cmd/link/internal/mips64
bootstrap/cmd/link/internal/ppc64
bootstrap/cmd/link/internal/s390x
bootstrap/cmd/link/internal/x86
bootstrap/cmd/link
bootstrap/cmd/compile/internal/gc
bootstrap/cmd/compile/internal/amd64
bootstrap/cmd/compile/internal/arm
bootstrap/cmd/compile/internal/arm64
bootstrap/cmd/compile/internal/mips
bootstrap/cmd/compile/internal/mips64
bootstrap/cmd/compile/internal/ppc64
bootstrap/cmd/compile/internal/s390x
bootstrap/cmd/compile/internal/x86
bootstrap/cmd/compile
Building go_bootstrap for host, freebsd/amd64.
runtime/internal/sys
runtime/internal/atomic
runtime
encoding
errors
internal/cpu
internal/race
internal/syscall/windows/sysdll
math/bits
sync/atomic
unicode
unicode/utf16
unicode/utf8
math
sync
internal/singleflight
io
syscall
cmd/go/internal/web
hash
bytes
strings
hash/adler32
bufio
strconv
path
internal/syscall/windows
internal/syscall/windows/registry
time
reflect
encoding/base64
crypto
crypto/sha1
internal/poll
os
os/signal
sort
encoding/binary
fmt
container/heap
regexp/syntax
path/filepath
io/ioutil
context
flag
go/token
log
cmd/go/internal/str
net/url
text/template/parse
compress/flate
encoding/xml
encoding/json
debug/dwarf
os/exec
go/scanner
regexp
cmd/internal/objabi
go/ast
compress/zlib
text/template
debug/macho
debug/elf
go/parser
go/doc
go/build
cmd/go/internal/cfg
cmd/go/internal/base
cmd/go/internal/buildid
cmd/go/internal/cmdflag
cmd/go/internal/doc
cmd/go/internal/help
cmd/go/internal/load
cmd/go/internal/tool
cmd/go/internal/version
cmd/go/internal/fix
cmd/go/internal/fmtcmd
cmd/go/internal/work
cmd/go/internal/clean
cmd/go/internal/envcmd
cmd/go/internal/generate
cmd/go/internal/get
cmd/go/internal/list
cmd/go/internal/run
cmd/go/internal/test
cmd/go/internal/vet
cmd/go/internal/bug
cmd/go
Building packages and commands for freebsd/amd64.
runtime/internal/sys
runtime/internal/atomic
runtime
errors
internal/cpu
internal/race
unicode
sync/atomic
unicode/utf8
container/list
math/bits
container/ring
crypto/subtle
math
crypto/internal/cipherhw
internal/nettrace
sync
vendor/golang_org/x/crypto/poly1305
vendor/golang_org/x/crypto/curve25519
encoding
unicode/utf16
image/color
internal/syscall/windows
internal/syscall/windows/registry
internal/syscall/windows/sysdll
plugin
runtime/race
vendor/golang_org/x/text/secure
vendor/golang_org/x/text/unicode
cmd/compile/internal/test
cmd/vet/internal/whitelist
image/color/palette
io
syscall
internal/singleflight
bytes
strings
hash
crypto/cipher
runtime/trace
hash/adler32
hash/crc32
crypto/hmac
strconv
math/rand
hash/crc64
hash/fnv
math/cmplx
path
html
bufio
text/tabwriter
vendor/golang_org/x/text/transform
reflect
cmd/internal/src
encoding/base64
crypto/rc4
crypto
crypto/aes
encoding/ascii85
encoding/base32
crypto/sha512
crypto/md5
crypto/sha1
crypto/sha256
image
time
image/internal/imageutil
image/draw
image/jpeg
internal/poll
os
sort
encoding/binary
regexp/syntax
compress/bzip2
encoding/pem
container/heap
fmt
path/filepath
vendor/golang_org/x/net/route
os/signal
runtime/debug
cmd/internal/sys
crypto/des
vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20
io/ioutil
vendor/golang_org/x/crypto/chacha20poly1305
regexp
flag
log
debug/dwarf
compress/flate
debug/gosym
debug/plan9obj
cmd/vendor/golang.org/x/arch/arm/armasm
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm
cmd/vendor/golang.org/x/arch/x86/x86asm
archive/tar
cmd/internal/objabi
cmd/internal/goobj
compress/lzw
compress/zlib
archive/zip
compress/gzip
context
math/big
encoding/hex
go/token
encoding/csv
os/exec
go/scanner
database/sql/driver
encoding/gob
debug/elf
debug/macho
debug/pe
go/ast
database/sql
encoding/json
encoding/xml
vendor/golang_org/x/net/http2/hpack
cmd/internal/objfile
go/parser
crypto/dsa
crypto/elliptic
encoding/asn1
crypto/rand
go/printer
crypto/rsa
vendor/golang_org/x/text/unicode/bidi
cmd/addr2line
vendor/golang_org/x/text/unicode/norm
crypto/ecdsa
crypto/x509/pkix
net/url
mime
mime/quotedprintable
net/http/internal
text/template/parse
vendor/golang_org/x/text/secure/bidirule
go/constant
text/scanner
image/gif
image/png
index/suffixarray
cmd/cgo
go/format
testing
go/types
internal/trace
runtime/pprof
text/template
vendor/golang_org/x/net/idna
net/internal/socktest
runtime/pprof/internal/profile
testing/internal/testdeps
testing/iotest
testing/quick
internal/testenv
cmd/internal/dwarf
cmd/asm/internal/flags
cmd/internal/bio
cmd/asm/internal/lex
cmd/internal/obj
cmd/compile/internal/syntax
cmd/internal/gcprog
cmd/internal/browser
cmd/dist
cmd/fix
go/doc
html/template
cmd/internal/obj/arm
go/build
cmd/internal/obj/arm64
cmd/internal/obj/mips
cmd/internal/obj/ppc64
cmd/internal/obj/s390x
cmd/internal/obj/x86
cmd/compile/internal/types
runtime/cgo
go/internal/gccgoimporter
go/internal/gcimporter
go/internal/srcimporter
cmd/api
cmd/cover
cmd/doc
cmd/go/internal/cfg
cmd/go/internal/str
go/importer
cmd/go/internal/base
cmd/go/internal/buildid
cmd/gofmt
cmd/go/internal/doc
cmd/go/internal/load
cmd/go/internal/help
cmd/go/internal/cmdflag
cmd/go/internal/tool
cmd/go/internal/version
cmd/link/internal/ld
cmd/asm/internal/arch
cmd/asm/internal/asm
cmd/compile/internal/ssa
cmd/go/internal/work
net
os/user
cmd/go/internal/fix
cmd/go/internal/fmtcmd
cmd/nm
cmd/objdump
cmd/asm
cmd/pack
cmd/vendor/github.com/google/pprof/internal/elfexec
cmd/vendor/github.com/google/pprof/profile
cmd/vendor/github.com/ianlancetaylor/demangle
cmd/vendor/github.com/google/pprof/third_party/svg
cmd/vendor/github.com/google/pprof/internal/proftest
cmd/vet/internal/cfg
cmd/vet
cmd/go/internal/envcmd
cmd/go/internal/clean
cmd/go/internal/generate
cmd/go/internal/list
cmd/go/internal/run
cmd/go/internal/test
cmd/go/internal/vet
cmd/vendor/github.com/google/pprof/internal/plugin
cmd/vendor/github.com/google/pprof/internal/measurement
cmd/vendor/github.com/google/pprof/internal/symbolz
cmd/vendor/github.com/google/pprof/internal/graph
cmd/vendor/github.com/google/pprof/internal/binutils
cmd/vendor/github.com/google/pprof/internal/report
vendor/golang_org/x/net/lex/httplex
vendor/golang_org/x/net/proxy
crypto/x509
net/textproto
log/syslog
vendor/golang_org/x/net/nettest
mime/multipart
net/mail
crypto/tls
cmd/link/internal/amd64
cmd/link/internal/arm
cmd/link/internal/arm64
cmd/link/internal/mips
cmd/link/internal/mips64
cmd/link/internal/ppc64
cmd/link/internal/s390x
cmd/link/internal/x86
cmd/link
net/http/httptrace
net/smtp
net/http
net/http/cgi
net/http/cookiejar
expvar
net/http/httptest
net/http/httputil
net/http/pprof
net/rpc
cmd/go/internal/web
cmd/vendor/github.com/google/pprof/internal/symbolizer
cmd/trace
net/rpc/jsonrpc
net/http/fcgi
cmd/go/internal/bug
cmd/go/internal/get
cmd/vendor/github.com/google/pprof/internal/driver
cmd/go
cmd/vendor/github.com/google/pprof/driver
cmd/pprof
cmd/compile/internal/gc
cmd/compile/internal/arm
cmd/compile/internal/mips
cmd/compile/internal/arm64
cmd/compile/internal/amd64
cmd/compile/internal/mips64
cmd/compile/internal/ppc64
cmd/compile/internal/s390x
cmd/compile/internal/x86
cmd/compile
run.bash: line 8: /home/xxx/go/bin/go: cannot execute binary file: Exec format error
run.bash: line 47: /home/xxx/go/bin/go: cannot execute binary file: Exec format error
run.bash: line 47: /home/xxx/go/bin/go: No error: 0
xxx@xxx/home/xxx/go/src>
The text was updated successfully, but these errors were encountered: