gomini / go-mips32 Goto Github PK
View Code? Open in Web Editor NEWGolang1.4.2 based gc compiler ported to MIPS32/LE. Hello OpenWRT~
License: BSD 3-Clause "New" or "Revised" License
Golang1.4.2 based gc compiler ported to MIPS32/LE. Hello OpenWRT~
License: BSD 3-Clause "New" or "Revised" License
o5 is uninitialized in file liblink/asmv.c: LINE: 935
##CPU Info
system type : MT7621
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
tlb_entries : 32
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp mt
##Error
# Building C bootstrap tool.
cmd/dist
# Building compilers and Go bootstrap tool for host, linux/mips32le.
lib9
/pkg/go-mips32/src/lib9/dirfwstat.c: In function 'dirfwstat':
/pkg/go-mips32/src/lib9/dirfwstat.c:79:3: error: implicit declaration of function 'futimes' [-Werror=implicit-function-declaration]
if(futimes(fd, tv) < 0)
^
cc1: all warnings being treated as errors
go tool dist: FAILED: gcc -Wall -Wstrict-prototypes -Wextra -Wunused -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Wno-missing-field-initializers -Werror -fno-common -ggdb -pipe -Wuninitialized -O2 -fmessage-length=0 -c -I /pkg/go-mips32/include -DPLAN9PORT -I /pkg/go-mips32/src/lib9 -o $WORK/dirfwstat.o /pkg/go-mips32/src/lib9/dirfwstat.c
root@ubuntu:# cd go-mips32/go-mips32# cd src/
root@ubuntu:
root@ubuntu:/go-mips32/src# export GOOS=linux/go-mips32/src# export GOARCH=mips32le
root@ubuntu:
root@ubuntu:~/go-mips32/src# ./make.bash
cmd/dist
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/8l
cmd/vl
cmd/8a
cmd/va
cmd/8c
cmd/vc
cmd/8g
cmd/vg
runtime
errors
sync/atomic
......................
.......................
net/http/cookiejar
net/http/fcgi
net/http/httptest
net/http/httputil
net/http/pprof
net/rpc
net/rpc/jsonrpc
runtime
*** stack smashing detected ***: /root/go-mips32/pkg/tool/linux_386/vg terminated
go build runtime: /root/go-mips32/pkg/tool/linux_386/vg: signal: aborted (core dumped)
OS is Ubuntu 14.10 (GNU/Linux 3.16.0-23-generic i686),
Do you know how to solve it? Thank you!
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x1f8918]
goroutine 34 [running]:
sync/atomic.AddUint64(0x1085c534, 0x30, 0x0, 0x40, 0x30)
/go-mips32/src/sync/atomic/asm_mips32x.s:140 +0x10
github.com/gomqtt/transport.(_NetConn).Receive(0x1085c500, 0x0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/gomqtt/transport/net_conn.go:256 +0xe6c
github.com/gomqtt/broker.(_Client).processor(0x1080cd20, 0x0, 0x0)
/opt/slu/src/github.com/gomqtt/broker/client.go:127 +0xc0
github.com/gomqtt/broker._Client.(github.com/gomqtt/broker.processor)·fm(0x0, 0x0)
/opt/slu/src/github.com/gomqtt/broker/client.go:66 +0x60
gopkg.in/tomb%2ev2.(_Tomb).run(0x1080cd4c, 0x1080ae60)
/opt/slu/src/gopkg.in/tomb.v2/tomb.go:153 +0x3c
created by gopkg.in/tomb%2ev2.(*Tomb).Go
/opt/slu/src/gopkg.in/tomb.v2/tomb.go:149 +0x1a0
goroutine 1 [chan receive]:
main.main()
/opt/slu/main.go:169 +0x1e70
goroutine 5 [syscall]:
os/signal.loop()
/go-mips32/src/os/signal/signal_unix.go:21 +0x30
created by os/signal.init·1
/go-mips32/src/os/signal/signal_unix.go:27 +0x58
goroutine 6 [IO wait]:
net.(_pollDesc).Wait(0x108715f8, 0x72, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(_pollDesc).WaitRead(0x108715f8, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(_netFD).accept(0x108715c0, 0x0, 0x771d0cc8, 0x1087e19c)
/go-mips32/src/net/fd_unix.go:419 +0x3dc
net.(_TCPListener).AcceptTCP(0x1080a6f8, 0x2894b4, 0x0, 0x0)
/go-mips32/src/net/tcpsock_posix.go:234 +0x58
net.(_TCPListener).Accept(0x1080a6f8, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/net/tcpsock_posix.go:244 +0x48
github.com/bsm/redeo.(_Server).Serve(0x10868da0, 0x771d1010, 0x1080a6f8, 0x0, 0x0)
/opt/slu/src/github.com/bsm/redeo/server.go:147 +0xb0
Coolpy/Redico.func·001()
/opt/slu/src/Coolpy/Redico/Redico.go:78 +0x6c
created by Coolpy/Redico.(*Redico).Start
/opt/slu/src/Coolpy/Redico/Redico.go:80 +0x3e8
goroutine 7 [IO wait]:
net.(_pollDesc).Wait(0x10871bf8, 0x72, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(_pollDesc).WaitRead(0x10871bf8, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(_netFD).Read(0x10871bc0, 0x10845000, 0x1000, 0x1000, 0x0, 0x771d0cc8, 0x1087ea54)
/go-mips32/src/net/fd_unix.go:242 +0x3e0
net.(_conn).Read(0x1080a7c8, 0x10845000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/go-mips32/src/net/net.go:121 +0xf0
bufio.(_Reader).fill(0x108306f0)
/go-mips32/src/bufio/bufio.go:97 +0x1fc
bufio.(_Reader).ReadSlice(0x108306f0, 0x10834c0a, 0x0, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/bufio/bufio.go:295 +0x2b0
bufio.(_Reader).ReadBytes(0x108306f0, 0x1083060a, 0x0, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/bufio/bufio.go:374 +0x78
bufio.(_Reader).ReadString(0x108306f0, 0xa, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/bufio/bufio.go:414 +0x50
github.com/bsm/redeo.ParseRequest(0x108306f0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/bsm/redeo/request.go:36 +0x60
github.com/bsm/redeo.(_Server).serveClient(0x10868da0, 0x10810550)
/opt/slu/src/github.com/bsm/redeo/server.go:180 +0x304
created by github.com/bsm/redeo.(_Server).Serve
/opt/slu/src/github.com/bsm/redeo/server.go:151 +0x154
goroutine 8 [select]:
github.com/syndtr/goleveldb/leveldb/util.(*BufferPool).drain(0x10892160)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go:206 +0x304
created by github.com/syndtr/goleveldb/leveldb/util.NewBufferPool
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go:237 +0x3cc
goroutine 10 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).compactionError(0x1085c200)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go:90 +0x578
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:141 +0x848
goroutine 11 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain(0x1085c200)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_state.go:97 +0x178
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:142 +0x874
goroutine 12 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).tCompaction(0x1085c200)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go:804 +0x914
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:148 +0xac8
goroutine 13 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction(0x1085c200)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go:751 +0x2f4
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:149 +0xaf4
goroutine 14 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).jWriter(0x1085c200)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_write.go:37 +0x1e0
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:150 +0xb20
goroutine 15 [IO wait]:
net.(_pollDesc).Wait(0x10884a78, 0x72, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(_pollDesc).WaitRead(0x10884a78, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(_netFD).Read(0x10884a40, 0x108ae000, 0x1000, 0x1000, 0x0, 0x771d0cc8, 0x1087e8e4)
/go-mips32/src/net/fd_unix.go:242 +0x3e0
net.(_conn).Read(0x1080a408, 0x108ae000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/go-mips32/src/net/net.go:121 +0xf0
bufio.(_Reader).fill(0x108302a0)
/go-mips32/src/bufio/bufio.go:97 +0x1fc
bufio.(_Reader).ReadSlice(0x108302a0, 0x1080c50a, 0x0, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/bufio/bufio.go:295 +0x2b0
bufio.(_Reader).ReadBytes(0x108302a0, 0x1083060a, 0x0, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/bufio/bufio.go:374 +0x78
bufio.(_Reader).ReadString(0x108302a0, 0xa, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/bufio/bufio.go:414 +0x50
github.com/bsm/redeo.ParseRequest(0x108302a0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/bsm/redeo/request.go:36 +0x60
github.com/bsm/redeo.(_Server).serveClient(0x10868da0, 0x10810140)
/opt/slu/src/github.com/bsm/redeo/server.go:180 +0x304
created by github.com/bsm/redeo.(_Server).Serve
/opt/slu/src/github.com/bsm/redeo/server.go:151 +0x154
goroutine 16 [select]:
github.com/syndtr/goleveldb/leveldb/util.(*BufferPool).drain(0x10892370)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go:206 +0x304
created by github.com/syndtr/goleveldb/leveldb/util.NewBufferPool
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go:237 +0x3cc
goroutine 17 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).compactionError(0x1085c300)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go:90 +0x578
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:141 +0x848
goroutine 18 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain(0x1085c300)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_state.go:97 +0x178
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:142 +0x874
goroutine 19 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).tCompaction(0x1085c300)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go:804 +0x914
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:148 +0xac8
goroutine 20 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction(0x1085c300)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_compaction.go:751 +0x2f4
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:149 +0xaf4
goroutine 21 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).jWriter(0x1085c300)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db_write.go:37 +0x1e0
created by github.com/syndtr/goleveldb/leveldb.openDB
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:150 +0xb20
goroutine 22 [select]:
Coolpy/Hubs.delChan()
/opt/slu/src/Coolpy/Hubs/Hub.go:50 +0x388
created by Coolpy/Hubs.Connect
/opt/slu/src/Coolpy/Hubs/Hub.go:45 +0x1e8
goroutine 23 [select]:
Coolpy/Nodes.delChan()
/opt/slu/src/Coolpy/Nodes/Node.go:66 +0x3d0
created by Coolpy/Nodes.Connect
/opt/slu/src/Coolpy/Nodes/Node.go:61 +0x1e8
goroutine 24 [select]:
Coolpy/Controller.delChan()
/opt/slu/src/Coolpy/Controller/Controller.go:58 +0x2a0
created by Coolpy/Controller.Connect
/opt/slu/src/Coolpy/Controller/Controller.go:53 +0x1e8
goroutine 25 [chan receive]:
Coolpy/Values.delChan()
/opt/slu/src/Coolpy/Values/ValueDP.go:45 +0x84
created by Coolpy/Values.Connect
/opt/slu/src/Coolpy/Values/ValueDP.go:39 +0x1e8
goroutine 26 [chan receive]:
Coolpy/Gpss.delChan()
/opt/slu/src/Coolpy/Gpss/GpsDP.go:48 +0x84
created by Coolpy/Gpss.Connect
/opt/slu/src/Coolpy/Gpss/GpsDP.go:42 +0x1e8
goroutine 27 [chan receive]:
Coolpy/Gens.delChan()
/opt/slu/src/Coolpy/Gens/GenDP.go:45 +0x84
created by Coolpy/Gens.Connect
/opt/slu/src/Coolpy/Gens/GenDP.go:39 +0x1e8
goroutine 28 [chan receive]:
Coolpy/Photos.delChan()
/opt/slu/src/Coolpy/Photos/PhotoDP.go:47 +0x84
created by Coolpy/Photos.Connect
/opt/slu/src/Coolpy/Photos/PhotoDP.go:41 +0x1e8
goroutine 30 [IO wait]:
net.(_pollDesc).Wait(0x108706b8, 0x72, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(_pollDesc).WaitRead(0x108706b8, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(_netFD).accept(0x10870680, 0x0, 0x771d0cc8, 0x1087eb08)
/go-mips32/src/net/fd_unix.go:419 +0x3dc
net.(_TCPListener).AcceptTCP(0x1080ae38, 0x834c0, 0x0, 0x0)
/go-mips32/src/net/tcpsock_posix.go:234 +0x58
net.(_TCPListener).Accept(0x1080ae38, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/net/tcpsock_posix.go:244 +0x48
net/http.(_Server).Serve(0x10870740, 0x771d1010, 0x1080ae38, 0x0, 0x0)
/go-mips32/src/net/http/server.go:1728 +0xac
net/http.Serve(0x771d1010, 0x1080ae38, 0x771d2b50, 0x1080ae48, 0x0, 0x0)
/go-mips32/src/net/http/server.go:1606 +0xc0
main.func·002()
/opt/slu/main.go:127 +0x328
created by main.main
/opt/slu/main.go:131 +0x1400
goroutine 31 [IO wait]:
net.(_pollDesc).Wait(0x108707f8, 0x72, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(_pollDesc).WaitRead(0x108707f8, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(_netFD).accept(0x108707c0, 0x0, 0x771d0cc8, 0x1087eb2c)
/go-mips32/src/net/fd_unix.go:419 +0x3dc
net.(_TCPListener).AcceptTCP(0x1080ae50, 0x834c0, 0x0, 0x0)
/go-mips32/src/net/tcpsock_posix.go:234 +0x58
net/http.tcpKeepAliveListener.Accept(0x1080ae50, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/net/http/server.go:1976 +0x48
net/http.(_Server).Serve(0x10870780, 0x771d2be0, 0x1080ae50, 0x0, 0x0)
/go-mips32/src/net/http/server.go:1728 +0xac
net/http.(_Server).ListenAndServe(0x10870780, 0x0, 0x0)
/go-mips32/src/net/http/server.go:1718 +0x15c
net/http.ListenAndServe(0x1087eb24, 0x5, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/net/http/server.go:1808 +0xe4
main.func·003()
/opt/slu/main.go:143 +0xc4
created by main.main
/opt/slu/main.go:147 +0x1990
goroutine 32 [chan receive]:
main.func·004()
/opt/slu/main.go:155 +0x78
created by main.main
/opt/slu/main.go:168 +0x1e44
goroutine 33 [IO wait]:
net.(_pollDesc).Wait(0x10870178, 0x72, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(_pollDesc).WaitRead(0x10870178, 0x0, 0x0)
/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(_netFD).accept(0x10870140, 0x0, 0x771d0cc8, 0x1087eb6c)
/go-mips32/src/net/fd_unix.go:419 +0x3dc
net.(_TCPListener).AcceptTCP(0x1080ae18, 0x771bf000, 0x0, 0x0)
/go-mips32/src/net/tcpsock_posix.go:234 +0x58
net.(_TCPListener).Accept(0x1080ae18, 0x0, 0x0, 0x0, 0x0)
/go-mips32/src/net/tcpsock_posix.go:244 +0x48
github.com/gomqtt/transport.(_NetServer).Accept(0x1080ae20, 0x0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/gomqtt/transport/net_server.go:54 +0x78
github.com/gomqtt/broker.func·003(0x0, 0x0)
/opt/slu/src/github.com/gomqtt/broker/engine.go:99 +0x78
gopkg.in/tomb%2ev2.(_Tomb).run(0x1080cbdc, 0x1087eaf0)
/opt/slu/src/gopkg.in/tomb.v2/tomb.go:153 +0x3c
created by gopkg.in/tomb%2ev2.(_Tomb).Go
/opt/slu/src/gopkg.in/tomb.v2/tomb.go:149 +0x1a0
only on openwrt : panic: runtime error: slice bounds out of range
linux amd64 and windows are run fine!
I'm find it golang/go#9007
look's like must change to higher go version to fix this bug???
code source:
func main() {
db, err := leveldb.OpenFile("data", nil)
if err != nil {
fmt.Println("error:", err)
}
defer db.Close()
data, err := db.Get([]byte("key"), nil)
fmt.Println(string(data),err)
err = db.Put([]byte("key"), []byte("value"), nil)
data, err = db.Get([]byte("key"), nil)
fmt.Println(string(data),err)
}
bug review:
1 ./main that's run allright
2 rerun ./main error show for bug view
bug view:
root@OpenWrt:/tmp# ./main
panic: runtime error: slice bounds out of range
goroutine 1 [running]:
github.com/golang/snappy.encodeBlock(0x10410141, 0x43, 0x43, 0x1086623c, 0x1b, 0x40, 0x50)
/opt/slu/src/github.com/golang/snappy/encode_other.go:175 +0x10c4
github.com/golang/snappy.Encode(0x10410140, 0x44, 0x44, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/golang/snappy/encode.go:37 +0x370
github.com/syndtr/goleveldb/leveldb/table.(_Writer).writeBlock(0x10866200, 0x1086622c, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/table/writer.go:170 +0x1e4
github.com/syndtr/goleveldb/leveldb/table.(_Writer).finishBlock(0x10866200, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/table/writer.go:221 +0xa0
github.com/syndtr/goleveldb/leveldb/table.(_Writer).Close(0x10866200, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/table/writer.go:294 +0x960
github.com/syndtr/goleveldb/leveldb.(_tWriter).finish(0x10434740, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/table.go:507 +0x9c
github.com/syndtr/goleveldb/leveldb.(_tOps).createFrom(0x104366e0, 0x77817d08, 0x10434700, 0x0, 0x1, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/table.go:340 +0x288
github.com/syndtr/goleveldb/leveldb.(_session).flushMemdb(0x1042e000, 0x10448070, 0x1042e080, 0x0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/session_compaction.go:27 +0x1cc
github.com/syndtr/goleveldb/leveldb.(*DB).recoverJournal(0x1045a000, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:603 +0xce0
github.com/syndtr/goleveldb/leveldb.openDB(0x1042e000, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:124 +0x9e8
github.com/syndtr/goleveldb/leveldb.Open(0x77817a48, 0x10434000, 0x0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:196 +0x1e0
github.com/syndtr/goleveldb/leveldb.OpenFile(0x1a9b58, 0x4, 0x0, 0x0, 0x0, 0x0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/db.go:218 +0xbc
main.main()
/opt/slu/main.go:14 +0x58
goroutine 5 [select]:
github.com/syndtr/goleveldb/leveldb/util.(*BufferPool).drain(0x1043e0b0)
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go:206 +0x2a0
created by github.com/syndtr/goleveldb/leveldb/util.NewBufferPool
/opt/slu/src/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go:237 +0x2cc
thx!
Assuming you cloned go-mips32 into /home/michael/go-mips32, this is how you can compile it (using a Debian jessie Docker container until #9 is fixed):
$ docker run -t -i -v /home/michael/go-mips32:/home/michael/go-mips32 debian:jessie /bin/bash
# apt-get update && apt-get install build-essential git vim
# cd /home/michael/go-mips32/src
# git clone -b archive git://github.com/davecheney/golang-crosscompile.git
# sed -i 's,PLATFORMS=".*",PLATFORMS="linux/mips32 linux/mips32le",g' golang-crosscompile/crosscompile.bash
# source golang-crosscompile/crosscompile.bash
# go-crosscompile-build-all
Then, on the host, you can use go like this:
GOARCH=mips32le ~/go-mips32/bin/go build helloworld.go
Mac OS X 10.11:
export GOOS=linux
export GOARCH=mips32
src❯ ./make.bash go-mips32/git/dev.github !
cmd/dist
lib9
libbio
liblink
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1467:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1463:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1447:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1436:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1429:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1413:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1402:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1395:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1379:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1369:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1362:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1359:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1356:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1350:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1344:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1341:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1337:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1325:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1321:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
/Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here
fatal error: too many errors emitted, stopping now [-ferror-limit=]
go tool dist: FAILED: clang -Wall -Wstrict-prototypes -Wextra -Wunused -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Wno-missing-field-initializers -Werror -fno-common -ggdb -pipe -Wuninitialized -O2 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -mmacosx-version-min=10.6 -c -m64 -I /Users/cflewis/Documents/Computing/mipsgo/go-mips32/include -I /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink -o /Users/cflewis/Documents/Computing/mipsgo/go-mips32/pkg/obj/liblink/asmv.o /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c
When I try to compile my code, it shows the error information:
import "context": import path does not contain a slash
package context: unrecognized import path "context"
Maybe it is the issue about version, I think. My code runs in Windows and Ubuntu under go version 1.14
I tried to compile this project with
CGO_ENABLED=1 GOOS=linux GOARCH=mips32 ./make.bash
and I got errors:
/tmp/go-build633924730/runtime/cgo/_obj/gcc_util.o: In function x_cgo_thread_start': runtime/cgo/gcc_util.c:46: undefined reference to
_cgo_sys_thread_start'
collect2: error: ld returned 1 exit status
looks like there is a need to create src/runtime/cgo/gcc_linux_mips32x.c and src/runtime/cgo/asm_mips32x.s to do it.
Content of the first file is pretty obvious and can be moslty copied form src/runtime/cgo/gcc_linux_XXX.c file, but the second file require mips32 assembly and I have no idea how to implement it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.