ubuntu_bpf / net test in ubuntu_kernel_selftests failed to build on B-5.4 with "error: use of unknown builtin '__builtin_preserve_access_index'"

Bug #1882559 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin
linux-gcp-5.4 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Issue found on 5.4.0-1011.11~18.04.1 GCP

The compilation failed with:
(clang -I. -I./include/uapi -I../../../include/uapi -I/home/jenkins/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/../usr/include -D__TARGET_ARCH_x86 -idirafter /usr/local/include -idirafter /usr/lib/llvm-6.0/lib/clang/6.0.0/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -Wno-compare-distinct-pointer-types -O2 -target bpf -emit-llvm -c progs/test_core_reloc_ints.c -o - || echo "clang failed") | \
 llc -march=bpf -mcpu=probe -filetype=obj -o /home/jenkins/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/test_core_reloc_ints.o
 progs/test_core_reloc_ints.c:32:6: error: use of unknown builtin '__builtin_preserve_access_index' [-Wimplicit-function-declaration]

Please find the attachment for the complete build log.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
summary: - ubuntu_bpf failed to build on B-5.4 GCP
+ ubuntu_bpf failed to build on B-5.4 GCP with "error: use of unknown
+ builtin '__builtin_preserve_access_index'"
tags: added: 5.4 bionic gcp kqa-blocker sru-20200518 ubuntu-kernel-selftests
affects: linux-gcp (Ubuntu) → linux-gcp-5.4 (Ubuntu)
Sean Feole (sfeole)
Changed in ubuntu-kernel-tests:
status: New → Triaged
tags: added: aws azure
Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: ubuntu_bpf failed to build on B-5.4 GCP/Oracle with "error: use of unknown builtin '__builtin_preserve_access_index'"

Discussion upstream: https://<email address hidden>/msg315068.html

tags: added: oracle sru-20200608
summary: - ubuntu_bpf failed to build on B-5.4 GCP with "error: use of unknown
- builtin '__builtin_preserve_access_index'"
+ ubuntu_bpf failed to build on B-5.4 GCP/Oracle with "error: use of
+ unknown builtin '__builtin_preserve_access_index'"
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This issue does not exist on Oracle Focal 5.4.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: ubuntu_bpf failed to build on B-5.4 GCP/Oracle/Azure with "error: use of unknown builtin '__builtin_preserve_access_index'"

Spotted on Bionic 5.4 Azure.

summary: - ubuntu_bpf failed to build on B-5.4 GCP/Oracle with "error: use of
+ ubuntu_bpf failed to build on B-5.4 GCP/Oracle/Azure with "error: use of
unknown builtin '__builtin_preserve_access_index'"
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This issue can be found on B-5.4 generic kernel as well.

It looks like with clang-9 and llvm-9 installed, the test can be built and tested.

export CLANG=clang-9
export LLC=llc-9
export LLVM_OBJCOPY=llvm-objcopy-9
export LLVM_READELF=llvm-readelf-9

Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This is affecting the net test build in ubuntu_kernel_selftests as well.

Po-Hsu Lin (cypressyew)
summary: - ubuntu_bpf failed to build on B-5.4 GCP/Oracle/Azure with "error: use of
- unknown builtin '__builtin_preserve_access_index'"
+ ubuntu_bpf / net test in ubuntu_kernel_selftests failed to build on
+ B-5.4 GCP/Oracle/Azure with "error: use of unknown builtin
+ '__builtin_preserve_access_index'"
summary: ubuntu_bpf / net test in ubuntu_kernel_selftests failed to build on
- B-5.4 GCP/Oracle/Azure with "error: use of unknown builtin
+ B-5.4 with "error: use of unknown builtin
'__builtin_preserve_access_index'"
Changed in linux-gcp-5.4 (Ubuntu):
status: New → Invalid
Changed in ubuntu-kernel-tests:
status: Triaged → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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