Skip to content

CMake: Failed to compile with -j20. #354

@logic-wei

Description

@logic-wei

How to reproduce:

  1. mkdir build; cd build
  2. cmake ../examples/c/
  3. make -j20 # It's easily pass
  4. make clean
  5. make -j20 # It's easily fail.

The key log:

[ 25%] No configure step for 'bpftool' [20/720]
[ 29%] Performing build step for 'libbpf'
[ 29%] Performing build step for 'bpftool'
[ 29%] Performing build step for 'blazesym'
[ 29%] Performing build step for 'bpftool'
[ 30%] Performing build step for 'libbpf'
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
INSTALL bpf.h libbpf.h btf.h libbpf_common.h libbpf_legacy.h bpf_helpers.h bpf_helper_defs.h bpf_tracing.h bpf_endian.h bpf_core_read.h skel_internal.h libbpf_version.h usdt.bpf.h
INSTALL bpf.h libbpf.h btf.h libbpf_common.h libbpf_legacy.h bpf_helpers.h bpf_helper_defs.h bpf_tracing.h bpf_endian.h bpf_core_read.h skel_internal.h libbpf_version.h usdt.bpf.h
install: cannot create regular file '/home/logic/workspace/opensource/libbpf-bootstrap/build/libbpf/bpf/bpf_endian.h': File exists
make[3]: *** [Makefile:164: install_headers] Error 1
INSTALL /home/logic/workspace/opensource/libbpf-bootstrap/build/libbpf/libbpf/libbpf.pc
make[2]: *** [CMakeFiles/libbpf.dir/build.make:86: libbpf/src/libbpf-stamp/libbpf-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:120: CMakeFiles/libbpf.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
INSTALL /home/logic/workspace/opensource/libbpf-bootstrap/build/libbpf/libbpf/libbpf.a
INSTALL ../include/uapi/linux/bpf.h ../include/uapi/linux/bpf_common.h ../include/uapi/linux/btf.h
[ 30%] Built target libbpf-build
Finished release profile [optimized + debuginfo] target(s) in 0.05s
[ 31%] No install step for 'blazesym'
[ 31%] Completed 'blazesym'
[ 31%] Built target blazesym
... libbfd: [ on ]
... libbfd: [ on ]
... clang-bpf-co-re: [ on ]
... clang-bpf-co-re: [ on ]
... llvm: [ on ]
... llvm: [ on ]
... libcap: [ on ]
... libcap: [ on ]
[ 32%] No install step for 'bpftool'
[ 32%] Built target bpftool-build
[ 34%] Completed 'bpftool'
[ 34%] Built target bpftool
make: *** [Makefile:91: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions