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

Update miniupnpc include paths #99218

Closed
wants to merge 1 commit into from

Conversation

Sticksman
Copy link
Contributor

Fixes some include since we removed adding the miniupnpc lib to the path.

Fixes #99196

@Sticksman
Copy link
Contributor Author

Looks like it doesn't build for other platforms, will take a look

@akien-mga
Copy link
Member

The problem here is that unlike most C/C++ libraries, miniupnpc has a discrepancy between the includes it uses for building from source, and the includes it expects from other applications using its public headers.

The files in thirdparty/miniupnpc/src/ use includes like #include "miniupnpcstrings.h", and those includes are in thirdparty/miniupnpc/include/, which is added to the include path when using the builtin_miniupnpc=yes code path (default).

So Godot's own code that uses this builtin copy of miniupnpc also has thirdparty/miniupnpc/include/ as include path, and includes those headers without a miniupnpc/ prefix.

But the miniupnpc pkgconfig file forces a use relative to /usr/include, and expects the paths to the miniupnpc/miniupnpcstrings.h, which can't be true both when using our vendored copy (with no miniupnpc/ subfolder) and the system one.

We could move thirdparty/miniupnpc/include/ to thirdparty/miniupnpc/include/miniupnpc/ and add this as include path for building the miniupnpc C files, but add thirdparty/miniupnpc/include/ only as include path for building Godot files, but that's pretty messy.

IMO we should just partially revert that change, as miniupnpc's pkgconfig file is IMO incorrect.

@akien-mga
Copy link
Member

CC @dustdfg

@Sticksman
Copy link
Contributor Author

Thank you for the very detailed explanation! That all sounds incredibly annoying and a splitting headache. We should update the issue with this explanation.

@Sticksman Sticksman closed this Nov 15, 2024
@AThousandShips AThousandShips removed this from the 4.4 milestone Nov 15, 2024
ArchercatNEO added a commit to ArchercatNEO/godot that referenced this pull request Nov 27, 2024
tGautot pushed a commit to tGautot/godot that referenced this pull request Feb 5, 2025
WhalesState pushed a commit to WhalesState/blazium that referenced this pull request Mar 16, 2025
WhalesState pushed a commit to WhalesState/blazium that referenced this pull request Mar 16, 2025
WhalesState pushed a commit to WhalesState/blazium that referenced this pull request Mar 16, 2025
WhalesState pushed a commit to WhalesState/blazium that referenced this pull request Mar 16, 2025
WhalesState pushed a commit to WhalesState/blazium that referenced this pull request Mar 20, 2025
WhalesState pushed a commit to WhalesState/blazium that referenced this pull request Mar 20, 2025
JackErb pushed a commit to JackErb/godot that referenced this pull request Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot build with builtin_miniupnpc=no
4 participants