Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 804181

Summary: sci-libs/rocBLAS-4.0.0-r2::science fails to build using cmake-3.21
Product: Gentoo Linux Reporter: Yiyang Wu <xgreenlandforwyy>
Component: OverlaysAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal CC: jstein
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/22065
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log about encountering the first error
build.log about encountering the second error

Description Yiyang Wu 2021-07-25 14:27:01 UTC
Using cmake-3.21 fails to configure rocBLAS-4.0.0-r2 with at least two errors. Cmake-3.20 have no such problems. See details for build.log.

Reproducible: Always

Steps to Reproduce:
1. Install cmake-3.21.0
2. emerge sci-libs/rocBLAS-4.0.0-r2 in science-overlay
3.
Actual Results:  
Fail to configure, have two errors:

=== the first one ===
RegularExpression::compile(): ?+* follows nothing.
RegularExpression::compile(): Error in compile.
CMake Error at library/CMakeLists.txt:138 (elseif):
  given arguments:

    "HIP_RUNTIME" "MATCHES" "*cuda*"

  Regular expression "*cuda*" cannot compile


=== the second one ===
-- Configuring done
CMake Error at library/src/CMakeLists.txt:317 (add_library):
  Target "rocblas" links to target "hip::device" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Comment 1 Yiyang Wu 2021-07-25 14:29:54 UTC
Portage 3.0.20 (python 3.8.9-final-0, default/linux/amd64/17.1/no-multilib/prefix/kernel-3.2+, gcc-11.1.0, glibc-2.33, 5.13.3+ x86_64)
=================================================================
System uname: Linux-5.13.3+-x86_64-AMD_Ryzen_7_5800X_8-Core_Processor-with-glibc2.2.5
KiB Mem:    65778768 total,  16551560 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: 7eb600250945b224bbacac26cab43ae29e215a5d

Head commit of repository spark-overlay: b6645bae564c1f809b13dbb49cda5f43d74b9336

sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p3) 2.36.1
distcc 3.3.5 x86_64-pc-linux-gnu [disabled]
ccache version 4.3 [disabled]
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          3.8.9::gentoo, 3.9.5::gentoo
dev-lang/rust-bin:        1.53.0::gentoo
dev-util/ccache:          4.3-r2::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/openrc:          0.43.3::gentoo
sys-apps/sandbox:         2.22::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo, 2.36.1-r1::gentoo
sys-devel/gcc:            10.3.0-r2::gentoo, 11.1.0-r2::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /srv/gentoo-portage
    sync-type: git
    sync-uri: https://gitweb.gentoo.org/repo/gentoo.git
    priority: -1000

jinping
    location: /srv/JPOverlay
    masters: gentoo

local
    location: /srv/gentoo-localrepo
    masters: gentoo

pypi-sci
    location: /srv/gentoo-pypi-sci
    masters: gentoo

spark-overlay
    location: /srv/spark-overlay
    sync-type: git
    sync-uri: git@github.com:6-6-6/spark-overlay.git
    masters: gentoo

science
    location: /srv/gentoo-science-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/gentoo/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.6/conf /usr/share/maven-bin-3.8/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /opt/gentoo/etc/env.d /opt/gentoo/etc/gentoo-release"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
DISTDIR="/srv/gentoo-distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors4.tuna.tsinghua.edu.cn/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j16 -l8"
PKGDIR="/opt/gentoo/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/opt/gentoo/"
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="/tmp"
USE="acl alsa amd64 bzip2 cli crypt dri elogind eselect-ldso fortran gdbm iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pcre prefix readline seccomp split-usr ssl tcpd unicode zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 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-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9 python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 2 Yiyang Wu 2021-07-25 14:31:55 UTC
Created attachment 726928 [details]
build.log about encountering the first error
Comment 3 Yiyang Wu 2021-07-25 14:35:17 UTC
Created attachment 726931 [details]
build.log about encountering the second error

After a modification to ${S}/library/CMakeLists.txt: sed 's/\*cuda\*/cuda/' -i ${S}/library/CMakeLists.txt, the first error is gone and the second error occured
Comment 4 Larry the Git Cow gentoo-dev 2021-08-27 07:33:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/sci.git/commit/?id=3e457521cda2179e533d4f582134b67d972653c9

commit 3e457521cda2179e533d4f582134b67d972653c9
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-08-27 07:32:13 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-08-27 07:33:14 +0000

    sci-libs/rocBLAS: landed to ::gentoo.
    
    Bug: https://bugs.gentoo.org/732952
    Bug: https://bugs.gentoo.org/804181
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocBLAS/Manifest                          |   3 -
 .../files/Tensile-4.0.0-locate-commands.patch      |  32 ------
 .../files/Tensile-4.1.0-output-EnabledISA.patch    |  65 -----------
 .../files/Tensile-4.1.0-output-commands.patch      |  36 -------
 .../files/rocBLAS-4.0.0-use-system-tensile.patch   |  30 ------
 .../files/rocBLAS-4.1.0-fix-Ninja-build.patch      |  24 -----
 .../rocBLAS-4.1.0-fix-glibc-2.32-and-above.patch   |  25 -----
 .../files/rocBLAS-4.1.0-link-system-blas.patch     |  42 --------
 sci-libs/rocBLAS/metadata.xml                      |  15 ---
 sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild           |  88 ---------------
 sci-libs/rocBLAS/rocBLAS-4.0.0-r2.ebuild           |  76 -------------
 sci-libs/rocBLAS/rocBLAS-4.1.0.ebuild              | 120 ---------------------
 12 files changed, 556 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2021-08-27 11:53:05 UTC
The bug has been closed via the following commit(s):

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

commit 6347499d4e8375f342b9f71a003ad4d757ab0eac
Author:     YiyangWu <xgreenlandforwyy@gmail.com>
AuthorDate: 2021-08-21 13:53:18 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-08-27 11:51:16 +0000

    sci-libs/rocBLAS: Next generation BLAS implementation for ROCm
    
    Migrated from ::science, rocBLAS is the core math libraries on ROCm platform
    for high performance computing on AMDGPU, dependency of MIOpen.
    
    Current version 4.3.0, support nearly all major AMD GPUs,
    especially for GCN, CDNA and RDNA2 (nightly) cards.
    
    Closes: https://bugs.gentoo.org/732952
    Closes: https://bugs.gentoo.org/804181
    Closes: https://github.com/gentoo/gentoo/pull/22065
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocBLAS/Manifest                          |   2 +
 ...ensile-4.3.0-hsaco-compile-specified-arch.patch |  96 ++++++++++++++
 .../files/Tensile-4.3.0-output-commands.patch      |  23 ++++
 ...-4.3.0-change-default-Tensile-library-dir.patch |  39 ++++++
 .../rocBLAS-4.3.0-fix-glibc-2.32-and-above.patch   |  25 ++++
 .../files/rocBLAS-4.3.0-link-system-blas.patch     |  24 ++++
 sci-libs/rocBLAS/metadata.xml                      |  19 +++
 sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild              | 139 +++++++++++++++++++++
 8 files changed, 367 insertions(+)