justxi / rocm

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

sci-libs/rocFFT fails to build #171

Closed cmburn closed 4 years ago

cmburn commented 4 years ago

Hi, I'm trying to get things going on my system for tensorflow, but have run into a couple issues, and this one I can't seem to work around. When trying to build, it kicks off this error:

* IMPORTANT: 11 news items need reading for repository 'gentoo'. * Use eselect news read to view new items. `[ebuild N ] sci-libs/rocFFT-3.7.0 ` Would you like to merge these packages? [Yes/No] y >>> Verifying ebuild manifests >>> Running pre-merge checks for sci-libs/rocFFT-3.7.0 * ------------------------------------------------------------------- * If the build takes too long or swaps too much, try MAKEOPTS="-j1" * e.g. override it in /etc/package/package.env * ------------------------------------------------------------------- >>> Emerging (1 of 1) sci-libs/rocFFT-3.7.0::rocm >>> Failed to emerge sci-libs/rocFFT-3.7.0, Log file: >>> '/var/tmp/portage/sci-libs/rocFFT-3.7.0/temp/build.log' * Package: sci-libs/rocFFT-3.7.0 * Repository: rocm * USE: abi_x86_64 amd64 elibc_glibc gfx803 kernel_linux userland_GNU * FEATURES: network-sandbox preserve-libs sandbox selinux sesandbox userpriv usersandbox * Checking for at least 28 GiB RAM ... [ ok ] !!! Failed to set new SELinux execution context. Is your current SELinux context allowed to run Portage? !!! Failed to set new SELinux execution context. Is your current SELinux context allowed to run Portage? * Hardcoded definition(s) removed in docs/samples/CMakeLists.txt: * set(CMAKE_BUILD_TYPE Release) * Hardcoded definition(s) removed in deps/CMakeLists.txt: * set( CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/package" CACHE PATH "Insta * set( CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, optio !!! Failed to set new SELinux execution context. Is your current SELinux context allowed to run Portage? * strip-flags: CFLAGS: changed '-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS -fstack-clash-protection -mshstk -fcf-protection -fexceptions' to '-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS' * strip-flags: CXXFLAGS: changed '-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS -fstack-clash-protection -mshstk -fcf-protection -fexceptions' to '-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS' * strip-flags: FFLAGS: changed '-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS -fstack-clash-protection -mshstk -fcf-protection -fexceptions' to '-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS' * strip-flags: FCFLAGS: changed '-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS -fstack-clash-protection -mshstk -fcf-protection -fexceptions' to '-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS' >>> Working in BUILD_DIR: "/var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build" cmake -C /var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_INCLUDEDIR=include/rocFFT/ -DAMDGPU_TARGETS=gfx803; -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build/gentoo_toolchain.cmake /var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-rocm-3.7.0 loading initial cache file /var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build/gentoo_common_config.cmake -- The CXX compiler identification is Clang 11.0.0 -- Check for working CXX compiler: /usr/lib/hip/3.7/bin/hipcc -- Check for working CXX compiler: /usr/lib/hip/3.7/bin/hipcc -- broken CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:53 (message): The C++ compiler ` "/usr/lib/hip/3.7/bin/hipcc"` is not able to compile a simple test program. ` It fails with the following output:` Change Dir: /var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build/CMakeFiles/CMakeTmp ` Run Build Command(s):/usr/bin/ninja cmTC_2cd0e && [1/2] Building CXX object CMakeFiles/cmTC_2cd0e.dir/testCXXCompiler.cxx.o [2/2] Linking CXX executable cmTC_2cd0e FAILED: cmTC_2cd0e : && /usr/lib/hip/3.7/bin/hipcc -O2 -pipe -D_GLIBXX_ASSERTIONS -Wl,-O1 -Wl,--as-needed CMakeFiles/cmTC_2cd0e.dir/testCXXCompiler.cxx.o -o cmTC_2cd0e && : /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lclang_rt.builtins-x86_64 clang-11: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. `` `` CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:48 (project) `` `` -- Configuring incomplete, errors occurred! See also "/var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build/CMakeFiles/CMakeOutput.log". See also "/var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build/CMakeFiles/CMakeError.log". ERROR: sci-libs/rocFFT-3.7.0::rocm failed (configure phase): cmake failed Call stack: ebuild.sh, line 125: Called src_configure environment, line 2278: Called cmake-utils_src_configure environment, line 1033: Called die The specific snippet of code: "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"; If you need support, post the output of emerge --info '=sci-libs/rocFFT-3.7.0::rocm', the complete build log and the output of emerge -pqv '=sci-libs/rocFFT-3.7.0::rocm'. The complete build log is located at '/var/tmp/portage/sci-libs/rocFFT-3.7.0/temp/build.log'. The ebuild environment file is located at '/var/tmp/portage/sci-libs/rocFFT-3.7.0/temp/environment'. Working directory: '/var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build' S: '/var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-rocm-3.7.0' `` Messages for package sci-libs/rocFFT-3.7.0: `` ERROR: sci-libs/rocFFT-3.7.0::rocm failed (configure phase): cmake failed Call stack: ebuild.sh, line 125: Called src_configure environment, line 2278: Called cmake-utils_src_configure environment, line 1033: Called die The specific snippet of code: "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"; If you need support, post the output of emerge --info '=sci-libs/rocFFT-3.7.0::rocm', the complete build log and the output of emerge -pqv '=sci-libs/rocFFT-3.7.0::rocm'. The complete build log is located at '/var/tmp/portage/sci-libs/rocFFT-3.7.0/temp/build.log'. The ebuild environment file is located at '/var/tmp/portage/sci-libs/rocFFT-3.7.0/temp/environment'. Working directory: '/var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-3.7.0_build' * S: '/var/tmp/portage/sci-libs/rocFFT-3.7.0/work/rocFFT-rocm-3.7.0'`

Not sure if this is helpful, but when I hipconfig to try to troubleshoot, it's unable to find anything whatsoever. However, if I make an /opt/rocm folder and ln -s /usr/lib/llvm/roc /opt/rocm/llvm, it at least seems to fill out most of the information, but gets wigged out aboput the cxx/ld flags, as shown below.

HIP version : 3.7.20380- `== hipconfig` `HIP_PATH : /usr/lib/hip/3.7` `ROCM_PATH : /opt/rocm` `HIP_COMPILER : clang` `HIP_PLATFORM : hcc` `HIP_RUNTIME : ROCclr` `CPP_CONFIG : -D__HIP_PLATFORM_HCC__= -I/usr/lib/hip/3.7/include -I/opt/rocm/llvm/bin/../lib/clang/11.0.0 -I/opt/rocm/hsa/include -D__HIP_ROCclr__` == hip-clang HSA_PATH : /opt/rocm/hsa HIP_CLANG_PATH : /opt/rocm/llvm/bin clang version 11.0.0 Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /opt/rocm/llvm/bin LLVM (http://llvm.org/): LLVM version 11.0.0roc Optimized build. Default target: x86_64-unknown-linux-gnu Host CPU: skylake ` Registered Targets:` ` amdgcn - AMD GCN GPUs` ` r600 - AMD GPUs HD2XXX-HD6XXX` ` x86 - 32-bit X86: Pentium-Pro and above` ` x86-64 - 64-bit X86: EM64T and AMD64` `hip-clang-cxxflags : error: unknown HIP_PLATFORM = 'hcc' or HIP_COMPILER = 'clang'` `hip-clang-ldflags : error: unknown HIP_PLATFORM = 'hcc' or HIP_COMPILER = 'clang'` === Environment Variables PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/10/bin:/usr/lib/hip/3.7/bin ` == Linux Kernel Linux 5.8.10-x86_64 #1 SMP Sun Sep 20 12:34:00 CDT 2020 x86_64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz GenuineIntel GNU/Linux`

And lastly, emerge --info in case that's helpful

Portage 3.0.4 (python 3.7.8-final-0, default/linux/amd64/17.1/hardened/selinux, gcc-10.2.0, glibc-2.31-r6, 5.8.10-x86_64 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.8.10-x86_64-x86_64-Intel-R-_Core-TM-_i7-9700K_CPU_@_3.60GHz-with-gentoo-2.7 KiB Mem: 65774756 total, 58404716 free KiB Swap: 67108860 total, 67108860 free Timestamp of repository gentoo: Sun, 20 Sep 2020 16:00:01 +0000 Head commit of repository gentoo: 630647d79e377b6f0668c981f3f7ca4529f001c6 Timestamp of repository libressl: Thu, 17 Sep 2020 17:13:57 +0000 Head commit of repository libressl: 7240eb8c6a23735bfe8faef8fa456662355a8fb0 `Timestamp of repository pentoo: Sun, 20 Sep 2020 05:05:23 +0000` `Head commit of repository pentoo: 9c7e9ccf9bd1db6907d3b6f56a91d1d81aab4cfd` Timestamp of repository raiagent: Fri, 18 Sep 2020 04:35:25 +0000 Head commit of repository raiagent: 8b5649f66d8940ebb3c2a59d8d8fdc2bc87f1a5c `Head commit of repository rocm: 5016b60783eb2a424bf65f30a025bc17bde09fc2` Timestamp of repository steam-overlay: Fri, 18 Sep 2020 12:36:19 +0000 Head commit of repository steam-overlay: aca7cfdcdc419897891139db4ea00d6e0cd95517 `Timestamp of repository waebbl: Fri, 18 Sep 2020 12:36:30 +0000` `Head commit of repository waebbl: 81552f6ec9de821e55d280135077da77a52e023f` Head commit of repository flatpak-overlay: 85b574e89510f6422e0e5177de99f8893eec6608 `sh bash 5.0_p18` `ld GNU ld (Gentoo 2.33.1 p2) 2.33.1` `app-shells/bash: 5.0_p18::gentoo` `dev-java/java-config: 2.3.1::gentoo` `dev-lang/perl: 5.30.3::gentoo` `dev-lang/python: 2.7.18-r2::gentoo, 3.6.11-r2::gentoo, 3.7.8-r2::gentoo, 3.8.5::gentoo` `dev-util/cmake: 3.16.5::gentoo` `sys-apps/baselayout: 2.7::gentoo` `sys-apps/openrc: 0.42.1::gentoo` `sys-apps/sandbox: 2.18::gentoo` `sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo` `sys-devel/automake: 1.16.1-r1::gentoo` `sys-devel/binutils: 2.33.1-r1::gentoo, 2.34-r2::gentoo` `sys-devel/gcc: 10.2.0-r1::gentoo` `sys-devel/gcc-config: 2.3.1::gentoo` `sys-devel/libtool: 2.4.6-r6::gentoo` `sys-devel/make: 4.2.1-r4::gentoo` `sys-kernel/linux-headers: 5.8::gentoo (virtual/os-headers)` `sys-libs/glibc: 2.31-r6::gentoo` `Repositories:` gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 `libressl` ` location: /var/db/repos/libressl` ` sync-type: git` ` sync-uri: https://github.com/gentoo-mirror/libressl.git` ` masters: gentoo` rocm location: /var/db/repos/rocm sync-type: git sync-uri: https://github.com/justxi/rocm.git masters: gentoo ` ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS -fstack-clash-protection -mshstk -fcf-protection -fexceptions" 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/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /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="-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS -fstack-clash-protection -mshstk -fcf-protection -fexceptions" DISTDIR="/var/cache/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 -march=native -D_GLIBXX_ASSERTIONS -fstack-clash-protection -mshstk -fcf-protection -fexceptions" 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 preserve-libs protect-owned qa-unresolved-soname-deps sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native -D_GLIBXX_ASSERTIONS -fstack-clash-protection -mshstk -fcf-protection -fexceptions" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j10 -l10" 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" USE="X acl aio alsa amd64 audit bluetooth bzip2 clang crypt cryptsetup cxx dbus device-mapper elogind expat fortran git gles2 googledrive gtk gui hardened hip hipify iconv icu ipv6 java kde kubernetes kvm latex libbsd libglvnd libressl libtirpc lvm mmap mono multilib ncurses networkmanager nls nptl opencl opengl openmp pam pcre pie plasma png policykit pulsaudio pulseaudio qemu qt5 qxl readline sasl seccomp selinux spice split-usr sqlite ssl ssp syslog udev udisks unconfined unicode usb usbredir vhost-net vhost-user-fs vim-syntax virtfs vnc vulkan wayland widgets wireguard xattr xinerama xtpax zlib zsh-completion" 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 sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="libressl" 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" QEMU_SOFTMMU_TARGETS="" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu 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, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS`

justxi commented 4 years ago

Please try to emerge "sys-devel/llvm-roc-3.7.0-r2" from this repository with USE="compiler-rt". I think some libraries are missing, which are currently not installed when using the ebuild from official Gentoo portage.

justxi commented 4 years ago

Did you try my suggestion?

justxi commented 4 years ago

For ROCm 3.8 ist should be fixed. If not, please reopen.