Prevent enet 1.3.18 from installing its include and static files#280
Merged
TheAssassin merged 2 commits intoblue-nebula:masterfrom Dec 10, 2025
Merged
Prevent enet 1.3.18 from installing its include and static files#280TheAssassin merged 2 commits intoblue-nebula:masterfrom
TheAssassin merged 2 commits intoblue-nebula:masterfrom
Conversation
…itch to -D_FORTIFY_SOURCE=3
Member
|
Compatibility with Ubuntu 22.04 is absolutely needed. Does this change work with that? Also, technically, you should split this into two commits. We prefer atomic commits. |
Contributor
Author
Ok, I just checked, 22.04 uses GCC 11 which doesn't support D_FORTIFY_SOURCE=3, so we'll have to stay on D_FORTIFY_SOURCE=2. Is everything correct with the enet change? |
Member
|
Yes, that is exactly how it's done. |
TheAssassin
approved these changes
Dec 10, 2025
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since updating enet to 1.3.18 a few days ago, it has started installing its include and static files with the game (
/include/enetand/lib/static/libenet.a) probably due to the addition of these lines in enet 1.3.18 cmakelists file.I'll admit that I'm not very experienced with cmake so please check if this is correct, but from what I understand, adding
EXCLUDE_FROM_ALLafteradd_subdirectory(${ENET_SOURCE_DIRECTORY}should prevent enet from installing its files but still make it build and statically link with the game.Since we use strong hardening flags, I thought it makes sense to switch to -D_FORTIFY_SOURCE=3, which is also more aligned with modern distros. However, note that it requires relatively recent compiler versions from about 2022. So if you're interested in being able to build the game on older compilers, we should probably stay on -D_FORTIFY_SOURCE=2.