I build blender to python module as doc specify occurred error with : Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

when I run ‘make bpy’ in ubuntu 20.04.4 LTS occurred the error bellow :
anyone try in ubuntu ?

-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMake Error at build_files/cmake/macros.cmake:1243 (if):
  if given arguments:

    "NOT" "AND" "ON"

  Unknown arguments specified
Call Stack (most recent call first):
  build_files/cmake/platform/platform_unix.cmake:670 (set_and_warn_library_found)
  CMakeLists.txt:1067 (include)


-- Configuring incomplete, errors occurred!
See also "/root/blender-git/build_linux_bpy/CMakeFiles/CMakeOutput.log".
See also "/root/blender-git/build_linux_bpy/CMakeFiles/CMakeError.log".
make: *** [GNUmakefile:354: all] Error 1

Does sudo apt install pkg-config help?

We should make some changes to avoid errors when that is not installed.

occured another error bellow :

-- Checking for module 'xkbcommon'
--   No package 'xkbcommon' found
CMake Error at build_files/cmake/macros.cmake:1243 (if):
  if given arguments:

    "NOT" "AND" "ON"

  Unknown arguments specified
Call Stack (most recent call first):
  build_files/cmake/platform/platform_unix.cmake:670 (set_and_warn_library_found)
  CMakeLists.txt:1067 (include)


-- Configuring incomplete, errors occurred!
See also "/root/blender-git/build_linux_bpy/CMakeFiles/CMakeOutput.log".
See also "/root/blender-git/build_linux_bpy/CMakeFiles/CMakeError.log".
make: *** [GNUmakefile:354: all] Error 1
root@ecs-211302:~/blender-git/blender# apt install xkbcommon -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package xkbcommon

I try sudo apt-get install -y libxkbcommon-dev and success !

error occurred again …

[ 88%] Building CXX object source/blender/modifiers/CMakeFiles/bf_modifiers.dir/intern/MOD_volume_displace.cc.o
{standard input}: Assembler messages:
{standard input}:421621: Warning: end of file not at end of a line; newline inserted
{standard input}:421622: Error: expecting operand after ','; got nothing
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[3]: *** [source/blender/blenkernel/CMakeFiles/bf_blenkernel.dir/build.make:3339: source/blender/blenkernel/CMakeFiles/bf_blenkernel.dir/intern/volume_to_mesh.cc.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:6066: source/blender/blenkernel/CMakeFiles/bf_blenkernel.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 89%] Building CXX object source/blender/modifiers/CMakeFiles/bf_modifiers.dir/intern/MOD_weld.cc.o
[ 89%] Building C object source/blender/modifiers/CMakeFiles/bf_modifiers.dir/intern/MOD_wireframe.c.o
[ 89%] Linking CXX static library ../../../lib/libbf_modifiers.a
[ 89%] Built target bf_modifiers
make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:357: all] Error 2

AND I just run make bpy again and success the end .

c++: fatal error: Killed signal terminated program cc1plus may indicate it ran out of memory compiling some heavy files using OpenVDB. This can be somewhat random as it depends which files are being compiled at the same time.

1 Like