[PR #1109] [MERGED] xxHash: fix link error due to non-position-independent code #1564

Closed
opened 2026-10-29 14:53:32 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/ktransformers/pull/1109
Author: @aubreyli
Created: 4/10/2025
Status: ✅ Merged
Merged: 4/13/2025
Merged by: @ErvinXie

Base: main ← Head: libxxhash-fPIC


📝 Commits (1)

  • 63ca2fa xxHash: fix link error due to non-position-independent code

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 csrc/balance_serve/CMakeLists.txt (+1 -0)

📄 Description

Add PROPERTIES POSITION_INDEPENDENT_CODE option to fix the following error:

/usr/bin/ld: ../../third_party/xxHash/libxxhash.a(xxhash.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC

Trying to link a non-PIC static library libxxhash.a into a .so shared library, which is not allowed. The object file xxhash.c.o must be recompiled with explicit -fPIC support.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/ktransformers/pull/1109 **Author:** [@aubreyli](https://github.com/aubreyli) **Created:** 4/10/2025 **Status:** ✅ Merged **Merged:** 4/13/2025 **Merged by:** [@ErvinXie](https://github.com/ErvinXie) **Base:** `main` ← **Head:** `libxxhash-fPIC` --- ### 📝 Commits (1) - [`63ca2fa`](https://github.com/kvcache-ai/ktransformers/commit/63ca2fa84dadc27a09af47678caf669bfd4c3f09) xxHash: fix link error due to non-position-independent code ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `csrc/balance_serve/CMakeLists.txt` (+1 -0) </details> ### 📄 Description Add PROPERTIES POSITION_INDEPENDENT_CODE option to fix the following error: /usr/bin/ld: ../../third_party/xxHash/libxxhash.a(xxhash.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC Trying to link a non-PIC static library libxxhash.a into a .so shared library, which is not allowed. The object file xxhash.c.o must be recompiled with explicit -fPIC support. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:53:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#1564
No description provided.