ROCm / rocFFT

Next generation FFT implementation for ROCm
https://rocm.docs.amd.com/projects/rocFFT/en/latest/
Other
173 stars 84 forks source link

[Issue]: Unable to build from source rocFFT 1.0.25 for ROCm 6.0.2 #475

Closed RandUser123sa closed 5 months ago

RandUser123sa commented 5 months ago

Problem Description

OS: NAME=Slackware VERSION="15.0" CPU: model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GH GPU:

Hi ppl,

I'm unable to build rocFFT 1.0.25 from source. I'm configure with:

mkdir build && cd build

cmake -DCMAKE_CXX_COMPILER=hipcc -DCMAKE_C_COMPILER=hipcc ..

-- The CXX compiler identification is Clang 17.0.0 -- The C compiler identification is Clang 17.0.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compiler: /opt/rocm-6.0.2/bin/hipcc -- Check for working CXX compiler: /opt/rocm-6.0.2/bin/hipcc - broken CMake Error at /usr/share/cmake-3.29/Modules/CMakeTestCXXCompiler.cmake:60 (message): The C++ compiler

"/opt/rocm-6.0.2/bin/hipcc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: '/mnt/hd/share/testamd/rocm/rocm-build/build/rocfft/CMakeFiles/CMakeScratch/TryCompile-Q5Jsep'

Run Build Command(s): /usr/bin/ninja -v cmTC_1841e
[1/2] /opt/rocm-6.0.2/bin/hipcc   -std=gnu++17 -MD -MT CMakeFiles/cmTC_1841e.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_1841e.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_1841e.dir/testCXXCompiler.cxx.o -c /mnt/hd/share/testamd/rocm/rocm-build/build/rocfft/CMakeFiles/CMakeScratch/TryCompile-Q5Jsep/testCXXCompiler.cxx
[2/2] : && /opt/rocm-6.0.2/bin/hipcc   CMakeFiles/cmTC_1841e.dir/testCXXCompiler.cxx.o -o cmTC_1841e   && :
FAILED: cmTC_1841e 
: && /opt/rocm-6.0.2/bin/hipcc   CMakeFiles/cmTC_1841e.dir/testCXXCompiler.cxx.o -o cmTC_1841e   && :
/usr/bin/ld: cannot find -lamdhip64: No such file or directory
clang: 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:50 (project)

My ROCM-6.0.2 witch I compile and install from source installation dir is: /opt/rocm-6.0.2/ the .cmake files is located into sub-directories of /opt/rocm-6.0.2/lib64/cmake/: AMDDeviceLibs/ amd_comgr/ hip/ hip-lang/ hiprtc/ hsa-runtime64/ hsakmt/

Could please point me what could be the problem and how to resolve it ?

Thanks, Chris

ldconfig -p | grep libamdhip64

libamdhip64.so.6 (libc6,x86-64) => /opt/rocm-6.0.2/lib64/libamdhip64.so.6
libamdhip64.so.5 (libc6,x86-64) => /opt/rocm-6.0.2/lib64/libamdhip64.so.5
libamdhip64.so (libc6,x86-64) => /opt/rocm-6.0.2/lib64/libamdhip64.so

Here is: hipconfig --full HIP version : 6.0.32831-204d35d16

== hipconfig HIP_PATH : /opt/rocm-6.0.2 ROCM_PATH : /opt/rocm-6.0.2 HIP_COMPILER : clang HIP_PLATFORM : amd HIP_RUNTIME : rocclr CPP_CONFIG : -DHIP_PLATFORM_HCC= -DHIP_PLATFORM_AMD= -I/opt/rocm-6.0.2/include -I/opt/rocm-6.0.2/llvm/lib/clang/17.0.0

== hip-clang HIP_CLANG_PATH : /opt/rocm-6.0.2/llvm/bin clang version 17.0.0 (https://github.com/ROCm/llvm-project.git af27734ed982b52a9f1be0f035ac91726fc697e4) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /opt/rocm-6.0.2/llvm/bin AOMP-16.0-45 (http://github.com/ROCm-Developer-Tools/aomp): Source ID:16.0-45-6b875fb548b9ded0f07df02bc2af6e12568504a9 LLVM version 17.0.0git Optimized build with assertions. Default target: x86_64-unknown-linux-gnu Host CPU: westmere

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 : -isystem "/opt/rocm-6.0.2/include" -O3 hip-clang-ldflags : --driver-mode=g++ -O3 --hip-link --rtlib=compiler-rt -unwindlib=libgcc

=== Environment Variables PATH=/opt/rocm-6.0.2/bin:/opt/rocm-6.0.2/llvm/bin:/opt/rocm-6.0.2/hip/bin:/opt/rocm-6.0.2/bin:/opt/rocm-6.0.2/llvm/bin:/opt/rocm-6.0.2/hip/bin:/opt/rocm-6.0.2/bin:/opt/rocm-6.0.2/llvm/bin:/opt/rocm-6.0.2/hip/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/libexec/kf5:/usr/lib64/java/bin:/usr/lib64/qt5/bin:/usr/lib64/qt6/bin

== Linux Kernel Hostname : purgatory Linux purgatory 6.6.22 #1 SMP PREEMPT_DYNAMIC Fri Mar 15 15:52:16 CDT 2024 x86_64 Intel(R) Xeon(R) CPU E5620 @ 2.40GHz GenuineIntel GNU/Linux

Operating System

Slackware 15.0 x86_64

CPU

Intel(R) Xeon(R) CPU E5620 @ 2.40GH

GPU

AMD Radeon RX 7900 XTX

ROCm Version

ROCm 6.0.0

ROCm Component

rocFFT

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

RandUser123sa commented 5 months ago

Sorry,

wrong button. I found the problem but new one is coming. It's seems the library libamdhip64.so need to be located in /usr/lib64/ together with libamd_comgr.so.2 and libhsa-runtime64.so.1, ldconfig /opt/rocm-6.0.2/lib64 not working.

but now new issue in configure is coming :

` -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Configuring done (207.8s) CMake Error in library/src/CMakeLists.txt: Imported target "hip::host" includes non-existent path

"/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

CMake Error in library/src/CMakeLists.txt: Imported target "hip::device" includes non-existent path

"/include"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

-- Generating done (0.0s) CMake Generate step failed. Build files cannot be regenerated correctly.

`