ethereum / ethash

188 stars 515 forks source link

compile error #116

Closed ludete closed 4 years ago

ludete commented 5 years ago

The following error occurred while compiling the project by go build command.

../../ethereum/ethash/ethash.go:25:2: cannot find package "github.com/ethereum/go-ethereum/ethutil" in any of:
    /go/src/github.com/ethereum/go-ethereum/ethutil (from $GOROOT)
    /root/go/src/github.com/ethereum/go-ethereum/ethutil (from $GOPATH)
../../ethereum/ethash/ethash.go:26:2: cannot find package "github.com/ethereum/go-ethereum/logger" in any of:
    /go/src/github.com/ethereum/go-ethereum/logger (from $GOROOT)
    /root/go/src/github.com/ethereum/go-ethereum/logger (from $GOPATH)
../../ethereum/ethash/ethash.go:27:2: cannot find package "github.com/ethereum/go-ethereum/pow" in any of:
    /go/src/github.com/ethereum/go-ethereum/pow (from $GOROOT)
    /root/go/src/github.com/ethereum/go-ethereum/pow (from $GOPATH)

I looked at this project with the name go-ethereum and he removed the above three modules in the latest version.

manwapri commented 4 years ago

remove go rpms yum install -y gcc compile it with only c/c++

=================================================== [root@localhost ethash]# make ./test/test.sh

################# Testing JS ################## which: no nodejs in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin) which: no node in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin)

################# Testing C ################## make[1]: Entering directory /home/project_ethash/ethash_by_xilix/ethash/test/c/build' make[2]: Entering directory/home/project_ethash/ethash_by_xilix/ethash/test/c/build' make[3]: Entering directory /home/project_ethash/ethash_by_xilix/ethash/test/c/build' make[4]: Entering directory/home/project_ethash/ethash_by_xilix/ethash/test/c/build' Scanning dependencies of target ethash make[4]: Leaving directory /home/project_ethash/ethash_by_xilix/ethash/test/c/build' make[4]: Entering directory/home/project_ethash/ethash_by_xilix/ethash/test/c/build' [ 14%] Building C object src/libethash/CMakeFiles/ethash.dir/io.c.o [ 28%] Building C object src/libethash/CMakeFiles/ethash.dir/internal.c.o [ 42%] Building C object src/libethash/CMakeFiles/ethash.dir/io_posix.c.o [ 57%] Building C object src/libethash/CMakeFiles/ethash.dir/sha3.c.o [ 71%] Linking C static library libethash.a make[4]: Leaving directory /home/project_ethash/ethash_by_xilix/ethash/test/c/build' [ 71%] Built target ethash make[4]: Entering directory/home/project_ethash/ethash_by_xilix/ethash/test/c/build' Scanning dependencies of target Test make[4]: Leaving directory /home/project_ethash/ethash_by_xilix/ethash/test/c/build' make[4]: Entering directory/home/project_ethash/ethash_by_xilix/ethash/test/c/build' [ 85%] Building CXX object test/c/CMakeFiles/Test.dir/test.cpp.o [100%] Linking CXX executable Test make[4]: Leaving directory /home/project_ethash/ethash_by_xilix/ethash/test/c/build' [100%] Built target Test make[3]: Leaving directory/home/project_ethash/ethash_by_xilix/ethash/test/c/build' make[2]: Leaving directory /home/project_ethash/ethash_by_xilix/ethash/test/c/build' make[1]: Leaving directory/home/project_ethash/ethash_by_xilix/ethash/test/c/build' Running 21 test cases...

*** No errors detected ======== Running tests under valgrind ======== ==4786== Memcheck, a memory error detector ==4786== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==4786== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==4786== Command: ./test/c/Test ==4786== Running 21 test cases...

No errors detected ==4786== ==4786== FILE DESCRIPTORS: 3 open at exit. ==4786== Open file descriptor 2: /dev/pts/0 ==4786== ==4786== ==4786== Open file descriptor 1: /dev/pts/0 ==4786== ==4786== ==4786== Open file descriptor 0: /dev/pts/0 ==4786== ==4786== ==4786== ==4786== HEAP SUMMARY: ==4786== in use at exit: 0 bytes in 0 blocks ==4786== total heap usage: 66,394 allocs, 66,394 frees, 73,738,649 bytes allocated ==4786== ==4786== All heap blocks were freed -- no leaks are possible ==4786== ==4786== For counts of detected and suppressed errors, rerun with: -v ==4786== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ################# Testing Go ################## ./test/test.sh: line 32: go: command not found make: [test] Error 127 [root@localhost ethash]#

manwapri commented 4 years ago

ethash clone and compile procedure:

sudo yum install -y *gcc* sudo yum install -y *g++* sudo yum install -y *libboost* sudo yum install -y python sudo yum install -y python-virtualenv* sudo yum install -y cryptopp sudo yum install -y *opencl* wget https://raw.githubusercontent.com/Xilinx/XRT/master/src/runtime_src/tools/scripts/xrtdeps.sh sudo sh xrtdeps.sh sudo yum install -y cmake sudo yum install -y git git clone https://github.com/ethereum/ethash.git cd ethash/ git checkout v23.1 sed -i '16 s/^/pip install --upgrade pip\npip install nose\npip install pysha3\n/' ./test/python/test.sh sed -i '39 s/^/#include \n/' ./src/benchmark/benchmark.cpp make cd test/c/build make ethash make Benchmark_FULL ./src/benchmark/Benchmark_FULL