Chia-Network / bladebit

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

internal compiler error: Segmentation fault #458

Closed l8rv closed 3 months ago

l8rv commented 3 months ago

Hi, I'm trying to build and getting this error:

[ 60%] Building CXX object CMakeFiles/bladebit_core.dir/src/plotting/DiskBufferBase.cpp.o       
In file included from /home/chia/bladebit/src/pch.h:11,                                         
                 from <command-line>:                                                           
/usr/include/c++/11/atomic:1040:15: internal compiler error: Segmentation fault                 
 1040 |       atomic& operator=(const atomic&) volatile = delete;                               
      |               ^~~~~~~~                                                                  
0x7f908fa4251f ???                                                                              
        ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0                           
0x7f908fa29d8f __libc_start_call_main                                                           
        ../sysdeps/nptl/libc_start_call_main.h:58                                               
0x7f908fa29e3f __libc_start_main_impl                                                           
        ../csu/libc-start.c:392                                                                 
Please submit a full bug report,                                                                
with preprocessed source if appropriate.                                                        
Please include the complete backtrace with any bug report.                                      
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.                                gmake[3]: *** [CMakeFiles/bladebit_core.dir/build.make:1067: CMakeFiles/bladebit_core.dir/src/pl
otting/DiskBufferBase.cpp.o] Error 1                                                            
gmake[2]: *** [CMakeFiles/Makefile2:138: CMakeFiles/bladebit_core.dir/all] Error 2              
gmake[1]: *** [CMakeFiles/Makefile2:173: CMakeFiles/bladebit.dir/rule] Error 2                  
gmake: *** [Makefile:182: bladebit] Error 2 

Any idea what to do about it?

Thank you

haorldbchi commented 3 months ago

You've hit a GCC bug, which is surprising. I'd encourage you search to see if this ug has already been reported, if not it would be good to report it.

In the meantime, perhaps try a different version of GCC or try building with Clang.

What disto are you using, out of curiosity?

l8rv commented 3 months ago

Thank you, I'll try to figure out how to change the gcc version or how to use clang. I'm using Ubuntu Server 22.04.4

haorldbchi commented 3 months ago

Strange, as it's a mainstream distro. I am using gcc (GCC) 11.4.1 20230605, but on Rocky linux with no issues, but I've also compiled with 22.04.

Maybe try re-installing the development package just in case

l8rv commented 3 months ago

Hi, I think the problem was that I was missing some deps... Installed sudo apt install -y build-essential cmake libgmp-dev libnuma-dev then it worked!