Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893602 - dev-libs/rocm-opencl-runtime-5.3.3-r1: Fails to compile: rocvirtual.hpp:27:10: fatal error: hsa.h: No such file or directory
Summary: dev-libs/rocm-opencl-runtime-5.3.3-r1: Fails to compile: rocvirtual.hpp:27:10...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-02-08 11:18 UTC by Elizabeth Doughty
Modified: 2023-02-20 04:33 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log for rocm-opencl-runtime (rocm-opencl-runtime-build.log,62.27 KB, text/plain)
2023-02-08 11:19 UTC, Elizabeth Doughty
Details
Quick fix (quickfix.patch,3.25 KB, patch)
2023-02-08 17:32 UTC, Mike Lothian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elizabeth Doughty 2023-02-08 11:18:29 UTC
When compiling dev-libs/rocm-opencl-runtime-5.3.3-r1, it fails.

Reproducible: Always




emerge --info:
Portage 3.0.43 (python 3.10.9-final-0, default/linux/amd64/17.1/desktop, gcc-12, glibc-2.36-r5, 6.1.9-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.1.9-gentoo-x86_64-x86_64-AMD_Ryzen_7_5800H_with_Radeon_Graphics-with-glibc2.36
KiB Mem:    15696168 total,   5912092 free
KiB Swap:   16777212 total,  16776956 free
Timestamp of repository gentoo: Wed, 08 Feb 2023 10:30:01 +0000
Head commit of repository gentoo: 82f5561fb361e6eb06b7a9d97822790a14764c4c
Timestamp of repository guru: Tue, 07 Feb 2023 14:47:43 +0000
Head commit of repository guru: 60e31ab53a85e9fa1e642716c5dd3118bc1c894a

Timestamp of repository haskell: Tue, 07 Feb 2023 14:47:29 +0000
Head commit of repository haskell: 30db10bd9e0afb85d7c70e3d0e900eb5d79807cc

Timestamp of repository pentoo: Tue, 07 Feb 2023 14:47:31 +0000
Head commit of repository pentoo: 3978008bc14bd5b1644f73315fcb2d10236a7ca5

Timestamp of repository steam-overlay: Tue, 07 Feb 2023 14:47:33 +0000
Head commit of repository steam-overlay: 8121a25bc99056e35ab2dd7924bb01ad8f80df8d

Timestamp of repository wayland-desktop: Tue, 07 Feb 2023 14:47:48 +0000
Head commit of repository wayland-desktop: d49663179742a6d093f5a95ae53f83b43ada5dbc

sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.10.9-r1::gentoo, 3.11.1-r1::gentoo
dev-lang/rust-bin:         1.66.1::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            0.64.1::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/openrc:           0.45.2-r2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           15.0.7-r1::gentoo
sys-devel/gcc:             11.3.1_p20230120-r1::gentoo, 12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: True

haskell
    location: /var/db/repos/haskell
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/haskell.git
    masters: gentoo
    volatile: True

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    volatile: True

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: True

wayland-desktop
    location: /var/db/repos/wayland-desktop
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git
    masters: gentoo
    volatile: True

thymelizabeth
    location: /var/db/repos/thymelizabeth
    masters: gentoo
    priority: 100
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="http://mirror.aarnet.edu.au/pub/gentoo/ http://ftp.swin.edu.au/gentoo http://mirror.lagoon.nc/gentoo/ https://mirror.aarnet.edu.au/pub/gentoo/ https://mirror.lagoon.nc/gentoo/"
LANG="mi_NZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j16"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/zsh"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cjk cli crypt cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gnome-keyring gpm gtk gui iconv icu idn ipv6 jpeg lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf pipewire png policykit ppds pulseaudio qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb v4l vaapi vdpau verify-sig vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xv xvid zlib zsh-completions" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Elizabeth Doughty 2023-02-08 11:19:06 UTC
Created attachment 850156 [details]
Build log for rocm-opencl-runtime
Comment 2 peter@prh.myzen.co.uk 2023-02-08 16:08:44 UTC
I get the same failure.
Comment 3 Mike Lothian 2023-02-08 17:32:13 UTC
/usr/include/hsa needs to be added somewhere

I wrote a patch to manually add the hsa/ directory where needed
Comment 4 Mike Lothian 2023-02-08 17:32:34 UTC
Created attachment 850188 [details, diff]
Quick fix
Comment 5 Nick 2023-02-09 14:52:25 UTC
I have the same issue.
Comment 6 peter@prh.myzen.co.uk 2023-02-09 16:39:05 UTC
(In reply to Mike Lothian from comment #4)
> Created attachment 850188 [details, diff] [details, diff]
> Quick fix

How is this to be applied? I tried dropping it into /etc/portage/patches/dev-libs/rocm-opencl-runtime/ but I got patch errors. The first was:

===============

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/device/rocm/roccounters.hpp b/device/rocm/roccounters.hpp
|index ffc9fad..45ebbe6 100644
|--- a/device/rocm/roccounters.hpp
|+++ b/device/rocm/roccounters.hpp
--------------------------

===============

Several more like that.
Comment 7 Larry the Git Cow gentoo-dev 2023-02-09 20:20:59 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61a151872957434dc76802939e52cf325f23bc31

commit 61a151872957434dc76802939e52cf325f23bc31
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-09 20:20:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-09 20:20:35 +0000

    dev-libs/rocm-opencl-runtime: restore 5.3.3
    
    Fished out of 154ece10a9374160e04dc82f3dd3a46548cd1c0f.
    
    Bug: https://bugs.gentoo.org/893602
    Signed-off-by: Sam James <sam@gentoo.org>

 .../rocm-opencl-runtime-5.3.3.ebuild               | 122 +++++++++++++++++++++
 1 file changed, 122 insertions(+)
Comment 8 Yiyang Wu 2023-02-10 03:10:09 UTC
(In reply to Larry the Git Cow from comment #7)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=61a151872957434dc76802939e52cf325f23bc31
> 
> commit 61a151872957434dc76802939e52cf325f23bc31
> Author:     Sam James <sam@gentoo.org>
> AuthorDate: 2023-02-09 20:20:30 +0000
> Commit:     Sam James <sam@gentoo.org>
> CommitDate: 2023-02-09 20:20:35 +0000
> 
>     dev-libs/rocm-opencl-runtime: restore 5.3.3
>     
>     Fished out of 154ece10a9374160e04dc82f3dd3a46548cd1c0f.
>     
>     Bug: https://bugs.gentoo.org/893602
>     Signed-off-by: Sam James <sam@gentoo.org>
> 
>  .../rocm-opencl-runtime-5.3.3.ebuild               | 122
> +++++++++++++++++++++
>  1 file changed, 122 insertions(+)

This does not help. The bug is introduced by bbff88f734f62381b0a0624b4b2d182a8d4b8589 (dev-libs/rocr-runtime: disable non-FHS install), but apparently rocclr is not prepared for standard install location. I'll back-port a patch from upstream to fix this.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-10 03:39:46 UTC
(In reply to Yiyang Wu from comment #8)
> This does not help. The bug is introduced by
> bbff88f734f62381b0a0624b4b2d182a8d4b8589 (dev-libs/rocr-runtime: disable
> non-FHS install), but apparently rocclr is not prepared for standard install
> location. I'll back-port a patch from upstream to fix this.

Ah, thanks.
Comment 10 Larry the Git Cow gentoo-dev 2023-02-10 04:26:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=794758cd9e9393bccfddf89d160810220a5913df

commit 794758cd9e9393bccfddf89d160810220a5913df
Author:     Yiyang Wu <xgreenlandforwyy@gmail.com>
AuthorDate: 2023-02-10 03:53:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-10 04:25:42 +0000

    dev-libs/rocm-opencl-runtime: fix rocclr compile issue
    
    Due to bbff88f734f62381b0a0624b4b2d182a8d4b8589, /usr/include/hsa.h is
    gone, so backport patch for rocclr to fix compile error.
    
    Also remove the unused prefix.eclass inherit
    
    Closes: https://bugs.gentoo.org/893602
    Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/rocclr-5.3.3-fix-include.patch           | 218 +++++++++++++++++++++
 .../rocm-opencl-runtime-5.3.3-r1.ebuild            |   3 +-
 .../rocm-opencl-runtime-5.3.3.ebuild               | 122 ------------
 3 files changed, 220 insertions(+), 123 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f98177a3fe2ea8cf1818daec64268f9377176902

commit f98177a3fe2ea8cf1818daec64268f9377176902
Author:     Yiyang Wu <xgreenlandforwyy@gmail.com>
AuthorDate: 2023-02-10 04:00:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-10 04:25:42 +0000

    dev-util/hip: fix rocclr compile issue
    
    Due to bbff88f734f62381b0a0624b4b2d182a8d4b8589, /usr/include/hsa.h is
    gone, so backport patch for rocclr to fix compile error.
    
    Bug: https://bugs.gentoo.org/893602
    Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/29513
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/hip/files/rocclr-5.3.3-fix-include.patch | 218 ++++++++++++++++++++++
 dev-util/hip/hip-5.3.3-r3.ebuild                  |   4 +
 2 files changed, 222 insertions(+)
Comment 11 Larry the Git Cow gentoo-dev 2023-02-20 04:33:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=374c8828b3a2bca0b55ebcce9b5b8b5c710647a1

commit 374c8828b3a2bca0b55ebcce9b5b8b5c710647a1
Author:     Yiyang Wu <xgreenlandforwyy@gmail.com>
AuthorDate: 2023-02-20 02:15:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-20 04:26:02 +0000

    dev-libs/rocm-opencl-runtime: Fix gcc-13 build
    
    Backport two patches for missing includes
    
    Also apply patch for file rocm reorg (hsa/hsa.h) to 5.1.3 ebuild, which
    fix compilation issue
    
    Closes: https://bugs.gentoo.org/895382
    Bug: https://bugs.gentoo.org/893602
    Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/29675
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/rocclr-5.3.3-gcc13.patch                 | 25 ++++++++++++++++++++++
 .../files/rocm-opencl-runtime-5.3.3-gcc13.patch    | 25 ++++++++++++++++++++++
 .../rocm-opencl-runtime-5.1.3.ebuild               |  5 ++++-
 .../rocm-opencl-runtime-5.3.3-r1.ebuild            |  3 +++
 4 files changed, 57 insertions(+), 1 deletion(-)