Chia-Network / bladebit

A high-performance k32-only, Chia (XCH) plotter supporting in-RAM and disk-based plotting
Apache License 2.0
339 stars 109 forks source link

While compilation process .bin folder is not created #49

Closed regonsite closed 2 years ago

regonsite commented 2 years ago

CMakeError.log CMakeOutput.log Hello! During compilation process I got this errors in CmakeError.log as below. Something seems go wrong and .bin folder with bladebit bin files wasn't created.

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /home/r730xd/bladebit/modules/bls-signatures/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_c5cac/fast && /usr/bin/make -f CMakeFiles/cmTC_c5cac.dir/build.make CMakeFiles/cmTC_c5cac.dir/build make[1]: Entering directory '/home/r730xd/bladebit/modules/bls-signatures/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_c5cac.dir/src.c.o /usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -fPIE -o CMakeFiles/cmTC_c5cac.dir/src.c.o -c /home/r730xd/bladebit/modules/bls-signatures/build/CMakeFiles/CMakeTmp/src.c Linking C executable cmTC_c5cac /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c5cac.dir/link.txt --verbose=1 /usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_c5cac.dir/src.c.o -o cmTC_c5cac /usr/bin/ld: CMakeFiles/cmTC_c5cac.dir/src.c.o: in function main': src.c:(.text+0x46): undefined reference topthread_create' /usr/bin/ld: src.c:(.text+0x52): undefined reference to pthread_detach' /usr/bin/ld: src.c:(.text+0x63): undefined reference topthread_join' collect2: error: ld returned 1 exit status make[1]: [CMakeFiles/cmTC_c5cac.dir/build.make:87: cmTC_c5cac] Error 1 make[1]: Leaving directory '/home/r730xd/bladebit/modules/bls-signatures/build/CMakeFiles/CMakeTmp' make: [Makefile:121: cmTC_c5cac/fast] Error 2

Source file was:

include

void test_func(void data) { return data; }

int main(void) { pthread_t thread; pthread_create(&thread, NULL, test_func, NULL); pthread_detach(thread); pthread_join(thread, NULL); pthread_atfork(NULL, NULL, NULL); pthread_exit(NULL);

return 0; }

Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /home/r730xd/bladebit/modules/bls-signatures/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_26df1/fast && /usr/bin/make -f CMakeFiles/cmTC_26df1.dir/build.make CMakeFiles/cmTC_26df1.dir/build make[1]: Entering directory '/home/r730xd/bladebit/modules/bls-signatures/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_26df1.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -fPIE -o CMakeFiles/cmTC_26df1.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c Linking C executable cmTC_26df1 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_26df1.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_26df1.dir/CheckFunctionExists.c.o -o cmTC_26df1 -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status make[1]: [CMakeFiles/cmTC_26df1.dir/build.make:87: cmTC_26df1] Error 1 make[1]: Leaving directory '/home/r730xd/bladebit/modules/bls-signatures/build/CMakeFiles/CMakeTmp' make: [Makefile:121: cmTC_26df1/fast] Error 2

I tried to install many packages related to "pthread" with no result. Thx in advance.

olegin77 commented 2 years ago

I have the same problem , did you solved it ?

olegin77 commented 2 years ago

@harold-b any ideas ?

regonsite commented 2 years ago

I have the same problem , did you solved it ?

Not yet...

harold-b commented 2 years ago

Looks like you're having trouble compiling bls-signatures. Which cmake version are you using?

regonsite commented 2 years ago

I made an investigation and seems the problem comes from compiling CMAKE. Error comes from cmake compilation process. I tried few versions, installed them through "apt install", from repository etc. But can't solve this problem till now. Anyone faced with same? cmake version 3.21.20210806-g350065b

regonsite commented 2 years ago

Update: Uninstalled compiled CMAKE and reinstalled it again from official Ubuntu repo - cmake working, but same problem. Downloaded all required libraries as mentioned in stackoverflow and github issues - same problem. There is a lot of answers on stackoverflow how to fix it using commands for compiling files, but I'm not a coder so can't implement it. Already tried Ubuntu 21.04 Server, 20.04 Desktop. Can anyone help me and mention all required libraries/dependencies for cmake/bls-signatures/bladebit ?