Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: cmake build failed #156

Open
yuqie opened this issue Aug 29, 2024 · 2 comments
Open

[Issue]: cmake build failed #156

yuqie opened this issue Aug 29, 2024 · 2 comments

Comments

@yuqie
Copy link

yuqie commented Aug 29, 2024

Problem Description

I follow the readme to build the Docker image and full examples using CMake:

$ git clone https://github.com/ROCm/rocm-examples.git
$ cd rocm-examples/Dockerfiles
$ docker build . -t rocm-examples -f hip-libraries-rocm-ubuntu.Dockerfile  
$ docker run -it --device /dev/kfd --device /dev/dri rocm-examples bash 
# git clone https://github.com/ROCm/rocm-examples.git
# cd rocm-examples
# cmake -S . -B build 
# cmake --build build

some error I encountered

developer@c26d005341df:/workspaces/rocm-examples$ cmake -S . -B build
-- GPU_ARCHITECTURES: gfx942
-- GPU_ARCHITECTURES: gfx942
-- Google Test not found. Fetching...
-- Google Benchmark not found. Fetching...
-- LLVM FileCheck Found: /usr/bin/FileCheck
-- git version: v1.6.1 normalized to 1.6.1
-- Version: 1.6.1
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring done
-- Generating done
-- Build files have been written to: /workspaces/rocm-examples/build
developer@c26d005341df:/workspaces/rocm-examples$ cmake --build build
developer@c26d005341df:/workspaces/rocm-examples$ cmake --build build
Scanning dependencies of target applications_bitonic_sort
[  0%] Built target applications_bitonic_sort
Scanning dependencies of target applications_convolution
[  1%] Built target applications_convolution
Scanning dependencies of target applications_floyd_warshall
[  1%] Built target applications_floyd_warshall
Scanning dependencies of target applications_histogram
[  2%] Built target applications_histogram
Scanning dependencies of target applications_monte_carlo_pi
[  3%] Built target applications_monte_carlo_pi
Scanning dependencies of target applications_prefix_sum
[  3%] Built target applications_prefix_sum
Scanning dependencies of target hip_llvm_ir_to_executable
[  3%] Linking HIP executable ../../bin/HIP-Basic/hip_llvm_ir_to_executable
ld.lld: error: undefined symbol: __hip_fatbin
>>> referenced by main.hip
>>>               CMakeFiles/hip_llvm_ir_to_executable.dir/main.hip.o:(__hip_fatbin_wrapper)
>>> did you mean: __hip_fatbin_
>>> defined in: main_device.o
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [HIP-Basic/llvm_ir_to_executable/CMakeFiles/hip_llvm_ir_to_executable.dir/build.make:111: bin/HIP-Basic/hip_llvm_ir_to_executable] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2599: HIP-Basic/llvm_ir_to_executable/CMakeFiles/hip_llvm_ir_to_executable.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

could anyone give me some advice?

Operating System

VERSION="22.04.4 LTS (Jammy Jellyfish)"

CPU

AMD EPYC 9654 96-Core Processor

GPU

AMD Instinct MI300X

ROCm Version

ROCm 6.1.0

ROCm Component

No response

Steps to Reproduce

No response

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

No response

Additional Information

No response

@Snektron
Copy link
Collaborator

Hi, the functionality related to this has changed in a recent version of ROCm. Currently, there is only a tag for ROCm 6.2.0, so it would be best to use that version of ROCm with that version of the ROCm examples. If thats not possible or simply undesirable, I believe the related changes were introduced in PR #142, so perhaps you can try out 33dff59 if your ROCm version is less than 6.2.

@yuqie
Copy link
Author

yuqie commented Aug 30, 2024

Hi, the functionality related to this has changed in a recent version of ROCm. Currently, there is only a tag for ROCm 6.2.0, so it would be best to use that version of ROCm with that version of the ROCm examples. If thats not possible or simply undesirable, I believe the related changes were introduced in PR #142, so perhaps you can try out 33dff59 if your ROCm version is less than 6.2.

Thank you, I will try it with ROCm 6.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants