ipbc-dev / bittube-miner

BitTube Miner
GNU General Public License v3.0
39 stars 22 forks source link

Can't compile on Ubuntu #8

Closed sbash closed 6 years ago

sbash commented 6 years ago

Main error is here: CMakeFiles/cmTC_9477e.dir/CheckFunctionExists.c.o` -o cmTC_9477e -lpthreads /usr/bin/ld: cannot find -lpthreads

find /lib -name "pthread" /lib/i386-linux-gnu/libpthread-2.23.so /lib/i386-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libpthread-2.23.so /lib/x86_64-linux-gnu/libpthread.so.0

nm /lib/x86_64-linux-gnu/libpthread.so.0 | grep "pthread_create" 0000000000007990 t __pthread_create_2_1 0000000000007990 T pthread_create@@GLIBC_2.2.5

is the issue -lpthreads, not lpthread?

cmake output:

cmake .. -CPU_ENABLE=ON -OpenCL_ENABLE=OFF -DCUDA_ENABLE=OFF loading initial cache file PU_ENABLE=ON CMake Error: Error processing file: PU_ENABLE=ON -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for CL_VERSION_2_0 -- Looking for CL_VERSION_2_0 - found -- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "2.0") -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g") -- Configuring incomplete, errors occurred! See also "/usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeOutput.log". See also "/usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeError.log".


Error log:

Determining if the pthread_create exist failed with the following output: Change Dir: /usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_38cdb/fast" /usr/bin/make -f CMakeFiles/cmTC_38cdb.dir/build.make CMakeFiles/cmTC_38cdb.dir/build make[1]: Entering directory '/usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_38cdb.dir/CheckSymbolExists.c.o /usr/bin/cc -march=native -mtune=native -o CMakeFiles/cmTC_38cdb.dir/CheckSymbolExists.c.o -c /usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTC_38cdb /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_38cdb.dir/link.txt --verbose=1 /usr/bin/cc -march=native -mtune=native CMakeFiles/cmTC_38cdb.dir/CheckSymbolExists.c.o -o cmTC_38cdb CMakeFiles/cmTC_38cdb.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x16): undefined reference topthread_create' collect2: error: ld returned 1 exit status CMakeFiles/cmTC_38cdb.dir/build.make:97: recipe for target 'cmTC_38cdb' failed make[1]: [cmTC_38cdb] Error 1 make[1]: Leaving directory '/usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_38cdb/fast' failed make: [cmTC_38cdb/fast] Error 2

File /usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: / /

include

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: /usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_9477e/fast" /usr/bin/make -f CMakeFiles/cmTC_9477e.dir/build.make CMakeFiles/cmTC_9477e.dir/build make[1]: Entering directory '/usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_9477e.dir/CheckFunctionExists.c.o /usr/bin/cc -march=native -mtune=native -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_9477e.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c Linking C executable cmTC_9477e /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9477e.dir/link.txt --verbose=1 /usr/bin/cc -march=native -mtune=native -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_9477e.dir/CheckFunctionExists.c.o -o cmTC_9477e -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status CMakeFiles/cmTC_9477e.dir/build.make:97: recipe for target 'cmTC_9477e' failed make[1]: [cmTC_9477e] Error 1 make[1]: Leaving directory '/usr/local/miners/ipbc-miner/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_9477e/fast' failed make: [cmTC_9477e/fast] Error 2

bananajamma commented 6 years ago

Why was this closed?