Closed Lucretia closed 5 years ago
I have the same error. But I am sure that it worked. Which version of the hip ebuild are you using?
How can it have worked if you get the same error?
I am using =sys-devel/hip-2.7.0
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.
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.
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".
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!
This is a different error... Is the patch applied succesfully?
I know it's different, I've no idea what it means.
My source matches up to latest here.
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.
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.
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
Fixed with #69
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
?
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.
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.
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.
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.
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.
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?
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.
Ok, interessting.
Output of
emerge --info '=sci-libs/rocRAND-2.7.0-r1::rocm'
:Output of
emerge -pqv '=sci-libs/rocRAND-2.7.0-r1::rocm'
:build.log: