error: no matching function for call to 'upnpDiscover' #8967

issue mohamedfawzy96 opened this issue on October 18, 2016
  1. mohamedfawzy96 commented at 6:04 PM on October 18, 2016: none

    net.cpp:1066:15: error: no matching function for call to 'upnpDiscover' devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error); ^~~~~~~~~~~~ /usr/local/include/miniupnpc/miniupnpc.h:62:1: note: candidate function not viable: requires 7 arguments, but 6 were provided upnpDiscover(int delay, const char * multicastif,

    This error appears when i try to compile the source code

  2. MarcoFalke commented at 7:09 PM on October 18, 2016: member

    Please provide exact steps to reproduce. Including the software you are running on.

  3. paveljanik commented at 7:28 PM on October 18, 2016: contributor

    ... especially the version of miniupnpc...

  4. laanwj commented at 8:33 AM on October 19, 2016: member

    Yes, looks like an UPNP version conflict. They like to just slap on arguments sometimes. If you don't feel like debugging this I'd suggest configuring with --without-miniupnpc.

  5. mohamedfawzy96 commented at 8:43 AM on October 19, 2016: none

    @paveljanik @MarcoFalke I'm using mac OS X and I'm trying to compile the source code and every time I "make"... this error pops up.I don't really know which version i'm using.

  6. mohamedfawzy96 commented at 8:44 AM on October 19, 2016: none

    @laanwj would this effect any of my work flow in the future ?

  7. mohamedfawzy96 commented at 12:54 PM on October 19, 2016: none

    Version 2.0

  8. laanwj commented at 3:12 PM on October 19, 2016: member

    Version 2.0 is the same one as used in gitian, so that should work. Strange. This is the code in question:

    #ifndef UPNPDISCOVER_SUCCESS
        /* miniupnpc 1.5 */
        devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
    #elif MINIUPNPC_API_VERSION < 14
        /* miniupnpc 1.6 */
        int error = 0;
        devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
    #else
        /* miniupnpc 1.9.20150730 */
        int error = 0;
        devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
    #endif
    

    It should only be trying to pass 6 arguments if MINIUPNPC_API_VERSION, which is a long time ago.

    What version of bitcoin core are you trying to compile?

  9. laanwj added the label Build system on Oct 19, 2016
  10. mohamedfawzy96 commented at 3:25 PM on October 19, 2016: none

    @laanwj I'm using version 0.9.5 of bitcoin core.

    should i try another version of bitcoin core ?

  11. laanwj commented at 3:26 PM on October 19, 2016: member

    0.9.5 is old. You should use 0.13.0.

  12. laanwj commented at 3:27 PM on October 19, 2016: member

    Closing, build issues with old versions are not supported...

  13. laanwj closed this on Oct 19, 2016

  14. mohamedfawzy96 commented at 3:31 PM on October 19, 2016: none

    Thank you so much @laanwj

  15. MarcoFalke commented at 6:13 PM on October 19, 2016: member

    @mohamedfawzy96 I am interested in your rationale in choosing 0.9.5. Did someone recommend it to you?

  16. jackson-sandland commented at 7:18 PM on October 29, 2017: none

    I suspect that the reason @mohamedfawzy96 chose v0.9.5 is that it is the latest stable version that is not labeled as a release candidate in the output from git tag That is still the case today...

  17. laanwj commented at 7:22 PM on October 29, 2017: member

    That's because it sorts alphabetically not numerically.

  18. xingfeT commented at 5:16 AM on January 12, 2018: none

    thanks

  19. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me