iost-official / explorer

IOST Blockchain explorer
GNU Lesser General Public License v3.0
14 stars 13 forks source link

Trying to build backend - Makefile:8: recipe for target 'explorer' failed #8

Closed jimoquinn closed 5 years ago

jimoquinn commented 5 years ago

Attempted to compile Explorer's backend, but received the error as detailed below. Running the following:

go version go1.12.4 linux/amd64 node v8.16.0 mongodb db version v4.0.9 Ubuntu 16.04

Error on make:


go build -o explorer main.go
# crypto/rc4
/usr/local/go/src/crypto/rc4/rc4_asm.go:15:18: (*Cipher).XORKeyStream redeclared in this block
    previous declaration at /usr/local/go/src/crypto/rc4/rc4.go:61:6
# bytes
/usr/local/go/src/bytes/bytes_decl.go:10:6: IndexByte redeclared in this block
    previous declaration at /usr/local/go/src/bytes/bytes.go:101:34
/usr/local/go/src/bytes/bytes_decl.go:17:6: Equal redeclared in this block
    previous declaration at /usr/local/go/src/bytes/bytes.go:18:25
/usr/local/go/src/bytes/bytes_decl.go:24:6: Compare redeclared in this block
    previous declaration at /usr/local/go/src/bytes/bytes.go:37:27
# strings
/usr/local/go/src/strings/strings_decl.go:8:6: IndexByte redeclared in this block
    previous declaration at /usr/local/go/src/strings/strings.go:150:34
# crypto/cipher
/usr/local/go/src/crypto/cipher/xor_amd64.go:9:6: xorBytes redeclared in this block
    previous declaration at /usr/local/go/src/crypto/cipher/xor.go:58:33
/usr/local/go/src/crypto/cipher/xor_amd64.go:22:6: xorWords redeclared in this block
    previous declaration at /usr/local/go/src/crypto/cipher/xor.go:83:27
Makefile:8: recipe for target 'explorer' failed
make: *** [explorer] Error 2```
jimoquinn commented 5 years ago

I installed golang 1.12 on top of 1.11 and that was the source of the redeclared functions. Once I cleaned up 1.11 and reinstalled 1.12 the compile finished without any errors or warnings.

QwertyJack commented 5 years ago

Good to hear that.