Skip to content

CMakeLists: fix build failure by removing -pie from shared library ta…#221

Open
yktyagi wants to merge 1 commit intointel:masterfrom
yktyagi:master
Open

CMakeLists: fix build failure by removing -pie from shared library ta…#221
yktyagi wants to merge 1 commit intointel:masterfrom
yktyagi:master

Conversation

@yktyagi
Copy link

@yktyagi yktyagi commented Sep 10, 2025

…rgets

With CMake 4.1.0 the build of libipmctl started failing with:

error: undefined reference to main in *.S

  • -pie is only valid when linking executables (PIE), not shared libraries.
  • When applied to a shared library, the linker expects a main symbol, causing the undefined reference error.
  • Remove -pie from shared libraries linker flag

…rgets

With CMake 4.1.0 the build of libipmctl started failing with:

  error: undefined reference to `main` in *.S

- `-pie` is only valid when linking executables (PIE), not shared
  libraries.
- When applied to a shared library, the linker expects a `main`
  symbol, causing the undefined reference error.
- Remove `-pie` from shared libraries linker flag

Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
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

Successfully merging this pull request may close these issues.

1 participant

Comments