justxi / rocm

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

sys-devel/hip-2.1.0: sandbox violation - ACCESS DENIED: mkdir: /usr/lib/hip #26

Closed ernsteiswuerfel closed 5 years ago

ernsteiswuerfel commented 5 years ago
>>> Configuring source in /var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0 ...
 * cmake-utils_src_prepare has not been run, please open a bug on https://bugs.gentoo.org/
>>> Working in BUILD_DIR: "/var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0_build"
cmake -C /var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_PREFIX=/usr/lib/hip/2.1 /var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0 -DHIP_PLATFORM=hcc -DBUILD_HIPIFY_CLANG=ON -DHIP_COMPILER=hcc -DHCC_HOME=/usr/lib/hcc/2.1/ -DHSA_PATH=/usr/lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0_build/gentoo_toolchain.cmake  /var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0
loading initial cache file /var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
fatal: not a git repository (or any parent up to mount point /var)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-- HIP Platform: hcc
-- HIP Compiler: hcc
-- Looking for HCC in: /usr/lib/hcc/2.1/. Found version: 1.3.19045-fea3e2b4-683c680a6b-6e349ce3445
-- Looking for HSA runtime in: /usr/lib
-- HIP will be installed in: /usr/lib/hip/2.1
-- Found LLVM 7.0.1:
--    - CMake module path: /usr/lib/llvm/7/lib64/cmake/llvm
--    - Include path     : /usr/lib/llvm/7/include
--    - Binary path      : /usr/lib/llvm/7/bin
-- Linker detection: GNU ld
 * ACCESS DENIED:  mkdir:        /usr/lib/hip
-- Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location
-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0_build
>>> Source configured.
 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-23076.log"
 * 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: mkdir
S: deny
P: /usr/lib/hip
A: /usr/lib/hip
R: /usr/lib64/hip
C: /usr/bin/cmake -E copy_directory /var/tmp/portage/sys-devel/hip-2.1.0/work/hip-2.1.0/cmake /usr/lib/hip/2.1/cmake 
 * --------------------------------------------------------------------------------
justxi commented 5 years ago

Is the patch applied correctly? Is the output all after executing emerge?

@davidrohr Can you check this? I think "cmake-utils_src_prepare" must be called also.

davidrohr commented 5 years ago

Hm, there was a bug that prevent correct application of the patch to disable the tests. Fixed it here: justxi/rocm#27 But I am wondering why it tried to configure at all in that case, should have failed with the test. Anyhow, for me the ebuild works now.

justxi commented 5 years ago

Thanks, applied.

ernsteiswuerfel commented 5 years ago

Now it builds fine. Thanks!