-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
Found in AOTriton 0.10b
ERROR:
[3700/40608] Linking CXX shared library v3src/libaotriton_v2.so.0.10.0
FAILED: v3src/libaotriton_v2.so.0.10.0
: && /usr/lib64/ccache/c++ -fPIC -finput-charset=UTF-8 -O3 -DNDEBUG -T /work/bootstrap-output/work-dir/aotriton-0.10b0/aotriton-0.10b0/build/v3src/set_aotriton_version.ld -shared -Wl,-soname,libaotriton_v2.so.0.10.0 -o v3src/libaotriton_v2.so.0.10.0 @CMakeFiles/aotriton_v2.rsp && :
/usr/bin/ld: .comment not found for insert
collect2: error: ld returned 1 exit status
Subject: [PATCH] Fix linker script circular dependency in version embedding
Remove INSERT AFTER .comment directive from linker scripts
- Fixes circular dependency where .comment section tries to insert after itself
- Resolves ld error: ".comment not found for insert" in ROCm builds
- Maintains version embedding while fixing section placement
See this issue: https://github.com/ROCm/aotriton/issues/113
Introduced in https://github.com/ROCm/aotriton/commit/e36921085a437b1eec6c3a2f68464b0e10737cb6
Tried with different ld commands as the issue author suggested, but the problem persists.
--- v2python/ld_script.py | 1 - v3python/ld_script.py | 1 - 2 files changed, 2 deletions(-)diff --git a/v2python/ld_script.py b/v2python/ld_script.py index b2ac4d4..96d98d4 100644 --- a/v2python/ld_script.py +++ b/v2python/ld_script.py @@ -26,7 +26,6 @@ def write_linker_script(args): print(""" BYTE(0) } } -INSERT AFTER .comment; """, file=f) def main(): diff --git a/v3python/ld_script.py b/v3python/ld_script.py index 1c78e45..50f2919 100644 --- a/v3python/ld_script.py +++ b/v3python/ld_script.py @@ -28,7 +28,6 @@ def write_linker_script(args): print(""" BYTE(0) } } -INSERT AFTER .comment; """, file=f) def main(): -- 2.51.0