[Resolved] Can somebody help me build on Ubuntu 20.04 (but this also failed on Ubuntu 19.10)


I am following the exact directions found here:
and am using precompiled libraries. Unfortunately it does not build. Here is stdout:

In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:446,
             from /home/optonox/blender-git/lib/linux_centos7_x86_64/python/include/python3.7m/pyport.h:224,
             from /home/optonox/blender-git/lib/linux_centos7_x86_64/python/include/python3.7m/Python.h:63,
             from /home/optonox/blender-git/blender/intern/audaspace/intern/AUD_PyInit.h:29,
             from /home/optonox/blender-git/blender/intern/audaspace/intern/AUD_PyInit.cpp:25:
/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed/bits/statx.h:38:25: error: missing binary operator before token "("
   38 | #if __glibc_has_include ("__linux__/stat.h")
  |                         ^
make[3]: *** [intern/audaspace/CMakeFiles/bf_intern_audaspace.dir/build.make:76: intern/audaspace/CMakeFiles/bf_intern_audaspace.dir/intern/AUD_PyInit.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:3416: intern/audaspace/CMakeFiles/bf_intern_audaspace.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:304: all] Error 2

This program will not allow me to upload the stdout log file I made because I am a new user, so I am attaching it below.

Please let me know what to do to get this to build. Thanks

Configuring Blender in "/home/optonox/blender-git/build_linux" ...                                                                                                                    
-- Using pre-compiled LIBDIR: /home/optonox/blender-git/blender/../lib/linux_centos7_x86_64                                                                                               
-- Found OpenMP_C: -fopenmp                                                                                                                                                               
-- Found OpenMP_CXX: -fopenmp                                                                                                                                                             
-- Found OpenMP: TRUE                                                                                                                                                                     
-- Could NOT find Jack (missing: JACK_LIBRARY JACK_INCLUDE_DIR)                                                                                                                           
-- Found OpenMP_C: -fopenmp                                                                                                                                                               
-- Found OpenMP_CXX: -fopenmp                                                                                                                                                             
-- Tests: Using Python executable: /home/optonox/blender-git/lib/linux_centos7_x86_64/python/bin/python3.7m                                                                               
-- Disabling render tests because tests folder does not exist at /home/optonox/blender-git/blender/../lib/tests                                                                           
-- Configuring done                                                                                                                                                                       
-- Generating done                                                                                                                                                                        
-- Build files have been written to: /home/optonox/blender-git/build_linux 

Building Blender ...                                                                                                                                                                      
make -s -C "/home/optonox/blender-git/build_linux" -j 8 install                                                                                                                           
[  0%] Built target bf_intern_memutil                                                                                                                                                     
[  0%] Built target datatoc                                                                                                                                                               
[  0%] Built target bf_intern_numaapi                                                                                                                                                     
[  0%] Built target bf_intern_clog                                                                                                                                                        
[  1%] Built target bf_intern_guardedalloc                                                                                                                                                
[  2%] Built target bf_intern_opensubdiv                                                                                                                                                  
[  2%] Built target bf_intern_ghost                                                                                                                                                       
[  2%] Built target bf_intern_mikktspace                                                                                                                                                  
[  2%] Built target bf_intern_glew_mx                                                                                                                                                     
[  2%] Building CXX object intern/audaspace/CMakeFiles/bf_intern_audaspace.dir/intern/AUD_PyInit.cpp.o                                                                                    
[  2%] Built target bf_intern_eigen                                                                                                                                                       
Scanning dependencies of target bf_intern_dualcon                                                                                                                                         
Scanning dependencies of target extern_cuew                                                                                                                                               
Scanning dependencies of target bf_dna_blenlib                                                                                                                                            
Scanning dependencies of target bf_intern_iksolver                                                                                                                                        
Scanning dependencies of target makesdna                                                                                                                                                  
[  2%] Building CXX object intern/dualcon/CMakeFiles/bf_intern_dualcon.dir/intern/manifold_table.cpp.o                                                                                    
[  2%] Building C object extern/cuew/CMakeFiles/extern_cuew.dir/src/cuew.c.o                                                                                                              
[  2%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna_blenlib.dir/__/__/blenlib/intern/BLI_ghash.c.o                                                                  
[  2%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/dna_utils.c.o                                                                                             
[  2%] Building CXX object intern/iksolver/CMakeFiles/bf_intern_iksolver.dir/intern/IK_QJacobian.cpp.o                                                                                    
Scanning dependencies of target bf_intern_itasc                                                                                                                                           
[  3%] Built target bf_intern_libmv                                                                                                                                                       
[  3%] Building CXX object intern/dualcon/CMakeFiles/bf_intern_dualcon.dir/intern/marching_cubes_table.cpp.o                                                                              
[  3%] Building CXX object intern/dualcon/CMakeFiles/bf_intern_dualcon.dir/intern/octree.cpp.o                                                                                            
[  3%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/Armature.cpp.o                                                                                                     
[  3%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna_blenlib.dir/__/__/blenlib/intern/BLI_ghash_utils.c.o                                                            
[  3%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/makesdna.c.o                                                                                              
[  3%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/Cache.cpp.o                                                                                                        
[  3%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna_blenlib.dir/__/__/blenlib/intern/BLI_linklist.c.o                                                               
[  3%] Linking C static library ../../lib/libextern_cuew.a                                                                                                                                
[  3%] Built target extern_cuew                                                                                                                                                           
[  3%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna_blenlib.dir/__/__/blenlib/intern/BLI_memarena.c.o                                                               
[  3%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna_blenlib.dir/__/__/blenlib/intern/BLI_mempool.c.o                                                                
[  3%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna_blenlib.dir/__/__/blenlib/intern/endian_switch.c.o                                                              
[  3%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna_blenlib.dir/__/__/blenlib/intern/hash_mm2a.c.o                                                                  
[  3%] Building C object source/blender/makesdna/intern/CMakeFiles/bf_dna_blenlib.dir/__/__/blenlib/intern/listbase.c.o                                                                   
[  3%] Building CXX object intern/dualcon/CMakeFiles/bf_intern_dualcon.dir/intern/Projections.cpp.o                                                                                       
[  4%] Building CXX object intern/dualcon/CMakeFiles/bf_intern_dualcon.dir/intern/dualcon_c_api.cpp.o                                                                                     
[  4%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/__/__/blenlib/intern/BLI_ghash.c.o                                                                        
[  4%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/__/__/blenlib/intern/BLI_ghash_utils.c.o                                                                  
[  4%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/__/__/blenlib/intern/BLI_memarena.c.o                                                                     
[  4%] Linking C static library ../../../../lib/libbf_dna_blenlib.a                                                                                                                       
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/ConstraintSet.cpp.o                                                                                                
[  4%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/__/__/blenlib/intern/BLI_mempool.c.o                                                                      
[  4%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/__/__/blenlib/intern/hash_mm2a.c.o                                                                        
[  4%] Built target bf_dna_blenlib                                                                                                                                                        
[  4%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/__/__/__/__/intern/guardedalloc/intern/mallocn.c.o                                                        
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/ControlledObject.cpp.o                                                                                             
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/CopyPose.cpp.o                                                                                                     
[  4%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/__/__/__/__/intern/guardedalloc/intern/mallocn_guarded_impl.c.o                                           
[  4%] Building C object source/blender/makesdna/intern/CMakeFiles/makesdna.dir/__/__/__/__/intern/guardedalloc/intern/mallocn_lockfree_impl.c.o                                          
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/Distance.cpp.o                                                                                                     
[  4%] Linking C executable ../../../../bin/makesdna                                                                                                                                      
[  4%] Built target makesdna                                                                                                                                                              
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/FixedObject.cpp.o                                                                                                  
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/MovingFrame.cpp.o                                                                                                  
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/Scene.cpp.o                                                                                                        
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/UncontrolledObject.cpp.o                                                                                           
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/WDLSSolver.cpp.o                                                                                                   
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/WSDLSSolver.cpp.o                                                                                                  
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/WorldObject.cpp.o                                                                                                  
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/eigen_types.cpp.o                                                                                                  
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/chain.cpp.o                                                                                                    
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/chainfksolverpos_recursive.cpp.o                                                                               
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/chainjnttojacsolver.cpp.o                                                                                      
[  4%] Linking CXX static library ../../lib/libbf_intern_dualcon.a                                                                                                                        
[  4%] Built target bf_intern_dualcon                                                                                                                                                     
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/frameacc.cpp.o                                                                                                 
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/frames.cpp.o                                                                                                   
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/frames_io.cpp.o                                                                                                
[  4%] Building CXX object intern/iksolver/CMakeFiles/bf_intern_iksolver.dir/intern/IK_QJacobianSolver.cpp.o                                                                              
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/framevel.cpp.o                                                                                                 
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/inertia.cpp.o                                                                                                  
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/jacobian.cpp.o                                                                                                 
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/jntarray.cpp.o                                                                                                 
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/jntarrayacc.cpp.o                                                                                              
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/jntarrayvel.cpp.o                                                                                              
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/joint.cpp.o                                                                                                    
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/kinfam_io.cpp.o                                                                                                
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/segment.cpp.o                                                                                                  
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/tree.cpp.o                                                                                                     
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/treefksolverpos_recursive.cpp.o                                                                                
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/treejnttojacsolver.cpp.o                                                                                       
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/utilities/error_stack.cpp.o                                                                                    
[  4%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/utilities/utility.cpp.o                                                                                        
[  5%] Building CXX object intern/itasc/CMakeFiles/bf_intern_itasc.dir/kdl/utilities/utility_io.cpp.o                                                                                     
[  5%] Building CXX object intern/iksolver/CMakeFiles/bf_intern_iksolver.dir/intern/IK_QSegment.cpp.o                                                                                     
[  5%] Building CXX object intern/iksolver/CMakeFiles/bf_intern_iksolver.dir/intern/IK_QTask.cpp.o                                                                                        
[  5%] Building CXX object intern/iksolver/CMakeFiles/bf_intern_iksolver.dir/intern/IK_Solver.cpp.o                                                                                       
[  5%] Linking CXX static library ../../lib/libbf_intern_itasc.a                                                                                                                          
[  5%] Built target bf_intern_itasc                                                                                                                                                       
[  5%] Linking CXX static library ../../lib/libbf_intern_iksolver.a                                                                                                                       
[  5%] Built target bf_intern_iksolver

Hi, can you add the complete log with make -j1 to https://pasteall.org/
or similar, please?
Attach CMakeCache.txt here, too,

Cheers, mib

Seems to be a gcc issue, unsure how much we can do about this from the blender side, i’d take this up with your distro.

Hey, can you successfully build make lite ? Also, if you’re having a gcc issue, it might be worth it to try using a different gcc version instead: (Wrong GCC version For CUDA (Linux) -- How to solve)

I’m running Kubuntu 19.10 and haven’t had any difficulty building since I quit trying to build the dependencies myself. I haven’t had any gcc issues except for CUDA.

make -j1: output is here

As I new user I can’t upload files so there is a link to the CMakeCache.txt

make lite also fails. Here is the output from that

it’s picking up libpng from outside the lib folder in your cmakecache.txt point PNG_LIBRARY_RELEASE:FILEPATH=/usr/local/lib/libpng.a to the one in the blender lib folder rather than the one from /usr

Can you explain the best way for me to do this?

you take a text editor of your choice and you make the change?

Nice! That worked! Thank you so much.

And sorry, earlier I meant how to make sure this doesn’t happen in the future because right now it looks like I have to build, update CMakeCache.txt, then rebuild…

I really appreciate your help.

make -j1

Any reason why you’re building with -j1? That means it is only using one CPU core. I have 16, so I usually build with -j15. Leaving off the -j parameter entirely will use all of your cores.

It was suggested to do so above.

Ah, so it was.

The reason I suggested make lite, by the way, is because make lite is the bare-minimum Blender, it doesn’t include most features, not even Cycles! So when you have a build-failure with lite, you can rule out many possible problems. In particular, the errors in the audaspace library in your first post made me suspect there could be a problem building the audio module. I think I was wrong about that, though. There have been times when I could build lite and not full. Anyways, if you go on to try and build CUDA or OPTIX, you’ll want to look at the “use older versions of gcc” post I linked above.

when diagnosing issues we generally ask to build with -j1 since people tend to give just the last 10-15 lines of the build log. when building with multiple threads the actual error is much higher up in the build log, while with -j 1 it sits nicely at the end.

1 Like