microsoft / microsoft/onnxruntime
cmake error when adding --build_shared_lib or --build_nodejs to rocm
Open
Nobody has claimed this yet.
build
contributions welcome
feature request
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 179
Description
adding any of --build_shared_lib or --build_nodejs options to rocm will lead to
CMake Error at onnxruntime.cmake:210 (target_link_libraries):
Target "onnxruntime_providers_rocm" of type MODULE_LIBRARY may not be
linked into another target. One may link only to INTERFACE, OBJECT, STATIC
or SHARED libraries, or to executables with the ENABLE_EXPORTS property
set.
Call Stack (most recent call first):
CMakeLists.txt:2098 (include)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by configuring the ROCm build with --build_shared_lib or --build_nodejs. Inspect onnxruntime.cmake around line 210 and its inclusion from CMakeLists.txt around line 2098; done means both options configure and build without the target_link_libraries error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100