Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

not able to make benchmark_full #123

Closed
manwapri opened this issue Mar 24, 2020 · 7 comments
Closed

not able to make benchmark_full #123

manwapri opened this issue Mar 24, 2020 · 7 comments

Comments

@manwapri
Copy link

getting below errors

========================================================================

[root@localhost build]# make Benchmark_FULL
[ 71%] Built target ethash
Scanning dependencies of target Benchmark_FULL
[ 85%] Building CXX object src/benchmark/CMakeFiles/Benchmark_FULL.dir/benchmark.cpp.o
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp: In function ‘int main()’:
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:108:2: error: ‘ethash_params’ was not declared in this scope
ethash_params params;
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:108:16: error: expected ‘;’ before ‘params’
ethash_params params;
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:109:22: error: ‘params’ was not declared in this scope
ethash_params_init(&params, 0);
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:109:31: error: ‘ethash_params_init’ was not declared in this scope
ethash_params_init(&params, 0);
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:129:2: error: ‘ethash_cache’ was not declared in this scope
ethash_cache cache;
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:129:15: error: expected ‘;’ before ‘cache’
ethash_cache cache;
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:130:2: error: ‘cache’ was not declared in this scope
cache.mem = cache_mem;
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:135:40: error: ‘ethash_mkcache’ was not declared in this scope
ethash_mkcache(&cache, &params, &seed);
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:146:58: error: invalid use of incomplete type ‘struct ethash_light’
ethash_light(&hash, &cache, &params, &previous_hash, 0);
^
In file included from /home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:25:0:
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/../libethash/ethash.h:58:8: error: forward declaration of ‘struct ethash_light’
struct ethash_light;
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:153:54: error: ‘ethash_compute_full_data’ was not declared in this scope
ethash_compute_full_data(full_mem, &params, &cache);
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:175:58: error: invalid use of incomplete type ‘struct ethash_full’
ethash_full(&hash, full_mem, &params, &previous_hash, 0);
^
In file included from /home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:25:0:
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/../libethash/ethash.h:60:8: error: forward declaration of ‘struct ethash_full’
struct ethash_full;
^
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:248:64: error: invalid use of incomplete type ‘struct ethash_full’
ethash_full(&hash, full_mem, &params, &previous_hash, nonce);
^
In file included from /home/project_ethash/ethash_by_xilix/ethash/src/benchmark/benchmark.cpp:25:0:
/home/project_ethash/ethash_by_xilix/ethash/src/benchmark/../libethash/ethash.h:60:8: error: forward declaration of ‘struct ethash_full’
struct ethash_full;
^
make[3]: *** [src/benchmark/CMakeFiles/Benchmark_FULL.dir/benchmark.cpp.o] Error 1
make[2]: *** [src/benchmark/CMakeFiles/Benchmark_FULL.dir/all] Error 2
make[1]: *** [src/benchmark/CMakeFiles/Benchmark_FULL.dir/rule] Error 2
make: *** [Benchmark_FULL] Error 2
[root@localhost build]#

@manwapri
Copy link
Author

manwapri commented Mar 25, 2020

install all python dependencies and done
pip install pysha3 pyethereum nose
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1

for the above error, you need to install g++ packages
sudo yum install -y *g++*

please find the below procedure to compile the ethash program,

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

@manwapri
Copy link
Author

program has been compiled

@SaphyNguyen
Copy link

Hi,

I also have same issue in Ubuntu, could you help to fix it?

Thanks,

@manwapri
Copy link
Author

manwapri commented Feb 18, 2021 via email

@SaphyNguyen
Copy link

Many thanks, manwapri

@manwapri
Copy link
Author

manwapri commented Feb 18, 2021 via email

@shlgmbr
Copy link

shlgmbr commented Jan 25, 2022

I am getting the same issue while making a build on ubuntu but when trying on Red hat I am getting the following error.

[ 66%] Built target ethash
[ 83%] Building CXX object src/benchmark/CMakeFiles/Benchmark_FULL.dir/benchmark.cpp.o
/home/ec2-user/ethash/src/benchmark/benchmark.cpp:39:10: error: #include expects "FILENAME" or
#include
^
/home/ec2-user/ethash/src/benchmark/benchmark.cpp:87:13: error: 'string' in namespace 'std' does not name a type
static std::string bytesToHexString(uint8_t const* bytes, unsigned size)
^~~~~~
/home/ec2-user/ethash/src/benchmark/benchmark.cpp:87:8: note: 'std::string' is defined in header ''; did you forget to '#include '?
/home/ec2-user/ethash/src/benchmark/benchmark.cpp:39:1:
+#include
#include
/home/ec2-user/ethash/src/benchmark/benchmark.cpp:87:8:
static std::string bytesToHexString(uint8_t const* bytes, unsigned size)
^~~
/home/ec2-user/ethash/src/benchmark/benchmark.cpp: In function 'int main()':
/home/ec2-user/ethash/src/benchmark/benchmark.cpp:132:86: error: 'bytesToHexString' was not declared in this scope
debugf("ethash_mkcache: %ums, sha3: %s\n", (unsigned)((time1000)/CLOCKS_PER_SEC), bytesToHexString(cache_hash,sizeof(cache_hash)).data());
^~~~~~~~~~~~~~~~
/home/ec2-user/ethash/src/benchmark/benchmark.cpp:169:91: error: 'bytesToHexString' was not declared in this scope
debugf("ethash_full test: %uns, %s\n", (unsigned)((time
1000000)/CLOCKS_PER_SEC), bytesToHexString(hash.result, 32).data());
^~~~~~~~~~~~~~~~
make[3]: *** [src/benchmark/CMakeFiles/Benchmark_FULL.dir/build.make:76: src/benchmark/CMakeFiles/Benchmark_FULL.dir/benchmark.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:158: src/benchmark/CMakeFiles/Benchmark_FULL.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:165: src/benchmark/CMakeFiles/Benchmark_FULL.dir/rule] Error 2
make: *** [Makefile:137: Benchmark_FULL] Error 2

please help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants