Open maximegmd opened 4 days ago
master
Ubuntu 24.04
When building on Linux, -fPIC is not passed during compilation of static libraries causing link issues.
To build, I need to add the flag explicitly add_cxflags("-fPIC")
add_cxflags("-fPIC")
-fPIC should be passed to static libraries and required packages to ensure correct linkage.
https://github.com/tiltedphoques/CyberpunkMP/tree/server-hosting
https://github.com/tiltedphoques/CyberpunkMP/actions/runs/12004901267/job/33460617334
see https://github.com/xmake-io/xmake/issues/302
You need to add this flag manually, we don't consider adding it automatically internally, which will cause a lot of other problems.
Xmake Version
master
Operating System Version and Architecture
Ubuntu 24.04
Describe Bug
When building on Linux, -fPIC is not passed during compilation of static libraries causing link issues.
To build, I need to add the flag explicitly
add_cxflags("-fPIC")
Expected Behavior
-fPIC should be passed to static libraries and required packages to ensure correct linkage.
Project Configuration
https://github.com/tiltedphoques/CyberpunkMP/tree/server-hosting
Additional Information and Error Logs
https://github.com/tiltedphoques/CyberpunkMP/actions/runs/12004901267/job/33460617334