justxi / rocm

Ebuilds to install ROCM on Gentoo Linux
38 stars 23 forks source link

Compile errors rocRAND-2.7.0 #68

Closed Lucretia closed 5 years ago

Lucretia commented 5 years ago

Output of emerge --info '=sci-libs/rocRAND-2.7.0-r1::rocm':

Portage 2.3.73 (python 3.7.4-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-9.2.0, glibc-2.29-r4, 5.1.15-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.1.15-gentoo-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    32787752 total,   7073672 free
KiB Swap:   67108860 total,  66535932 free
Timestamp of repository gentoo: Sat, 24 Aug 2019 11:06:26 +0000
Head commit of repository gentoo: 9003c29d132bb02ce7cacfdf08144b6dc6fa35a3

Timestamp of repository poly-c: Sat, 24 Aug 2019 08:05:27 +0000
sh bash 5.0_p9
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p9::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo, 3.7.4-r1::gentoo
dev-util/cmake:           3.15.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r3::gentoo, 2.31.1-r4::gentoo, 2.32-r1::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo, 8.2.0-r6::gentoo, 8.3.0-r1::gentoo, 9.1.0-r1::gentoo, 9.2.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

amd
    location: /home/laguest/src/gentoo-overlays/amd
    masters: gentoo
    priority: 20

fp
    location: /home/laguest/src/gentoo-overlays/fp
    masters: gentoo
    priority: 20

rocm
    location: /home/laguest/src/gentoo-overlays/rocm
    masters: gentoo
    priority: 20

lucretia
    location: /home/laguest/src/gentoo-overlays/lucretia
    masters: gentoo
    priority: 30

audio-overlay
    location: /var/lib/layman/audio-overlay
    sync-type: rsync
    sync-uri: https://github.com/gentoo-audio/audio-overlay.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

bloody
    location: /var/lib/layman/bloody
    sync-type: rsync
    sync-uri: https://github.com/bloodywing/bloody.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

dlang
    location: /var/lib/layman/dlang
    sync-type: rsync
    sync-uri: https://github.com/gentoo/dlang.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

dotnet
    location: /var/lib/layman/dotnet
    sync-type: rsync
    sync-uri: https://github.com/gentoo/dotnet.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

go-overlay
    location: /var/lib/layman/go-overlay
    sync-type: rsync
    sync-uri: https://github.com/Dr-Terrible/go-overlay.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

haskell
    location: /var/lib/layman/haskell
    sync-type: rsync
    sync-uri: https://github.com/gentoo-haskell/gentoo-haskell.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

java
    location: /var/lib/layman/java
    sync-type: rsync
    sync-uri: https://anongit.gentoo.org/git/proj/java.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

kde
    location: /var/lib/layman/kde
    sync-type: rsync
    sync-uri: https://anongit.gentoo.org/git/proj/kde.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

lisp
    location: /var/lib/layman/lisp
    sync-type: rsync
    sync-uri: https://anongit.gentoo.org/git/proj/lisp.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

poly-c
    location: /var/lib/layman/poly-c
    sync-type: rsync
    sync-uri: rsync://rsync.gentoofan.org/poly-c
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

qt
    location: /var/lib/layman/qt
    sync-type: rsync
    sync-uri: https://anongit.gentoo.org/git/proj/qt.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: rsync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50
    sync-rsync-extra-opts: 

4nykey
    location: /var/lib/layman/4nykey
    sync-type: rsync
    sync-uri: https://github.com/4nykey/4nykey.git
    masters: gentoo
    priority: 60
    sync-rsync-extra-opts: 

graphics-tablet
    location: /home/laguest/src/gentoo-overlays/graphics-tablet
    masters: gentoo
    priority: 70

promedia
    location: /home/laguest/src/gentoo-overlays/promedia
    masters: gentoo
    priority: 70

Installed sets: @llvm
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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 ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/ http://mirror.bytemark.co.uk/gentoo/ rsync://mirror.bytemark.co.uk/gentoo/ http://mirrors.evowise.com/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/ ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/ rsync://rsync.mirrorservice.org/distfiles.gentoo.org/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
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"
USE="X a52 aac aacs acl acpi activities ada alsa amd64 amr amrenc appstream berkdb bluetooth bluray branding brightness-control browser-integration bzip2 cairo cdda cdio cdr celt cli collada color-management colorio cpudetection crypt cups cxx dbus declarative display-manager dri dssi dts dvd dvdr elogind emboss encode exif fam fdk ffmpeg fftw flac fontconfig fortran frei0r gdbm gif glamor gpm grub gstreamer gtk gtk2 iconv icu imagemagick ipv6 jack jack-session jpeg kde kipi kvazaar kwallet ladspa lash lcms ldap libilbc libnotify librtmp libsamplerate libsoxr libtirpc libv4l llvm lm_sensors lv2 mad matroska mng modplug mp3 mp4 mpeg mtp multilib musepack ncurses networkmanager nls nptl ocr ogg omxil opencl opencv openexr opengl openh264 openimageio openmp opus osc pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qalculate qml qt5 readline rtaudio rubberband s3tc sasl scanner schroedinger sdk sdl seccomp semantic-desktop spell split-usr ssdm ssl startup-notification svg tcpd theora tiff truetype udev udisks unicode upower usb v4l vaapi vc vdpau vorbis vpx vst vulkan wallpapers wavpack wayland webp widgets wxwidgets x264 x265 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64 32" 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 fma3 f16c fma4 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard libinput mouse wacom" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_6 python3_7" RUBY_TARGETS="ruby24 ruby25 ruby26" SANE_BACKENDS="snapscan" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Output of emerge -pqv '=sci-libs/rocRAND-2.7.0-r1::rocm':

[ebuild  N    ] sci-libs/rocRAND-2.7.0-r1 

build.log:

 * Package:    sci-libs/rocRAND-2.7.0-r1
 * Repository: rocm
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking rocRAND-2.7.0.tar.gz to /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work
>>> Source unpacked in /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work
>>> Preparing source in /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7 ...
 * Applying master-disable2ndfindhcc.patch ...
 [ ok ]
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *  set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Install path prefix, prepend
 *    set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FOR
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7 ...
>>> Working in BUILD_DIR: "/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build"
cmake -C /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DHIP_PLATFORM=hcc -DHIP_ROOT_DIR=/usr/lib/hip -DBUILD_TEST=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_FLAGS:STRING=-I/usr/lib/hcc/2.7/include -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build/gentoo_toolchain.cmake  /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7
loading initial cache file /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build/gentoo_common_config.cmake
CMake Warning (dev) at gentoo_common_config.cmake:8 (SET):
  implicitly converting 'BOOLEAN' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is Clang 9.0.0
-- Check for working CXX compiler: /usr/lib/hcc/2.7/bin/hcc
-- Check for working CXX compiler: /usr/lib/hcc/2.7/bin/hcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:47 (set):
  implicitly converting 'BOOLEAN' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Git: /usr/bin/git (found version "2.23.0") 
-- 
-- ******** Summary ********
-- General:
--   System                : Linux
--   HIP ROOT              : /usr/lib/hip
--   C++ compiler          : /usr/lib/hcc/2.7/bin/hcc
--   C++ compiler version  : 9.0.0
--   CXX flags             : -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra
--   Build type            : Gentoo
--   Install prefix        : /usr
--   Device targets        : gfx803;gfx900;gfx906
-- 
--   BUILD_SHARED_LIBS     : ON
--   BUILD_FORTRAN_WRAPPER : OFF
--   BUILD_TEST            : OFF
--   BUILD_BENCHMARK       : OFF
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               
C++             -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,-O1 -Wl,--as-needed

-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7 ...
>>> Working in BUILD_DIR: "/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build"
ninja -v -j6 -l0
[1/12] /usr/lib/hcc/2.7/bin/hcc    -DNDEBUG -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra   -std=c++11 -MD -MT tools/CMakeFiles/xorwow_precomputed_generator.dir/xorwow_precomputed_generator.cpp.o -MF tools/CMakeFiles/xorwow_precomputed_generator.dir/xorwow_precomputed_generator.cpp.o.d -o tools/CMakeFiles/xorwow_precomputed_generator.dir/xorwow_precomputed_generator.cpp.o -c /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/tools/xorwow_precomputed_generator.cpp
[2/12] : && /usr/lib/hcc/2.7/bin/hcc  -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra  -Wl,-O1 -Wl,--as-needed tools/CMakeFiles/xorwow_precomputed_generator.dir/xorwow_precomputed_generator.cpp.o  -o tools/xorwow_precomputed_generator   && :
[3/12] /usr/lib/hcc/2.7/bin/hcc    -DNDEBUG -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra   -std=c++11 -MD -MT tools/CMakeFiles/sobol_direction_vector_generator.dir/sobol_direction_vector_generator.cpp.o -MF tools/CMakeFiles/sobol_direction_vector_generator.dir/sobol_direction_vector_generator.cpp.o.d -o tools/CMakeFiles/sobol_direction_vector_generator.dir/sobol_direction_vector_generator.cpp.o -c /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/tools/sobol_direction_vector_generator.cpp
[4/12] /usr/lib/hcc/2.7/bin/hcc    -DNDEBUG -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra   -std=c++11 -MD -MT tools/CMakeFiles/mrg32k3a_precomputed_generator.dir/mrg32k3a_precomputed_generator.cpp.o -MF tools/CMakeFiles/mrg32k3a_precomputed_generator.dir/mrg32k3a_precomputed_generator.cpp.o.d -o tools/CMakeFiles/mrg32k3a_precomputed_generator.dir/mrg32k3a_precomputed_generator.cpp.o -c /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/tools/mrg32k3a_precomputed_generator.cpp
[5/12] : && /usr/lib/hcc/2.7/bin/hcc  -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra  -Wl,-O1 -Wl,--as-needed tools/CMakeFiles/sobol_direction_vector_generator.dir/sobol_direction_vector_generator.cpp.o  -o tools/sobol_direction_vector_generator   && :
[6/12] : && /usr/lib/hcc/2.7/bin/hcc  -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra  -Wl,-O1 -Wl,--as-needed tools/CMakeFiles/mrg32k3a_precomputed_generator.dir/mrg32k3a_precomputed_generator.cpp.o  -o tools/mrg32k3a_precomputed_generator   && :
[7/12] /usr/lib/hcc/2.7/bin/hcc -Dhiprand_EXPORTS -Ilibrary/include -I/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/include -isystem /usr/lib/hip/include  -DNDEBUG -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra -fPIC   -std=c++11 -MD -MT library/CMakeFiles/hiprand.dir/src/hiprand/hiprand_hcc.cpp.o -MF library/CMakeFiles/hiprand.dir/src/hiprand/hiprand_hcc.cpp.o.d -o library/CMakeFiles/hiprand.dir/src/hiprand/hiprand_hcc.cpp.o -c /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/src/hiprand/hiprand_hcc.cpp
FAILED: library/CMakeFiles/hiprand.dir/src/hiprand/hiprand_hcc.cpp.o 
/usr/lib/hcc/2.7/bin/hcc -Dhiprand_EXPORTS -Ilibrary/include -I/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/include -isystem /usr/lib/hip/include  -DNDEBUG -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra -fPIC   -std=c++11 -MD -MT library/CMakeFiles/hiprand.dir/src/hiprand/hiprand_hcc.cpp.o -MF library/CMakeFiles/hiprand.dir/src/hiprand/hiprand_hcc.cpp.o.d -o library/CMakeFiles/hiprand.dir/src/hiprand/hiprand_hcc.cpp.o -c /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/src/hiprand/hiprand_hcc.cpp
In file included from /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/src/hiprand/hiprand_hcc.cpp:21:
In file included from /usr/lib/hip/include/hip/hip_runtime.h:56:
In file included from /usr/lib/hip/include/hip/hcc_detail/hip_runtime.h:69:
In file included from /usr/lib/hcc/2.7/include/hc_printf.hpp:13:
In file included from /usr/lib/hcc/2.7/include/hc_am_internal.hpp:3:
In file included from /usr/lib/hcc/2.7/include/hc_am.hpp:3:
In file included from /usr/lib/hcc/2.7/include/hc.hpp:17:
/usr/lib/hcc/2.7/include/kalmar_index.h:42:35: error: expected ';' at end of declaration list
    explicit __index_leaf(int __t) restrict(amp,cpu) : __idx(__t) {}
                                  ^
/usr/lib/hcc/2.7/include/kalmar_index.h:76:17: error: expected ';' at end of declaration list
    index_impl() restrict(amp,cpu) : __index_leaf<N>(0)... {}
                ^
/usr/lib/hcc/2.7/include/kalmar_index.h:150:37: error: expected ';' at end of declaration list
    static inline void set(_Tp& now) restrict(amp,cpu) {
                                    ^
/usr/lib/hcc/2.7/include/kalmar_index.h:166:37: error: expected ';' at end of declaration list
    static inline void set(_Tp& now) restrict(amp,cpu) {
                                    ^
/usr/lib/hcc/2.7/include/kalmar_index.h:180:66: error: expected ';' at end of declaration list
    static bool inline contains(const _Tp1& idx, const _Tp2& ext) restrict(amp,cpu) {
                                                                 ^
/usr/lib/hcc/2.7/include/kalmar_index.h:201:66: error: expected ';' at end of declaration list
    static bool inline contains(const _Tp1& idx, const _Tp2& ext) restrict(amp,cpu) {
                                                                 ^
/usr/lib/hcc/2.7/include/kalmar_index.h:242:12: error: expected ';' at end of declaration list
    index() restrict(amp,cpu) : base_() {
           ^
/usr/lib/hcc/2.7/include/kalmar_index.h:253:30: error: expected ';' at end of declaration list
    index(const index& other) restrict(amp,cpu)
                             ^
/usr/lib/hcc/2.7/include/kalmar_index.h:446:5: error: unknown type name 'base'
    base base_;
    ^
/usr/lib/hcc/2.7/include/kalmar_index.h:454:33: error: expected ';' at end of declaration list
    void __cxxamp_opencl_index() restrict(amp,cpu)
                                ^
/usr/lib/hcc/2.7/include/kalmar_index.h:492:61: error: expected ';' at end of declaration
index<N> operator+(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                            ^
/usr/lib/hcc/2.7/include/kalmar_index.h:492:71: error: unknown type name 'amp'
index<N> operator+(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                                      ^
/usr/lib/hcc/2.7/include/kalmar_index.h:492:75: error: unknown type name 'cpu'
index<N> operator+(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                                          ^
/usr/lib/hcc/2.7/include/kalmar_index.h:492:62: error: C++ requires a type specifier for all declarations
index<N> operator+(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                             ^
/usr/lib/hcc/2.7/include/kalmar_index.h:493:11: error: use of undeclared identifier 'N'
    index<N> __r = lhs;
          ^
/usr/lib/hcc/2.7/include/kalmar_index.h:494:5: error: use of undeclared identifier '__r'
    __r += rhs;
    ^
/usr/lib/hcc/2.7/include/kalmar_index.h:494:12: error: use of undeclared identifier 'rhs'
    __r += rhs;
           ^
/usr/lib/hcc/2.7/include/kalmar_index.h:495:12: error: use of undeclared identifier '__r'
    return __r;
           ^
/usr/lib/hcc/2.7/include/kalmar_index.h:498:61: error: expected ';' at end of declaration
index<N> operator-(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[8/12] /usr/lib/hcc/2.7/bin/hcc -Drocrand_EXPORTS -Ilibrary/include -I/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/include -isystem /usr/lib/hip/include  -DNDEBUG -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra -fPIC   -std=c++11 -MD -MT library/CMakeFiles/rocrand.dir/src/rocrand.cpp.o -MF library/CMakeFiles/rocrand.dir/src/rocrand.cpp.o.d -o library/CMakeFiles/rocrand.dir/src/rocrand.cpp.o -c /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/src/rocrand.cpp
FAILED: library/CMakeFiles/rocrand.dir/src/rocrand.cpp.o 
/usr/lib/hcc/2.7/bin/hcc -Drocrand_EXPORTS -Ilibrary/include -I/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/include -isystem /usr/lib/hip/include  -DNDEBUG -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra -fPIC   -std=c++11 -MD -MT library/CMakeFiles/rocrand.dir/src/rocrand.cpp.o -MF library/CMakeFiles/rocrand.dir/src/rocrand.cpp.o.d -o library/CMakeFiles/rocrand.dir/src/rocrand.cpp.o -c /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/src/rocrand.cpp
In file included from /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7/library/src/rocrand.cpp:21:
In file included from /usr/lib/hip/include/hip/hip_runtime.h:56:
In file included from /usr/lib/hip/include/hip/hcc_detail/hip_runtime.h:69:
In file included from /usr/lib/hcc/2.7/include/hc_printf.hpp:13:
In file included from /usr/lib/hcc/2.7/include/hc_am_internal.hpp:3:
In file included from /usr/lib/hcc/2.7/include/hc_am.hpp:3:
In file included from /usr/lib/hcc/2.7/include/hc.hpp:17:
/usr/lib/hcc/2.7/include/kalmar_index.h:42:35: error: expected ';' at end of declaration list
    explicit __index_leaf(int __t) restrict(amp,cpu) : __idx(__t) {}
                                  ^
/usr/lib/hcc/2.7/include/kalmar_index.h:76:17: error: expected ';' at end of declaration list
    index_impl() restrict(amp,cpu) : __index_leaf<N>(0)... {}
                ^
/usr/lib/hcc/2.7/include/kalmar_index.h:150:37: error: expected ';' at end of declaration list
    static inline void set(_Tp& now) restrict(amp,cpu) {
                                    ^
/usr/lib/hcc/2.7/include/kalmar_index.h:166:37: error: expected ';' at end of declaration list
    static inline void set(_Tp& now) restrict(amp,cpu) {
                                    ^
/usr/lib/hcc/2.7/include/kalmar_index.h:180:66: error: expected ';' at end of declaration list
    static bool inline contains(const _Tp1& idx, const _Tp2& ext) restrict(amp,cpu) {
                                                                 ^
/usr/lib/hcc/2.7/include/kalmar_index.h:201:66: error: expected ';' at end of declaration list
    static bool inline contains(const _Tp1& idx, const _Tp2& ext) restrict(amp,cpu) {
                                                                 ^
/usr/lib/hcc/2.7/include/kalmar_index.h:242:12: error: expected ';' at end of declaration list
    index() restrict(amp,cpu) : base_() {
           ^
/usr/lib/hcc/2.7/include/kalmar_index.h:253:30: error: expected ';' at end of declaration list
    index(const index& other) restrict(amp,cpu)
                             ^
/usr/lib/hcc/2.7/include/kalmar_index.h:446:5: error: unknown type name 'base'
    base base_;
    ^
/usr/lib/hcc/2.7/include/kalmar_index.h:454:33: error: expected ';' at end of declaration list
    void __cxxamp_opencl_index() restrict(amp,cpu)
                                ^
/usr/lib/hcc/2.7/include/kalmar_index.h:492:61: error: expected ';' at end of declaration
index<N> operator+(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                            ^
/usr/lib/hcc/2.7/include/kalmar_index.h:492:71: error: unknown type name 'amp'
index<N> operator+(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                                      ^
/usr/lib/hcc/2.7/include/kalmar_index.h:492:75: error: unknown type name 'cpu'
index<N> operator+(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                                          ^
/usr/lib/hcc/2.7/include/kalmar_index.h:492:62: error: C++ requires a type specifier for all declarations
index<N> operator+(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                             ^
/usr/lib/hcc/2.7/include/kalmar_index.h:493:11: error: use of undeclared identifier 'N'
    index<N> __r = lhs;
          ^
/usr/lib/hcc/2.7/include/kalmar_index.h:494:5: error: use of undeclared identifier '__r'
    __r += rhs;
    ^
/usr/lib/hcc/2.7/include/kalmar_index.h:494:12: error: use of undeclared identifier 'rhs'
    __r += rhs;
           ^
/usr/lib/hcc/2.7/include/kalmar_index.h:495:12: error: use of undeclared identifier '__r'
    return __r;
           ^
/usr/lib/hcc/2.7/include/kalmar_index.h:498:61: error: expected ';' at end of declaration
index<N> operator-(const index<N>& lhs, const index<N>& rhs) restrict(amp,cpu) {
                                                            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.
 * ERROR: sci-libs/rocRAND-2.7.0-r1::rocm failed (compile phase):
 *   ninja -v -j6 -l0 failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 2025:  Called cmake-utils_src_compile
 *   environment, line  714:  Called cmake-utils_src_make
 *   environment, line  895:  Called _cmake_ninja_src_make
 *   environment, line  449:  Called eninja
 *   environment, line 1194:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
 * 
 * If you need support, post the output of `emerge --info '=sci-libs/rocRAND-2.7.0-r1::rocm'`,
 * the complete build log and the output of `emerge -pqv '=sci-libs/rocRAND-2.7.0-r1::rocm'`.
 * The complete build log is located at '/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build'
 * S: '/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7'
justxi commented 5 years ago

I have the same error. But I am sure that it worked. Which version of the hip ebuild are you using?

Lucretia commented 5 years ago

How can it have worked if you get the same error?

I am using =sys-devel/hip-2.7.0

justxi commented 5 years ago

I currently have a lot of experimental ebuilds installed. I will try to test it with the original ebuilds of 2.7 version of hip, llvm-roc, etc.

Lucretia commented 5 years ago

I currently have the following USE flags on hip, hipify llvm-roc-backend -debug -hcc-backend, I don't know if that would cause this issue.

justxi commented 5 years ago

You could build with hcc-backend and check if this changes something. I think that I built first with "hcc-backend" and build the sci-libs with it. Then for testing something else I built with "llvm-rocm-backend".

Lucretia commented 5 years ago

No, that didn't work at all.

>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7 ...
>>> Working in BUILD_DIR: "/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build"
cmake -C /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DHIP_PLATFORM=hcc -DHIP_ROOT_DIR=/usr/lib/hip -DBUILD_TEST=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_FLAGS:STRING=-I/usr/lib/hcc/2.7/include -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build/gentoo_toolchain.cmake  /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-rocm-2.7
loading initial cache file /var/tmp/portage/sci-libs/rocRAND-2.7.0-r1/work/rocRAND-2.7.0_build/gentoo_common_config.cmake
CMake Warning (dev) at gentoo_common_config.cmake:8 (SET):
  implicitly converting 'BOOLEAN' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is Clang 9.0.0
-- Check for working CXX compiler: /usr/lib/hcc/2.7/bin/hcc
-- Check for working CXX compiler: /usr/lib/hcc/2.7/bin/hcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:47 (set):
  implicitly converting 'BOOLEAN' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PkgConfig: x86_64-pc-linux-gnu-pkg-config (found version "0.29.2") 
CMake Error at /usr/lib/hcc/2.7/lib/cmake/hcc/hcc-config.cmake:51 (add_library):
  add_library cannot create imported target "hsa-runtime64" because another
  target with the same name already exists.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /usr/lib/hip/lib/cmake/hip/hip-config.cmake:87 (find_dependency)
  cmake/VerifyCompiler.cmake:42 (find_package)
  CMakeLists.txt:50 (include)

-- Found Git: /usr/bin/git (found version "2.23.0") 
-- 
-- ******** Summary ********
-- General:
--   System                : Linux
--   HIP ROOT              : /usr/lib/hip
--   C++ compiler          : /usr/lib/hcc/2.7/bin/hcc
--   C++ compiler version  : 9.0.0
--   CXX flags             : -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra
--   Build type            : Gentoo
--   Install prefix        : /usr
--   Device targets        : gfx803;gfx900;gfx906
-- 
--   BUILD_SHARED_LIBS     : ON
--   BUILD_FORTRAN_WRAPPER : OFF
--   BUILD_TEST            : OFF
--   BUILD_BENCHMARK       : OFF
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               
C++             -I/usr/lib/hcc/2.7/include -Wno-unused-command-line-argument -Wall -Wextra
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,-O1 -Wl,--as-needed

-- Configuring incomplete, errors occurred!
justxi commented 5 years ago

This is a different error... Is the patch applied succesfully?

Lucretia commented 5 years ago

I know it's different, I've no idea what it means.

My source matches up to latest here.

justxi commented 5 years ago

As expected, interestingly... on a second system with the following packages, rocRAND builds and installs:

dev-util/rocm-cmake-2.7.0 dev-libs/roct-thunk-interface-2.7.0 dev-libs/rocr-runtime-2.7.0 -nonfree dev-libs/rocm-opencl-driver-2.7.0 -test dev-util/rocminfo-2.7.0

dev-libs/rocm-device-libs-9999 [1] (!) dev-libs/rocm-comgr-2.7.9999 [1] (!) sys-devel/llvm-roc-2.7.9999 -debug [1] (!)

sys-devel/hcc-2.7.0 -debug [1] sys-devel/hip-2.7.9999-r100 hcc-backend hipify -debug -llvm-roc-backend [1] sci-libs/rocRAND-2.7.0-r1 [1]

[1] rocm overlay

Those marked with a (!) have no well-defined commitid or package version.

Lucretia commented 5 years ago

Fails for me. I removed all previously installed packages and did: emerge -NDav --verbose-conflicts --tree =dev-util/rocm-cmake-2.7.0 =dev-libs/roct-thunk-interface-2.7.0 =dev-libs/rocr-runtime-2.7.0 =dev-libs/rocm-opencl-driver-2.7.0 =dev-util/rocminfo-2.7.0 =dev-libs/rocm-device-libs-9999 dev-libs/rocm-comgr =sys-devel/hip-2.7.9999-r100 =sys-devel/llvm-roc-2.7.9999 =sci-libs/rocRAND-2.7.0-r1 which was going to install:

[ebuild  N     ] sci-libs/rocRAND-2.7.0-r1::rocm  0 KiB
[ebuild  N     ] dev-libs/rocm-opencl-driver-2.7.0:0/2.7::gentoo  USE="-test" 0 KiB
[ebuild  N    *] sys-devel/hip-2.7.9999-r100:0/2.7::rocm  USE="hcc-backend hipify -debug -llvm-roc-backend" 0 KiB
[ebuild  N     ]  sys-devel/hcc-2.7.0:0/2.7::rocm  USE="-debug" 0 KiB
[ebuild  N    *]  dev-libs/rocm-comgr-2.7.9999:0/2.7::rocm  0 KiB
[ebuild  N    *]   dev-libs/rocm-device-libs-9999:0/9999::rocm  0 KiB
[ebuild  N    *]    sys-devel/llvm-roc-2.7.9999::rocm  USE="-debug" 0 KiB
[ebuild  N     ] dev-util/rocminfo-2.7.0:0/2.7::gentoo  0 KiB
[ebuild  N     ]  dev-libs/rocr-runtime-2.7.0:0/2.7::gentoo  USE="-nonfree" 0 KiB
[ebuild  N     ]   dev-libs/roct-thunk-interface-2.7.0:0/2.7::gentoo  0 KiB
[ebuild  N     ] dev-util/rocm-cmake-2.7.0::gentoo  0 KiB

and then fails at:

>>> Install dev-libs/rocm-device-libs-9999 into /var/tmp/portage/dev-libs/rocm-device-libs-9999/image
>>> Working in BUILD_DIR: "/var/tmp/portage/dev-libs/rocm-device-libs-9999/work/rocm-device-libs-9999_build"
[0/1] Install the project...
-- Install configuration: "Gentoo"
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/cmake/AMDDeviceLibs/AMDDeviceLibsConfig.cmake
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_correctly_rounded_sqrt_off.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_correctly_rounded_sqrt_on.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_daz_opt_off.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_daz_opt_on.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_finite_only_off.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_finite_only_on.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_1010.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_1011.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_1012.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_700.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_701.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_702.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_801.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_802.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_803.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_810.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_900.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_902.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_904.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_906.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_isa_version_908.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_unsafe_math_off.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_unsafe_math_on.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_wavefrontsize64_off.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/oclc_wavefrontsize64_on.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/ocml.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/include/ocml.h
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/lib/ockl.amdgcn.bc
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/include/amd_hsa_common.h
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/include/amd_hsa_elf.h
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/include/amd_hsa_kernel_code.h
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/include/amd_hsa_queue.h
-- Installing: /var/tmp/portage/dev-libs/rocm-device-libs-9999/image/usr/include/amd_hsa_signal.h
CMake Error at ockl/cmake_install.cmake:45 (file):
  file INSTALL cannot find
  "/var/tmp/portage/dev-libs/rocm-device-libs-9999/work/rocm-device-libs-9999/ockl/inc/as.h".
Call Stack (most recent call first):
  cmake_install.cmake:50 (include)

FAILED: CMakeFiles/install.util 
cd /var/tmp/portage/dev-libs/rocm-device-libs-9999/work/rocm-device-libs-9999_build && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
 * ERROR: dev-libs/rocm-device-libs-9999::rocm failed (install phase):
 *   died running ninja install
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_install
 *   environment, line 2642:  Called cmake-utils_src_install
 *   environment, line 1124:  Called die
 * The specific snippet of code:
 *       DESTDIR="${D}" ${CMAKE_MAKEFILE_GENERATOR} install "$@" || die "died running ${CMAKE_MAKEFILE_GENERATOR} install";
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/rocm-device-libs-9999::rocm'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/rocm-device-libs-9999::rocm'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/rocm-device-libs-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/rocm-device-libs-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/rocm-device-libs-9999/work/rocm-device-libs-9999_build'
 * S: '/var/tmp/portage/dev-libs/rocm-device-libs-9999/work/rocm-device-libs-9999'

>>> Failed to emerge dev-libs/rocm-device-libs-9999, Log file:

>>>  '/var/tmp/portage/dev-libs/rocm-device-libs-9999/temp/build.log'

 * Messages for package dev-libs/roct-thunk-interface-2.7.0:

 *   CONFIG_HMM_MIRROR:  is not set when it should be.
 *   CONFIG_ZONE_DEVICE:         is not set when it should be.
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.

 * Messages for package dev-libs/rocm-device-libs-9999:

 * ERROR: dev-libs/rocm-device-libs-9999::rocm failed (install phase):
 *   died running ninja install
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_install
 *   environment, line 2642:  Called cmake-utils_src_install
 *   environment, line 1124:  Called die
 * The specific snippet of code:
 *       DESTDIR="${D}" ${CMAKE_MAKEFILE_GENERATOR} install "$@" || die "died running ${CMAKE_MAKEFILE_GENERATOR} install";
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/rocm-device-libs-9999::rocm'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/rocm-device-libs-9999::rocm'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/rocm-device-libs-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/rocm-device-libs-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/rocm-device-libs-9999/work/rocm-device-libs-9999_build'
 * S: '/var/tmp/portage/dev-libs/rocm-device-libs-9999/work/rocm-device-libs-9999'

 * GNU info directory index is up-to-date.
Lucretia commented 5 years ago

I checked the source and the build dirs and that as.h is missing. I've taken a look and it's gone from master, but it is in 2.7.x branch

Lucretia commented 5 years ago

Fixed with #69

Lucretia commented 5 years ago

I still get the same error as above about the missing hsa-runtime64 from compiling sci-libs/rocRAND-2.7.0-r1::rocm - I'm thinking because dev-libs/hsa-ext-rocr-1.1.9.99 isn't installed and even if it was, it wouldn't install libhsa-runtime64.so.1 also, the /usr/lib/hcc/2.7/lib/cmake/hcc/hcc-config.cmake file would be pointing to the wrong place?

find_library(HSA_LIBRARY hsa-runtime64
  PATHS
    /opt/rocm/lib
)

Shouldn't it be /opt/hsa-ext-rocr?

justxi commented 5 years ago

I don´t know where dev-libs/hsa-ext-rocr installs to, I don´t have it installed.

I will check the install dates for the packages which are marked with (!). Then we can get the commit ids and try again.

devang commented 5 years ago

The error I'm getting is: clang-9: error: unknown argument: '-fstack-clash-protection'

I think some or all of the user's CFLAGS need to filtered out when building any of the roc* libraries.

justxi commented 5 years ago

Which ebuild version do you use? The latest ebuild (2.7.9999) installs a llvm/clang 10.

I will try to add the commit ids, so that we have the same state.

justxi commented 5 years ago

Ok, I did some checks. First I added commit IDs to rocm-comgr and rocm-device-libs, both build now on my system. Then I checked my hip installation, it was build with "llvm-roc-backend". That results in the error in https://github.com/justxi/rocm/issues/68#issue-484947576

To build rocRAND I have to use hip with "hcc-backend":

sci-libs/rocRAND-2.7.0-r1::rocm

dev-libs/rocm-opencl-driver-2.7.0::gentoo USE="-test"

sys-devel/hip-2.7.9999-r100::rocm USE="hcc-backend hipify -debug -llvm-roc-backend"
sys-devel/hcc-2.7.0::rocm USE="-debug"
dev-libs/rocm-comgr-2.7.9999::rocm
dev-libs/rocm-device-libs-9999::rocm
sys-devel/llvm-roc-2.7.9999::rocm USE="-debug"

dev-util/rocminfo-2.7.0::gentoo
dev-libs/rocr-runtime-2.7.0::gentoo USE="-nonfree"
dev-libs/roct-thunk-interface-2.7.0::gentoo
dev-util/rocm-cmake-2.7.0::gentoo

This works on my system.

devang commented 5 years ago

My rocm-opencl-runtime was stuck at 2.6, which probably caused the hcc error, but I'm now getting this for rocRAND-2.7 and rocFFT-2.7:

CMake Error at /usr/lib/hcc/2.7/lib/cmake/hcc/hcc-config.cmake:51 (add_library): add_library cannot create imported target "hsa-runtime64" because another target with the same name already exists.

I tried the ebuild versions you mentioned, and hip-2.7.0. These are the ebuilds I currently have installed with the rocm repo and portage being up-to-date:

emerge -tpv hcc hip rocm-opencl-driver rocm-comgr rocm-device-libs llvm-roc rocminfo rocr-runtime roct-thunk-interface rocm-cmake rocm-opencl-runtime rocm-hostcall rocm-smi rocm-clang-ocl amd-rocm-meta

These are the packages that would be merged, in reverse order:

Calculating dependencies ... done!
[ebuild R ~] dev-util/amd-rocm-meta-2.7.0:0/2.7::rocm USE="opencl -debug-tools -extra" 0 KiB [ebuild R ~] dev-libs/rocm-hostcall-2.7.0:0/2.7::gentoo 0 KiB [ebuild R ~] dev-util/rocm-cmake-2.7.0::gentoo 0 KiB [ebuild R ~] dev-util/rocm-clang-ocl-2.7.0::rocm USE="-debug" 0 KiB [ebuild R ~] dev-libs/rocm-opencl-runtime-2.7.0-r1:0/2.7::rocm 0 KiB [ebuild R ~] dev-libs/rocm-opencl-driver-2.7.0:0/2.7::gentoo USE="-test" 0 KiB [ebuild R ~] sys-devel/hip-2.7.0:0/2.7::rocm USE="hcc-backend hipify -debug -llvm-roc-backend" 0 KiB [ebuild R ~] dev-libs/rocm-comgr-2.7.0:0/2.7::gentoo 0 KiB [ebuild R ~] dev-libs/rocm-device-libs-2.7.0:0/2.7::gentoo 0 KiB [ebuild R ~] sys-devel/llvm-roc-2.7.0::gentoo 0 KiB [ebuild R ~] sys-devel/hcc-2.7.0:0/2.7::rocm USE="-debug" 0 KiB [ebuild R ~] dev-util/rocm-smi-2.7.0::rocm 0 KiB [ebuild R ~] dev-util/rocminfo-2.7.0:0/2.7::gentoo 0 KiB [ebuild R ~] dev-libs/rocr-runtime-2.7.0:0/2.7::gentoo USE="-nonfree" 0 KiB [ebuild R ~] dev-libs/roct-thunk-interface-2.7.0:0/2.7::gentoo 0 KiB

Just trying to get all the 2.7 ebuilds to work.

justxi commented 5 years ago

Just trying to get all the 2.7 ebuilds to work.

Of course =).

But, I tried both ebuilds on a second installation and except some QA notices, both merged. I don´t have an idea how to reproduce this problem.

@davidrohr Do you have an idea? Or could you please try to merge rocRAND and rocFFT to see if you can reproduce this failure?

devang commented 5 years ago

I had to downgrade dev-util/cmake from 3.15.x to the stable 3.14.6 and it works now. I think this issue can be closed.

justxi commented 5 years ago

Ok, interessting.