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

Fix -no-pie option spelling #860

Closed
wants to merge 1 commit into from
Closed

Conversation

AMDmi3
Copy link
Contributor

@AMDmi3 AMDmi3 commented Sep 26, 2022

No idea where -no_pie comes from, but lld, gold and clang all accept -no-pie. For the record, I think that this whole hack should be removed - the commits says it was created for "certain file managers", but shouldn't these file managers be fixed instead, as any installation where executables built with default compiler arguments are not recognized is executables is terminally broken. There's definitely no place for fixes for third party file managers in TPT code.

AMDmi3 referenced this pull request Sep 26, 2022
Certain file managers need this figure out that the executable is actually executable. The problem is further complicated by meson being uncooperative and not implementing its own -Db_pie=false correctly.
@AMDmi3
Copy link
Contributor Author

AMDmi3 commented Sep 26, 2022

Upd: CI suggests that -no_pie is darwin specific, so I've had to complicate it further.

@jacob1
Copy link
Member

jacob1 commented Sep 26, 2022

According to the clang docs -no-pie is correct. I guess on mac it is -no_pie instead. Clang on non-mac systems isn't something we often test, so that's why we wouldn't have noticed it was broken.

Regarding the file managers, we don't control those, you are free to try to get the bugs fixed upsteam in those. It happens in gnome-based file managers like nautilus and caja, they will refuse to treat executables compiled with -pie as actual executables.

@LBPHacker
Copy link
Member

I've been considering moving this and other very specific and, in some cases, hacky options from the meson config over to the ghactions build script, as they exist solely to support our very specific use case of building a binary with the fewest possible environmental dependencies. You're not meant to use these options either as a contributor during development or as a maintainer when packaging the game for your distro. In the latter case, it's actually very likely that some of them will only get in your way.

@LBPHacker
Copy link
Member

How is a8d2b26?

@AMDmi3
Copy link
Contributor Author

AMDmi3 commented Oct 7, 2022

How is a8d2b26?

Works for me, however there are unrelated build issues. ENOTIME right now to create proper pull requests/issues, so will mentione them here:

@LBPHacker
Copy link
Member

Cool, thanks for checking.

-DUSE_STDINT=1 needs to be added to C(XX)FLAGS manually, otherwise build fails on bad typedef in src/bson/BSON.h, this should be added to meson.build

Everything we target has <cstdint> now, so that's something I'll fix in BSON.h instead.

Template processing for metainfo file is missing, quick fix: https://gist.github.com/541c8e30f39922177de80641271ec877

That's because I left that part to when I'd get around to working on #835.

LBPHacker added a commit to LBPHacker/The-Powder-Toy that referenced this pull request Oct 10, 2022
This is problematic as per a comment on The-Powder-Toy#860, and everything we target has <cstdint> now.
cracker1000 added a commit to cracker1000/The-Powder-Toy that referenced this pull request Oct 13, 2022
This is problematic as per a comment on The-Powder-Toy#860, and everything we target has <cstdint> now.
@jacob1
Copy link
Member

jacob1 commented Dec 21, 2022

Closing as seemingly resolved. The commit LBPHacker gave above was already merged (thus the reason this PR has conflicts), as were some other mentioned fixes.

@jacob1 jacob1 closed this Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants