Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fPIC not applied to static libs #5881

Open
maximegmd opened this issue Nov 25, 2024 · 1 comment
Open

fPIC not applied to static libs #5881

maximegmd opened this issue Nov 25, 2024 · 1 comment

Comments

@maximegmd
Copy link

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

@waruqi
Copy link
Member

waruqi commented Nov 26, 2024

see #302

You need to add this flag manually, we don't consider adding it automatically internally, which will cause a lot of other problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants