Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934315 - games-strategy/0ad-0.0.26_alpha-r1 fails to build with net-libs/miniupnpc-2.2.8: source/network/NetServer.cpp:305:39: error: too few arguments to function ‘int UPNP_GetValidIGD(UPNPDev*, UPNPUrls*, IGDdatas*, char*, int, char*, int)’
Summary: games-strategy/0ad-0.0.26_alpha-r1 fails to build with net-libs/miniupnpc-2.2...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-14 20:12 UTC by Torsten Kaiser
Modified: 2024-06-16 22:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
add support for MINIUPNPC_API_VERSION >= 18 (fix-miniupnpc-api-breakage.patch,1.44 KB, patch)
2024-06-14 20:12 UTC, Torsten Kaiser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Kaiser 2024-06-14 20:12:46 UTC
Created attachment 895833 [details, diff]
add support for MINIUPNPC_API_VERSION >= 18

It's the same problem as Bug 934173 or Bug 934016: net-libs/miniupnpc-2.2.8 changed the parameter and return values of UPNP_GetValidIGD() and everything broken.

I used the transmission patch from https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77a19a999ea1f73ac0e4b0ec1973d4392994ab68 as a base to adapt 0ad for the changes from https://github.com/miniupnp/miniupnp/commit/c0a50ce33e3b99ce8a96fd43049bb5b53ffac62f - with this applied as a user patch my build succeeded.

Due to the changes of the return values the patch also needs to modify logging switch() after the call - that looks a little ugly, but as the values 2 and 3 changed meaning it is necessary.
Comment 1 Andrew Nowa Ammerlaan gentoo-dev 2024-06-16 17:00:00 UTC
Patch works on my end
Comment 2 Larry the Git Cow gentoo-dev 2024-06-16 22:34:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57d4ce1472ddaf7879e4419495c037420155920b

commit 57d4ce1472ddaf7879e4419495c037420155920b
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2024-06-16 22:33:50 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2024-06-16 22:33:50 +0000

    games-strategy/0ad: Fix compatibility with miniupnpc 2.2.8 with patch
    
    Thanks to Torsten Kaiser for the patch.
    
    Closes: https://bugs.gentoo.org/934315
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild      |  1 +
 .../0ad/files/0ad-0.0.26_alpha-miniupnpc.patch     | 38 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)