Your message dated Fri, 13 May 2022 22:49:35 +0000
with message-id <[email protected]>
and subject line Bug#1010467: fixed in llvm-toolchain-14 1:14.0.3-2
has caused the Debian Bug report #1010467,
regarding clang: cannot use hip from /usr
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1010467: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010467
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: clang
Version: 1:13.0-54
Severity: normal

Dear Maintainer,

The upstream versions of clang-13 and clang-14 fulfill the minimum
requirements to build HIP language programs, but contain a bug that
prevents them from functioning correctly when the HIP library is
installed in /usr.

This problem was fixed in upstream llvm, and the change is expected to
land in clang-15. The change is very minimal and only affects the HIP
language. It can be found here:
https://github.com/llvm/llvm-project/commit/6730b44480fcce18bfbbae0c46719250e9eae425

This problem is important to address to help the packaging of ROCm
proceed, as the Debian native package will install HIP into /usr.


To reproduce the problem:

# install HIP to /usr
https://gist.github.com/cgmb/edb7b790ab55681fb2ba5385ee02489b

# create a HIP language program
cat > example.cpp << 'EOF'
#include <hip/hip_runtime.h>

__global__ void square(int *array, int n) {
    int tid = blockIdx.x;
    if (tid < n)
        array[tid] = array[tid] * array[tid];
}
EOF
# compile it
clang++ \
  -v \
  -std=c++11 \
  --offload-arch=gfx908 \
  -mllvm -amdgpu-early-inline-all=true \
  -mllvm -amdgpu-function-calls=false \
  --hip-device-lib-path="/usr/lib/x86_64-linux-gnu/amdgcn/bitcode" \
  --rocm-path="/usr" \
  -fhip-new-launch-api \
  -D__HIP_PLATFORM_AMD__=1 -D__HIP_PLATFORM_HCC__=1 \
  -mf16c \
  -O3 -DNDEBUG \
  -x hip \
  -o example.o \
  -c example.cpp

# see output
Debian clang version 13.0.1-3+b2
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64
Found HIP installation: /usr, version 3.5.0
 "/usr/lib/llvm-13/bin/clang" -cc1 -triple amdgcn-amd-amdhsa -aux-triple 
x86_64-pc-linux-gnu -emit-obj --mrelax-relocations -disable-free 
-disable-llvm-verifier -discard-value-names -main-file-name example.cpp 
-mrelocation-model pic -pic-level 1 -fhalf-no-semantic-interposition 
-mframe-pointer=none -fno-rounding-math -aux-target-cpu x86-64 
-aux-target-feature +f16c -fcuda-is-device -mllvm -amdgpu-internalize-symbols 
-fcuda-allow-variadic-functions -fvisibility hidden 
-fapply-global-visibility-to-externs -mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/hip.bc -mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/ocml.bc -mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/ockl.bc -mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/oclc_daz_opt_off.bc 
-mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/oclc_unsafe_math_off.bc 
-mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/oclc_finite_only_off.bc 
-mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc 
-mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/oclc_wavefrontsize64_on.bc 
-mlink-builtin-bitcode 
/usr/lib/x86_64-linux-gnu/amdgcn/bitcode/oclc_isa_version_908.bc -target-cpu 
gfx908 -debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 
-internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1 -internal-isystem 
/usr/include -D __HIP_PLATFORM_AMD__=1 -D __HIP_PLATFORM_HCC__=1 -D NDEBUG 
-internal-isystem 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11 
-internal-isystem 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11
 -internal-isystem 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/backward 
-internal-isystem 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11 
-internal-isystem 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11
 -internal-isystem 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/backward 
-internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem 
/usr/local/include -internal-isystem 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include 
-internal-externc-isystem /usr/include/x86_64-linux-gnu 
-internal-externc-isystem /include -internal-externc-isystem /usr/include 
-internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem 
/usr/local/include -internal-isystem 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include 
-internal-externc-isystem /usr/include/x86_64-linux-gnu 
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 
-std=c++11 -fdeprecated-macro -fno-autolink -fdebug-compilation-dir=/home/cgmb 
-ferror-limit 19 -fhip-new-launch-api -fgnuc-version=4.2.1 -fcxx-exceptions 
-fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm 
-amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false 
-cuid=9b98635caacf7494 -fcuda-allow-variadic-functions -faddrsig 
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/example-4e3c77.o -x hip example.cpp
clang -cc1 version 13.0.1 based upon LLVM 13.0.1 default target 
x86_64-pc-linux-gnu
ignoring nonexistent directory 
"/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/include"
ignoring nonexistent directory 
"/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/include"
ignoring duplicate directory 
"/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11"
ignoring duplicate directory 
"/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11"
ignoring duplicate directory 
"/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/backward"
ignoring duplicate directory "/usr/include"
ignoring duplicate directory "/usr/lib/llvm-13/lib/clang/13.0.1/include"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
ignoring duplicate directory "/usr/include"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/lib/llvm-13/lib/clang/13.0.1/include"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/llvm-13/lib/clang/13.0.1
 /usr/include
 /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11
 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11
 /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/backward
 /usr/lib/llvm-13/lib/clang/13.0.1/include
 /usr/local/include
 /usr/include/x86_64-linux-gnu
End of search list.
In file included from example.cpp:1:
In file included from /usr/include/hip/hip_runtime.h:62:
In file included from /usr/include/hip/amd_detail/amd_hip_runtime.h:76:
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/cmath:45:15: 
fatal error: 'math.h' file not found
#include_next <math.h>
              ^~~~~~~~
1 error generated when compiling for gfx908.


When the upstream patch
https://github.com/llvm/llvm-project/commit/6730b44480fcce18bfbbae0c46719250e9eae425.patch
is applied, the system headers will no longer be set up in an incorrect
order, and the clang++ build command should succeed.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.13.0-40-generic (SMP w/32 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages clang depends on:
ii  clang-13  1:13.0.1-3+b2

clang recommends no packages.

clang suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: llvm-toolchain-14
Source-Version: 1:14.0.3-2
Done: Sylvestre Ledru <[email protected]>

We believe that the bug you reported is fixed in the latest version of
llvm-toolchain-14, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sylvestre Ledru <[email protected]> (supplier of updated llvm-toolchain-14 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 09 May 2022 20:40:39 +0200
Source: llvm-toolchain-14
Architecture: source
Version: 1:14.0.3-2
Distribution: unstable
Urgency: medium
Maintainer: LLVM Packaging Team <[email protected]>
Changed-By: Sylvestre Ledru <[email protected]>
Closes: 1010467 1010716
Changes:
 llvm-toolchain-14 (1:14.0.3-2) unstable; urgency=medium
 .
   * Fix an autopkgtest on arm (Closes:# 1010716)
     Thanks to Pino Toscano for the patch
   * Fix the search path for hip (Closes: #1010467)
   * Add the option -DLLVM_ENABLE_CURL=ON
     See https://github.com/llvm/llvm-project/issues/55289
     (LP: #1971743)
Checksums-Sha1:
 48505d29042b2f3144b1414cb00a3c85381ff463 6909 llvm-toolchain-14_14.0.3-2.dsc
 e371c6e3d88cbab71e76ca98214f13dfabd2bcef 152664 
llvm-toolchain-14_14.0.3-2.debian.tar.xz
 5927cab4f97b58ba0a4888f30af42aa874236f5c 31178 
llvm-toolchain-14_14.0.3-2_amd64.buildinfo
Checksums-Sha256:
 dc59ae15b4c4124e8fbeef8bbfe1e12d906c1752783fa9afbbe8737a5ebfe860 6909 
llvm-toolchain-14_14.0.3-2.dsc
 b1a34dcadefb5d7241d75f6d6fbe8ff486b26a4780667e62be5e6261d3704b47 152664 
llvm-toolchain-14_14.0.3-2.debian.tar.xz
 095d8a570526385c7d141213d8b83fb1ebeba01314bc6ab116cb77ea55322c12 31178 
llvm-toolchain-14_14.0.3-2_amd64.buildinfo
Files:
 4b2bea5c19dea3ec6f0a56b22e3c99b6 6909 devel optional 
llvm-toolchain-14_14.0.3-2.dsc
 6aff62b84b2d0a365b2e7354d4fdf8ed 152664 devel optional 
llvm-toolchain-14_14.0.3-2.debian.tar.xz
 5a2805d79b0d32ecec5a95e8fab99cfd 31178 devel optional 
llvm-toolchain-14_14.0.3-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEtg21mU05vsTRqVzPfmUo2nUvG+EFAmJ+3FgACgkQfmUo2nUv
G+FeXw//Y454LRKrabRA0saBLpw+uKTuDXLeaqxjjSbGD9YDGuuv8vfoN1X4xhMf
nATJpeinDKsemqulsbolsfcTFWmJFqUHhmHp9jJheSuajLIOCrTpk6EEd3sHdqSg
NHuG1QxC6reUOZi7giAFkHZEq3C09jnSWVxRaWu+nHIsfuQ3p3fwp66GQAx/brsr
JqEtsf/umVuUn4+mVoLTDbhgL7sYCfVWSbeSBL/Bf8dXH6h/DVtnSuJiy2RK5pfp
LYUq181LOZobkqJllMebOTnkHx9VYsYM9j07DZFLGsGPhPMU0ANW+a9FdqZwNSe6
LLU5J+QuQJ+A7WK4thEtevYmU9n+tDx8YDXt8Mh1KBtRAWu2phA9vZnigf35gkuJ
4ht6hBjqcpTMwNno70J2i/92cekzXhOK+m1y1DD7MnLtvSGQv/S+p2bS8ECsHye7
dbLSQYezFb9YkD3BYn/Qc0c8zJsVywd8UJ/LmEhvtBV+hMmhBbGeqF8xPBZLfkU3
53KVVzZw8NXybc9FlSgapGA1fn59Vm0R81lxCpS0YZg0QcUn3Cic0KyhWLcs9ZjY
2pBAE0MvGxA3j6kSbwahm1rKT87n7rtbQeva6Uv6T2twArtbbma9A7iWeqJGODj4
gSeCF4+Vra3aOViPiboDqjyLUwBy81traSRroHKN/zMDwVDjpTQ=
=j5R4
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to