ubuntu_bpf failed to build on F-ibm-5.15

Bug #2028127 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned

Bug Description

Test build failed with:
  In file included from progs/test_ksyms_btf_null_check.c:4:
  /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:5:15: error: attribute 'preserve_access_index' is not supported by '#pragma clang attribute'
  #pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)
                ^
  /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:132008:15: error: '#pragma clang attribute pop' with no matching '#pragma clang attribute push'
  #pragma clang attribute pop
                ^
  2 errors generated.

We are using clang-9 for this, we might need to use clang-10 instead.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Download full text (11.0 KiB)

With clang-10 and llvm-10, test build failed with:
  Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
  Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h'
  Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
  fatal error: error in backend: line 27: Invalid usage of the XADD return value
  Stack dump:
  0. Program arguments: clang-10 -g -D__TARGET_ARCH_x86 -mlittle-endian -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/include/uapi -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/lib/llvm-10/lib/clang/10.0.0/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 -target bpf -c progs/atomics.c -o /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/atomics.o -mcpu=v3
  1. <eof> parser at end of file
  2. Code generation
  3. Running pass 'Function Pass Manager' on module 'progs/atomics.c'.
  4. Running pass 'BPF PreEmit Checking' on function '@add'
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7fa525c8a4ff]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7fa525c887b0]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0xdd)[0x7fa525c89c4d]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x8d6cea)[0x7fa525bdfcea]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x8d6c8b)[0x7fa525bdfc8b]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x97c3fe)[0x7fa525c853fe]
  clang-10[0x4125b2]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm18report_fatal_errorERKNS_5TwineEb+0x104)[0x7fa525be99b4]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm18report_fatal_errorENS_9StringRefEb+0x0)[0x7fa525be9a80]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x21874ed)[0x7fa5274904ed]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x118)[0x7fa525f255e8]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x466)[0x7fa525d8fd76]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x7fa525d8fff3]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x3c0)[0x7fa525d904a0]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x3173)[0x7fa52ad85433]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(+0x1667e1c)[0x7fa52b004e1c]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clan...

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Test show it will need clang-13 and llvm-13 from proposed pocket. As we're not using -proposed for SRU, this might be debatable if we should enable it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.