Bug 261921 - devel/llvm14: fails check-plist on aarch64
Summary: devel/llvm14: fails check-plist on aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords: needs-patch
Depends on: 258706
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-13 08:09 UTC by Jan Beich
Modified: 2022-03-08 20:56 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2022-02-13 08:09:24 UTC
$ poudriere testport -j 130aarch64 devel/llvm14
[...]
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx1010.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx1030.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx1031.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx700.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx701.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx801.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx803.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx900.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx902.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx906.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx908.bc
Error: Orphaned: llvm14/lib/libomptarget-new-amdgpu-gfx90a.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_35.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_37.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_50.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_52.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_53.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_60.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_61.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_62.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_70.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_72.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_75.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_80.bc
Error: Orphaned: llvm14/lib/libomptarget-new-nvptx-sm_86.bc
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1
Comment 1 Brooks Davis freebsd_committer freebsd_triage 2022-02-14 19:15:28 UTC
It looks like these are getting built on aarch64 and not amd64 due to questionable decisions in the libomptarget infrastructure. Specifically they seem to be keying off CMAKE_HOST_SYSTEM_PROCESSOR which is amd64 on FreeBSD amd64 and comparing against x86_64, powerpc64le, and aarch64.

I think the easiest solution is to disable these universally. It appears the way to do that is adding -DLIBOMPTARGET_BUILD_DEVICERTL_BCLIB=OFF to the cmake argument list. I'm testing a build now in amd64 and will commit if it doesn't have unexpected side effects.
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-02-14 19:48:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ab8ff741d75ac417683e687e70e694725fd94038

commit ab8ff741d75ac417683e687e70e694725fd94038
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-02-14 19:48:17 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-02-14 19:48:17 +0000

    devel/llvm14: disable OpenMP DeviceRtl

    For reasons that are not fully explored builds on aarch64 (and maybe
    powerpc64le), but not amd64. The generated bitcode targets Linux ABIs
    and seems unlikely to work in practice so just turn it off rather than
    handlng plist differences on aarch64.

    PR:             261921
    Reported by:    jbeich

 devel/llvm14/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 3 Brooks Davis freebsd_committer freebsd_triage 2022-02-17 19:15:18 UTC
I'm unable to test but believe this should be fixed. Please reopen if things are still broken.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-03-08 20:56:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d7120b446433e15d2a14b18f9068d91827fa2247

commit d7120b446433e15d2a14b18f9068d91827fa2247
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-03-08 20:54:28 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-03-08 20:54:28 +0000

    devel/llvm-devel: new snapshot (now LLVM 15)

    Disable OpenMP DeviceRtl.

    PR:             261921

 devel/llvm-devel/Makefile                       |   2 +
 devel/llvm-devel/Makefile.COMMANDS              |   4 +
 devel/llvm-devel/Makefile.snapshot              |   6 +-
 devel/llvm-devel/distinfo                       |   6 +-
 devel/llvm-devel/files/gen-Makefile.snapshot.sh |   2 +-
 devel/llvm-devel/pkg-plist                      | 277 +++++++++++++++++-------
 6 files changed, 209 insertions(+), 88 deletions(-)