rocm-build: Build error on rocSPARSE fork following gfx803 instructions

I have installed 3.9.1 rocm-dev, rocm-libs. cmake and libc6-dev on my Ubuntu 20.10, using a Radeon RX680.

But when I bash install.sh -di on xuhuisheng/rocSPARSE, I get:

Creating project build directory in: ./build
Get:1 file:/var/opt/amdgpu-pro-local ./ InRelease
Ign:1 file:/var/opt/amdgpu-pro-local ./ InRelease
Get:2 file:/var/opt/amdgpu-pro-local ./ Release [816 B]
Get:2 file:/var/opt/amdgpu-pro-local ./ Release [816 B]
Get:3 file:/var/opt/amdgpu-pro-local ./ Release.gpg
Ign:3 file:/var/opt/amdgpu-pro-local ./ Release.gpg
Hit:4 http://nl.archive.ubuntu.com/ubuntu groovy InRelease
Hit:5 http://dl.google.com/linux/chrome/deb stable InRelease                                                                            
Hit:6 https://download.docker.com/linux/ubuntu groovy InRelease                                                                         
Hit:7 http://nl.archive.ubuntu.com/ubuntu groovy-updates InRelease                                                                      
Hit:8 http://nl.archive.ubuntu.com/ubuntu groovy-backports InRelease                                                                    
Hit:9 https://packages.microsoft.com/repos/ms-teams stable InRelease                                                                    
Hit:10 https://updates.signal.org/desktop/apt xenial InRelease                                                                          
Hit:11 https://packages.microsoft.com/repos/vscode stable InRelease                                               
Hit:12 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease                                               
Hit:13 http://security.ubuntu.com/ubuntu groovy-security InRelease                          
Hit:14 https://repo.radeon.com/rocm/apt/3.9.1 xenial InRelease        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
~/workspace/rocSPARSE ~/workspace/rocSPARSE
Building googletest from source; installing into /usr/local
-- Configuring gtest external dependency
-- ExternalGmock using ( 13 ) cores to build with
CMake Deprecation Warning at CMakeLists.txt:63 (cmake_policy):
  The OLD behavior for policy CMP0037 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/rocSPARSE/build/deps
make[1]: Entering directory '/home/user/rocSPARSE/build/deps'
make[2]: Entering directory '/home/user/rocSPARSE/build/deps'
make[2]: Leaving directory '/home/user/rocSPARSE/build/deps'
make[2]: Entering directory '/home/user/rocSPARSE/build/deps'
[ 12%] Performing update step for 'googletest'
[ 25%] Performing configure step for 'googletest'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/rocSPARSE/build/deps/gtest/src/googletest-build
[ 37%] Performing build step for 'googletest'
-- googletest build command succeeded.  See also /home/user/rocSPARSE/build/deps/gtest/src/googletest-stamp/googletest-build-*.log
[ 50%] No install step for 'googletest'
[ 62%] Completed 'googletest'
make[2]: Leaving directory '/home/user/rocSPARSE/build/deps'
[100%] Built target googletest
make[1]: Leaving directory '/home/user/rocSPARSE/build/deps'
make[1]: Entering directory '/home/user/rocSPARSE/build/deps'
make[2]: Entering directory '/home/user/rocSPARSE/build/deps'
make[3]: Entering directory '/home/user/rocSPARSE/build/deps'
make[3]: Leaving directory '/home/user/rocSPARSE/build/deps'
make[3]: Entering directory '/home/user/rocSPARSE/build/deps'
[ 12%] Performing update step for 'googletest'
[ 25%] Performing configure step for 'googletest'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/rocSPARSE/build/deps/gtest/src/googletest-build
[ 37%] Performing build step for 'googletest'
-- googletest build command succeeded.  See also /home/user/rocSPARSE/build/deps/gtest/src/googletest-stamp/googletest-build-*.log
[ 50%] No install step for 'googletest'
[ 62%] Completed 'googletest'
make[3]: Leaving directory '/home/user/rocSPARSE/build/deps'
[100%] Built target googletest
make[3]: Entering directory '/home/user/rocSPARSE/build/deps'
make[3]: Leaving directory '/home/user/rocSPARSE/build/deps'
make[3]: Entering directory '/home/user/rocSPARSE/build/deps'
gmake[4]: Entering directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
gmake[5]: Entering directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
gmake[6]: Entering directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
gmake[6]: Leaving directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
[ 25%] Built target gtest
gmake[6]: Entering directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
gmake[6]: Leaving directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
[ 50%] Built target gmock
gmake[6]: Entering directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
gmake[6]: Leaving directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
[ 75%] Built target gmock_main
gmake[6]: Entering directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
gmake[6]: Leaving directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
[100%] Built target gtest_main
gmake[5]: Leaving directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/include
-- Up-to-date: /usr/local/include/gmock
-- Up-to-date: /usr/local/include/gmock/gmock-more-actions.h
-- Up-to-date: /usr/local/include/gmock/gmock-actions.h
-- Up-to-date: /usr/local/include/gmock/gmock-generated-actions.h.pump
-- Up-to-date: /usr/local/include/gmock/gmock-more-matchers.h
-- Up-to-date: /usr/local/include/gmock/gmock.h
-- Up-to-date: /usr/local/include/gmock/gmock-generated-function-mockers.h
-- Up-to-date: /usr/local/include/gmock/gmock-generated-matchers.h.pump
-- Up-to-date: /usr/local/include/gmock/gmock-generated-actions.h
-- Up-to-date: /usr/local/include/gmock/gmock-generated-matchers.h
-- Up-to-date: /usr/local/include/gmock/gmock-generated-nice-strict.h
-- Up-to-date: /usr/local/include/gmock/gmock-matchers.h
-- Up-to-date: /usr/local/include/gmock/internal
-- Up-to-date: /usr/local/include/gmock/internal/gmock-generated-internal-utils.h.pump
-- Up-to-date: /usr/local/include/gmock/internal/gmock-generated-internal-utils.h
-- Up-to-date: /usr/local/include/gmock/internal/gmock-port.h
-- Up-to-date: /usr/local/include/gmock/internal/gmock-internal-utils.h
-- Up-to-date: /usr/local/include/gmock/internal/custom
-- Up-to-date: /usr/local/include/gmock/internal/custom/gmock-generated-actions.h.pump
-- Up-to-date: /usr/local/include/gmock/internal/custom/README.md
-- Up-to-date: /usr/local/include/gmock/internal/custom/gmock-generated-actions.h
-- Up-to-date: /usr/local/include/gmock/internal/custom/gmock-matchers.h
-- Up-to-date: /usr/local/include/gmock/internal/custom/gmock-port.h
-- Up-to-date: /usr/local/include/gmock/gmock-generated-function-mockers.h.pump
-- Up-to-date: /usr/local/include/gmock/gmock-cardinalities.h
-- Up-to-date: /usr/local/include/gmock/gmock-generated-nice-strict.h.pump
-- Up-to-date: /usr/local/include/gmock/gmock-spec-builders.h
-- Up-to-date: /usr/local/lib/libgmock.a
-- Up-to-date: /usr/local/lib/libgmock_main.a
-- Up-to-date: /usr/local/lib/pkgconfig/gmock.pc
-- Up-to-date: /usr/local/lib/pkgconfig/gmock_main.pc
-- Up-to-date: /usr/local/lib/cmake/GTest/GTestTargets.cmake
-- Installing: /usr/local/lib/cmake/GTest/GTestTargets-noconfig.cmake
-- Up-to-date: /usr/local/lib/cmake/GTest/GTestConfigVersion.cmake
-- Up-to-date: /usr/local/lib/cmake/GTest/GTestConfig.cmake
-- Up-to-date: /usr/local/include
-- Up-to-date: /usr/local/include/gtest
-- Up-to-date: /usr/local/include/gtest/gtest.h
-- Up-to-date: /usr/local/include/gtest/gtest-death-test.h
-- Up-to-date: /usr/local/include/gtest/gtest-spi.h
-- Up-to-date: /usr/local/include/gtest/gtest-param-test.h
-- Up-to-date: /usr/local/include/gtest/gtest_pred_impl.h
-- Up-to-date: /usr/local/include/gtest/gtest-message.h
-- Up-to-date: /usr/local/include/gtest/internal
-- Up-to-date: /usr/local/include/gtest/internal/gtest-string.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-param-util.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-filepath.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-param-util-generated.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-tuple.h.pump
-- Up-to-date: /usr/local/include/gtest/internal/gtest-port-arch.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-port.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-type-util.h.pump
-- Up-to-date: /usr/local/include/gtest/internal/gtest-internal.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-tuple.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-type-util.h
-- Up-to-date: /usr/local/include/gtest/internal/custom
-- Up-to-date: /usr/local/include/gtest/internal/custom/gtest.h
-- Up-to-date: /usr/local/include/gtest/internal/custom/README.md
-- Up-to-date: /usr/local/include/gtest/internal/custom/gtest-port.h
-- Up-to-date: /usr/local/include/gtest/internal/custom/gtest-printers.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-linked_ptr.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-death-test-internal.h
-- Up-to-date: /usr/local/include/gtest/internal/gtest-param-util-generated.h.pump
-- Up-to-date: /usr/local/include/gtest/gtest-test-part.h
-- Up-to-date: /usr/local/include/gtest/gtest-printers.h
-- Up-to-date: /usr/local/include/gtest/gtest_prod.h
-- Up-to-date: /usr/local/include/gtest/gtest-typed-test.h
-- Up-to-date: /usr/local/include/gtest/gtest-param-test.h.pump
-- Up-to-date: /usr/local/lib/libgtest.a
-- Up-to-date: /usr/local/lib/libgtest_main.a
-- Up-to-date: /usr/local/lib/pkgconfig/gtest.pc
-- Up-to-date: /usr/local/lib/pkgconfig/gtest_main.pc
gmake[4]: Leaving directory '/home/user/rocSPARSE/build/deps/gtest/src/googletest-build'
make[3]: Leaving directory '/home/user/rocSPARSE/build/deps'
[100%] Built target install
make[2]: Leaving directory '/home/user/rocSPARSE/build/deps'
make[1]: Leaving directory '/home/user/rocSPARSE/build/deps'
~/workspace/rocSPARSE
~/workspace/rocSPARSE ~/workspace/rocSPARSE
-- The CXX compiler identification is unknown
-- The Fortran compiler identification is GNU 10.2.0
-- Check for working CXX compiler: /opt/rocm/bin/hipcc
-- Check for working CXX compiler: /opt/rocm/bin/hipcc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
  The C++ compiler

    "/opt/rocm/bin/hipcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/user/rocSPARSE/build/release/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/gmake cmTC_9346b/fast && /usr/bin/gmake -f CMakeFiles/cmTC_9346b.dir/build.make CMakeFiles/cmTC_9346b.dir/build
    gmake[1]: Entering directory '/home/user/rocSPARSE/build/release/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_9346b.dir/testCXXCompiler.cxx.o
    /opt/rocm/bin/hipcc     -o CMakeFiles/cmTC_9346b.dir/testCXXCompiler.cxx.o -c /home/user/rocSPARSE/build/release/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    Can't exec "/opt/rocm/llvm/bin/clang++": No such file or directory at /opt/rocm-3.9.1/hip/bin/hipconfig line 141.
    Use of uninitialized value $HIP_CLANG_VERSION in pattern match (m//) at /opt/rocm-3.9.1/hip/bin/hipconfig line 142.
    Use of uninitialized value $HIP_CLANG_VERSION in concatenation (.) or string at /opt/rocm-3.9.1/hip/bin/hipconfig line 145.
    Can't exec "/opt/rocm/llvm/bin/clang++": No such file or directory at /opt/rocm-3.9.1/hip/bin/hipconfig line 141.
    Use of uninitialized value $HIP_CLANG_VERSION in pattern match (m//) at /opt/rocm-3.9.1/hip/bin/hipconfig line 142.
    Use of uninitialized value $HIP_CLANG_VERSION in concatenation (.) or string at /opt/rocm-3.9.1/hip/bin/hipconfig line 145.
    Can't exec "/opt/rocm/llvm/bin/clang++": No such file or directory at /opt/rocm-3.9.1/hip/bin/hipconfig line 141.
    Use of uninitialized value $HIP_CLANG_VERSION in pattern match (m//) at /opt/rocm-3.9.1/hip/bin/hipconfig line 142.
    Use of uninitialized value $HIP_CLANG_VERSION in concatenation (.) or string at /opt/rocm-3.9.1/hip/bin/hipconfig line 145.
    Can't exec "/opt/rocm/llvm/bin/clang++": No such file or directory at /opt/rocm-3.9.1/hip/bin/hipconfig line 141.
    Use of uninitialized value $HIP_CLANG_VERSION in pattern match (m//) at /opt/rocm-3.9.1/hip/bin/hipconfig line 142.
    Use of uninitialized value $HIP_CLANG_VERSION in concatenation (.) or string at /opt/rocm-3.9.1/hip/bin/hipconfig line 145.
    Can't exec "/opt/rocm-3.9.1/llvm/bin/clang": No such file or directory at /opt/rocm/bin/hipcc line 203.
    Use of uninitialized value $HIP_CLANG_VERSION in pattern match (m//) at /opt/rocm/bin/hipcc line 204.
    Use of uninitialized value $HIP_CLANG_VERSION in concatenation (.) or string at /opt/rocm/bin/hipcc line 208.
    Can't exec "/opt/rocm-3.9.1/llvm/bin/clang": No such file or directory at /opt/rocm/bin/hipcc line 897.
    failed to execute: No such file or directory
    gmake[1]: *** [CMakeFiles/cmTC_9346b.dir/build.make:66: CMakeFiles/cmTC_9346b.dir/testCXXCompiler.cxx.o] Error 255
    gmake[1]: Leaving directory '/home/user/rocSPARSE/build/release/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:121: cmTC_9346b/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:54 (project)


-- Configuring incomplete, errors occurred!
See also "/home/user/rocSPARSE/build/release/CMakeFiles/CMakeOutput.log".
See also "/home/user/rocSPARSE/build/release/CMakeFiles/CMakeError.log".

Also my CMakeError.log might be useful.

Any idea?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (12 by maintainers)

Most upvoted comments

Rightnow, ROCm-4.0 cannot support kernel-5.10, event kernel-5.8 in ubuntu-20.04.2, rock-dkms will report a compile error. But other components like llvm can install properly. AMD said that the next version ROCm-4.1 will support kernel-5.8, and I will test ubuntu-20.10 when ROCm-4.1 released.

I suggest using ubuntu-20.04 with kernel-5.4 which we need uninstall kernel-5.8 and install kernel-5.4 manually.

And clang++ comes from llvm-amdgpu package. After installation it should looks like this:

work@22112c8b0ecc:/opt/rocm/llvm/bin$ ls
bugpoint                  clang-nvlink-wrapper   git-clang-format  llvm-cov                llvm-jitlink         llvm-pdbutil     llvm-xray
c-index-test              clang-offload-bundler  hmaptool          llvm-cvtres             llvm-lib             llvm-profdata    modularize
clang                     clang-offload-wrapper  ld.lld            llvm-cxxdump            llvm-libtool-darwin  llvm-ranlib      obj2yaml
clang++                   clang-query            ld64.lld          llvm-cxxfilt            llvm-link            llvm-rc          opt
clang-12                  clang-refactor         llc               llvm-cxxmap             llvm-lipo            llvm-readelf     pp-trace
clang-apply-replacements  clang-rename           lld               llvm-diff               llvm-lto             llvm-readobj     sancov
clang-build-select-link   clang-reorder-fields   lld-link          llvm-dis                llvm-lto2            llvm-reduce      sanstats
clang-change-namespace    clang-scan-deps        lli               llvm-dlltool            llvm-mc              llvm-rtdyld      scan-build
clang-check               clang-tidy             llvm-addr2line    llvm-dwarfdump          llvm-mca             llvm-size        scan-view
clang-cl                  clangd                 llvm-ar           llvm-dwp                llvm-ml              llvm-split       verify-uselistorder
clang-cpp                 diagtool               llvm-as           llvm-elfabi             llvm-modextract      llvm-stress      wasm-ld
clang-doc                 dsymutil               llvm-bcanalyzer   llvm-exegesis           llvm-mt              llvm-strings     yaml2obj
clang-extdef-mapping      find-all-symbols       llvm-c-test       llvm-extract            llvm-nm              llvm-strip
clang-format              flang                  llvm-cat          llvm-gsymutil           llvm-objcopy         llvm-symbolizer
clang-include-fixer       flang1                 llvm-cfi-verify   llvm-ifs                llvm-objdump         llvm-tblgen
clang-move                flang2                 llvm-config       llvm-install-name-tool  llvm-opt-report      llvm-undname

And I just install ROCm-4.0.1 on docker ubuntu-20.10 image. llvm-amdgpu is just fine. you can check whether llvm-amdgpu installation successful or not.