Skip to content

cmd/compile: panic on linux/mips64le during build with Go 1.6.2 in QEMU #15416

@vanloswang

Description

@vanloswang

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.6.2 linux/mips64le

  2. What operating system and processor architecture are you using (go env)?
    GOARCH="mips64le"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="mips64le"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH=""
    GORACE=""
    GOROOT="/usr/lib/golang"
    GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_mips64le"
    GO15VENDOREXPERIMENT="1"
    CC="gcc"
    GOGCCFLAGS="-fPIC -fmessage-length=0"
    CXX="g++"
    CGO_ENABLED="0"

  3. What did you do?
    Just compile golang on fedora 23 mips64el, which is based on QEMU melta 5KEc.

  4. What did you expect to see?
    Compile success.

  5. What did you see instead?

    rpmbuild --define "golang_arches mips64el" -bb golang-1.6.2.spec

    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.s5c1s4

  6. umask 022

  7. cd /root/rpmbuild/BUILD

  8. cd /root/rpmbuild/BUILD

  9. rm -rf go

  10. /usr/bin/gzip -dc /root/rpmbuild/SOURCES/go1.6.2.tar.gz

  11. /usr/bin/tar -xof -

  12. STATUS=0

  13. '[' 0 -ne 0 ']'

  14. cd go

  15. /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .

  16. exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.LjhtJ8

  17. umask 022

  18. cd /root/rpmbuild/BUILD

  19. cd go

  20. uname -a
    Linux fedora-mips64el 4.4.0-0.rc4.git0.1.mips.fc23.mips64el cmd/cgo: fails with gcc 4.4.1 #1 Fri Dec 18 08:53:44 GMT 2015 mips64 mips64 mips64 GNU/Linux

  21. cat /proc/cpuinfo
    system type : MIPS Malta
    machine : mti,malta
    processor : 0
    cpu model : MIPS 5KE V0.0
    BogoMIPS : 2801.66
    wait instruction : yes
    microsecond timers : yes
    tlb_entries : 32
    extra interrupt vector : yes
    hardware watchpoint : yes, count: 1, address/irw mask: [0x0ff8]
    isa : mips1 mips2 mips3 mips4 mips5 mips32r1 mips32r2 mips64r1 mips64r2
    ASEs implemented :
    shadow register sets : 1
    kscratch registers : 0
    package : 0
    core : 0
    VCED exceptions : not available
    VCEI exceptions : not available

  • cat /proc/meminfo
    MemTotal: 2015436 kB
    MemFree: 380420 kB
    MemAvailable: 1864000 kB
    Buffers: 91896 kB
    Cached: 1305964 kB
    SwapCached: 0 kB
    Active: 682032 kB
    Inactive: 781152 kB
    Active(anon): 65596 kB
    Inactive(anon): 136 kB
    Active(file): 616436 kB
    Inactive(file): 781016 kB
    Unevictable: 0 kB
    Mlocked: 0 kB
    SwapTotal: 0 kB
    SwapFree: 0 kB
    Dirty: 63112 kB
    Writeback: 0 kB
    AnonPages: 65336 kB
    Mapped: 49764 kB
    Shmem: 412 kB
    Slab: 160164 kB
    SReclaimable: 107032 kB
    SUnreclaim: 53132 kB
    KernelStack: 1248 kB
    PageTables: 1284 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 1007716 kB
    Committed_AS: 213152 kB
    VmallocTotal: 1069547512 kB
    VmallocUsed: 0 kB
    VmallocChunk: 0 kB
    AnonHugePages: 18432 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    HugePages_Surp: 0
    Hugepagesize: 2048 kB
  • export GOROOT_BOOTSTRAP=/usr/lib/golang
  • GOROOT_BOOTSTRAP=/usr/lib/golang
  • export GOROOT_FINAL=/usr/lib/golang
  • GOROOT_FINAL=/usr/lib/golang
  • export GOHOSTOS=linux
  • GOHOSTOS=linux
  • export GOHOSTARCH=mips64le
  • GOHOSTARCH=mips64le
  • pushd src
    ~/rpmbuild/BUILD/go/src ~/rpmbuild/BUILD/go
  • export 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -march=mips64r2 -mabi=64'
  • CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -march=mips64r2 -mabi=64'
  • export 'LDFLAGS=-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
  • LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
  • export CC=gcc
  • CC=gcc
  • export CC_FOR_TARGET=gcc
  • CC_FOR_TARGET=gcc
  • export GOOS=linux
  • GOOS=linux
  • export GOARCH=mips64le
  • GOARCH=mips64le
  • export 'GO_LDFLAGS=-linkmode internal'
  • GO_LDFLAGS='-linkmode internal'
  • export CGO_ENABLED=0
  • CGO_ENABLED=0
  • ./make.bash --no-clean
    Building Go bootstrap tool.
    cmd/dist
Building Go toolchain using /usr/lib/golang.

bootstrap/internal/obj
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/mips
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/x86
bootstrap/asm/internal/arch
bootstrap/asm/internal/flags
bootstrap/asm/internal/lex
bootstrap/asm/internal/asm
bootstrap/asm
bootstrap/compile/internal/big
bootstrap/internal/gcprog
bootstrap/compile/internal/gc
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/mips64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/x86
bootstrap/compile
bootstrap/link/internal/ld
bootstrap/link/internal/amd64
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/mips64
bootstrap/link/internal/ppc64
bootstrap/link/internal/x86
bootstrap/link

Building go_bootstrap for host, linux/mips64le.

runtime/internal/sys
runtime/internal/atomic
runtime
encoding
errors
internal/race
internal/syscall/windows/sysdll
math
sort
sync/atomic
unicode
unicode/utf16
unicode/utf8
sync
container/heap
internal/singleflight
io
syscall
hash
hash/adler32
strings
bytes
strconv
bufio
path
regexp/syntax
reflect
encoding/base64
crypto
crypto/sha1
internal/syscall/windows/registry
internal/syscall/windows
time
regexp
os
encoding/binary
path/filepath
fmt
os/signal
/ioutil
os/exec
debug/dwarf
go/token
flag
log
text/template/parse
net/url
compress/flate
encoding/json
go/scanner
go/ast
compress/zlib
text/template
debug/elf
debug/macho
go/parser
go/doc
go/build
cmd/go

Building packages and commands for linux/mips64le.

panic: regexp: Compile(((https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?%#~&/\-+=()]+([:.,][a-zA-Z0-9_?%#~&/\-+=()]+)*)|([\pL_][\pL_0-9]*)): error parsing regexp: invalid escape sequence: \-

goroutine 1 [running]:
panic(0x3434c0, 0xc82000e5a0)
/usr/lib/golang/src/runtime/panic.go:481 +0x4b8
regexp.MustCompile(0x4bb7e0, 0xb9, 0x4655e0)
/usr/lib/golang/src/regexp/regexp.go:232 +0x17c
go/doc.init()
/usr/lib/golang/src/go/doc/comment.go:59 +0x108
go/build.init()
/usr/lib/golang/src/go/build/syslist.go:8 +0xc4
main.init()
/usr/lib/golang/src/cmd/go/zdefaultcc.go:6 +0xdc
error: Bad exit status from /var/tmp/rpm-tmp.LjhtJ8 (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.LjhtJ8 (%build)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions