firoorg / firominer

GNU General Public License v3.0
13 stars 6 forks source link

Compilation error #1

Closed wpbloger closed 3 years ago

wpbloger commented 3 years ago

I wanted to compile and try this miner, but when compiling I get the following errors:

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/ivan/test/firominer/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_5fecb/fast"
/usr/bin/make -f CMakeFiles/cmTC_5fecb.dir/build.make CMakeFiles/cmTC_5fecb.dir/build
make[1]: вход в каталог «/home/ivan/test/firominer/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_5fecb.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_5fecb.dir/CheckSymbolExists.c.o   -c /home/ivan/test/firo$
Linking C executable cmTC_5fecb
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5fecb.dir/link.txt --verbose=1
/usr/bin/cc      CMakeFiles/cmTC_5fecb.dir/CheckSymbolExists.c.o  -o cmTC_5fecb
CMakeFiles/cmTC_5fecb.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_5fecb.dir/build.make:97: recipe for target 'cmTC_5fecb' failed
make[1]: *** [cmTC_5fecb] Error 1
make[1]: выход из каталога «/home/ivan/test/firominer/build/CMakeFiles/CMakeTmp»
Makefile:126: recipe for target 'cmTC_5fecb/fast' failed
make: *** [cmTC_5fecb/fast] Error 2

OC: Linux version 4.15.0-147-generic (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) and Linux version 4.19.0-12-amd64 (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.152-1

AndreaLanfranchi commented 3 years ago

Can you post the whole cmake log ?

wpbloger commented 3 years ago

After a second attempt to compile the miner, the following errors are displayed:

/home/ivan/firominer/libethash-cuda/CUDAMiner.cpp: In member function ‘virtual void dev::eth::CUDAMiner::workLoop()’:
/home/ivan/firominer/libethash-cuda/CUDAMiner.cpp:225:63: error: ‘kPeriod’ is not a member of ‘progpow’
             uint64_t period_seed = w.block.value() / progpow::kPeriod;
                                                               ^~~~~~~
libethash-cuda/CMakeFiles/ethash-cuda.dir/build.make:69: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/CUDAMiner.cpp.o' failed
make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/CUDAMiner.cpp.o] Error 1
CMakeFiles/Makefile2:435: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/all' failed
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

CMakeError.log:

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/ivan/firominer/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_dcb9b/fast"
/usr/bin/make -f CMakeFiles/cmTC_dcb9b.dir/build.make CMakeFiles/cmTC_dcb9b.dir/build
make[1]: вход в каталог «/home/ivan/firominer/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_dcb9b.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_dcb9b.dir/CheckSymbolExists.c.o   -c /home/ivan/firominer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_dcb9b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_dcb9b.dir/link.txt --verbose=1
/usr/bin/cc      CMakeFiles/cmTC_dcb9b.dir/CheckSymbolExists.c.o  -o cmTC_dcb9b 
CMakeFiles/cmTC_dcb9b.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_dcb9b.dir/build.make:97: recipe for target 'cmTC_dcb9b' failed
make[1]: *** [cmTC_dcb9b] Error 1
make[1]: выход из каталога «/home/ivan/firominer/build/CMakeFiles/CMakeTmp»
Makefile:126: recipe for target 'cmTC_dcb9b/fast' failed
make: *** [cmTC_dcb9b/fast] Error 2

File /home/ivan/firominer/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/ivan/firominer/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_73134/fast"
/usr/bin/make -f CMakeFiles/cmTC_73134.dir/build.make CMakeFiles/cmTC_73134.dir/build
make[1]: вход в каталог «/home/ivan/firominer/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_73134.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_73134.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
Linking C executable cmTC_73134
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_73134.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_73134.dir/CheckFunctionExists.c.o  -o cmTC_73134 -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_73134.dir/build.make:97: recipe for target 'cmTC_73134' failed
make[1]: *** [cmTC_73134] Error 1
make[1]: выход из каталога «/home/ivan/firominer/build/CMakeFiles/CMakeTmp»
Makefile:126: recipe for target 'cmTC_73134/fast' failed
make: *** [cmTC_73134/fast] Error 2
AndreaLanfranchi commented 3 years ago

This should be fixed now

/home/ivan/firominer/libethash-cuda/CUDAMiner.cpp: In member function ‘virtual void dev::eth::CUDAMiner::workLoop()’:
/home/ivan/firominer/libethash-cuda/CUDAMiner.cpp:225:63: error: ‘kPeriod’ is not a member of ‘progpow’
             uint64_t period_seed = w.block.value() / progpow::kPeriod;
                                                               ^~~~~~~
wpbloger commented 3 years ago

I tried to compile and it worked. Thank you. Can I only use this miner for the firo testnet?

AndreaLanfranchi commented 3 years ago

Yes ... is for firo only