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

Unable to build litecoin 0.21.4 on Ubuntu 24.10 (oracular) #993

Open
jhonny-oliveira opened this issue Nov 20, 2024 · 1 comment
Open

Unable to build litecoin 0.21.4 on Ubuntu 24.10 (oracular) #993

jhonny-oliveira opened this issue Nov 20, 2024 · 1 comment

Comments

@jhonny-oliveira
Copy link

Expected behavior

Successful build

Actual behavior

Failed build. The build is successful on Ubuntu 24.04 and older versions.

net.cpp: In function ‘void ThreadMapPort()’:
net.cpp:1640:25: error: too few arguments to function ‘int UPNP_GetValidIGD(UPNPDev*, UPNPUrls*, IGDdatas*, char*, int, char*, int)’
 1640 |     r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from net.cpp:40:
/usr/include/miniupnpc/miniupnpc.h:122:1: note: declared here
  122 | UPNP_GetValidIGD(struct UPNPDev * devlist,
      | ^~~~~~~~~~~~~~~~

To reproduce
You can find attached to complete build log: Build_litecoin_0.21.4_on_Ubuntu_24.10_log.txt.
The build recipe can be found here: https://launchpad.net/~xtradeb/+archive/ubuntu/apps/+packages?field.name_filter=litecoin&field.status_filter=published&field.series_filter=noble

System information
Ubuntu 24.10

@jhonny-oliveira
Copy link
Author

The problem is that Ubuntu 24.10 ships with miniupnpc 2.2.8. Previous version had 2.2.6.

To ensure fix the problem and maintain compatibility with both versions, I applied this patch:

Description: Ensure compat with miniupnpc 2.2.8
Author: Jhonny Oliveira <[email protected]>

--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1637,7 +1637,11 @@
     struct IGDdatas data;
     int r;
 
+#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION <= 17
     r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
+#else
+    r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), NULL, 0);
+#endif
     if (r == 1)
     {
         if (fDiscover) {

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

No branches or pull requests

1 participant