Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Clang :: Driver/rocm-detect.hip' fails on Gentoo #50746

Closed
llvmbot opened this issue Aug 7, 2021 · 6 comments
Closed

'Clang :: Driver/rocm-detect.hip' fails on Gentoo #50746

llvmbot opened this issue Aug 7, 2021 · 6 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category

Comments

@llvmbot
Copy link
Member

llvmbot commented Aug 7, 2021

Bugzilla Link 51404
Resolution FIXED
Resolved on Oct 20, 2021 20:51
Version unspecified
OS Linux
Blocks #51489
Reporter LLVM Bugzilla Contributor
CC @zygoloid,@tstellar,@yxsamliu
Fixed by commit(s) 1439df0 0a5ae01

Extended Description

If I'm not mistaken, the test fails due to hardcoding bad assumptions about clang's resource dir.

Our resource dir is specified as:

-DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"

The relevant FileCheck output is:

  • : 'RUN: at line 44'
  • /usr/lib/llvm/13/bin/FileCheck -check-prefixes=SPACK /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/clang/test/Driver/rocm-detect.hip
  • /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86/test/Driver/Output/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang -### -v -target x86_64-linux-gnu --cuda-gpu-arch=gfx900 --print-rocm-search-dirs /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/clang/test/Driver/rocm-detect.hip
    /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/clang/test/Driver/rocm-detect.hip:86:11: error: SPACK: expected string not found in input
    // SPACK: ROCm installation search path: [[CLANG]]/{{(llvm/)?}}lib{{[0-9]*}}/clang/{{[0-9.]+}}
    ^
    :3:187: note: scanning from here
    ROCm installation search path: /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86/test/Driver/Output/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z
    ^
    :3:187: note: with "CLANG" equal to "/var/tmp/portage/sys-devel/clang-13\.0\.0\.9999/work/x/y/clang-abi_x86_32\.x86"
    ROCm installation search path: /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86/test/Driver/Output/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z
    ^
    :4:1: note: possible intended match here
    ROCm installation search path: /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86
    ^

Input file:
Check file: /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/clang/test/Driver/rocm-detect.hip

-dump-input=help explains the following input dump.

Input was:
<<<<<<
1: ROCm installation search path (Spack 4.0.0): /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86/test/Driver/Output/rocm-spack
2: ROCm installation search path: /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86
3: ROCm installation search path: /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86/test/Driver/Output/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z
check:86'0 X error: no match found
check:86'1 with "CLANG" equal to "/var/tmp/portage/sys-devel/clang-13\.0\.0\.9999/work/x/y/clang-abi_x86_32\.x86"
4: ROCm installation search path: /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86
check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:86'2 ? possible intended match
5: ROCm installation search path: /var/tmp/portage/sys-devel/clang-13.0.0.9999/work/x/y/clang-abi_x86_32.x86/bin/../../../../lib/clang/13.0.0
check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6: ROCm installation search path: /opt/rocm
check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7: clang version 13.0.0
check:86'0 ~~~~~~~~~~~~~~~~~~~~~
8: Target: x86_64-unknown-linux-gnu
check:86'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9: Thread model: posix
check:86'0 ~~~~~~~~~~~~~~~~~~~~
.
.
.

@llvmbot
Copy link
Member Author

llvmbot commented Aug 7, 2021

assigned to @yxsamliu

@yxsamliu
Copy link
Collaborator

I have a fix

https://reviews.llvm.org/D111726

@yxsamliu
Copy link
Collaborator

fix committed to trunk by 1439df0

@llvmbot
Copy link
Member Author

llvmbot commented Oct 13, 2021

Please keep the bug open for 13.x backport.

@tstellar
Copy link
Collaborator

Merged: 0a5ae01

@tstellar
Copy link
Collaborator

mentioned in issue #51489

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

3 participants