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

build: use newer source for libnatpmp #21209

Merged
merged 2 commits into from
Mar 6, 2021

Commits on Mar 4, 2021

  1. build: use newer source for libnatpmp

    The source we are currently using is from 2015. The upstream repo has
    received a small number of bug fixes and improvements since then.
    Including one that fixes an issue for Windows users:
    miniupnp/libnatpmp#13.
    
    The source we are currently using is the most recent "official" release,
    however I don't think it's worth waiting for a new one. The maintainer
    was prompted to do so in Oct 2020, then again in Jan of this year, and
    no release has eventuated. Given libnatpmp is a new inclusion into our
    repository, I think we should be using this newer source.
    
    This also cleans up a few warnings we currently see in depends builds:
    ```bash
    Extracting libnatpmp...
    /home/ubuntu/bitcoin/depends/sources/libnatpmp-20150609.tar.gz: OK
    Preprocessing libnatpmp...
    Configuring libnatpmp...
    Building libnatpmp...
    make[1]: Entering directory '/home/ubuntu/bitcoin/depends/work/build/x86_64-w64-mingw32/libnatpmp/20150609-13efa1beb87'
    x86_64-w64-mingw32-gcc -Os -fPIC -Wall -DENABLE_STRNATPMPERR   -c -o natpmp.o natpmp.c
    x86_64-w64-mingw32-gcc -Os -fPIC -Wall -DENABLE_STRNATPMPERR   -c -o getgateway.o getgateway.c
    natpmp.c:42: warning: "EWOULDBLOCK" redefined
       42 | #define EWOULDBLOCK WSAEWOULDBLOCK
          |
    In file included from natpmp.c:38:
    /usr/share/mingw-w64/include/errno.h:166: note: this is the location of the previous definition
      166 | #define EWOULDBLOCK 140
          |
    natpmp.c:43: warning: "ECONNREFUSED" redefined
       43 | #define ECONNREFUSED WSAECONNREFUSED
          |
    In file included from natpmp.c:38:
    /usr/share/mingw-w64/include/errno.h:110: note: this is the location of the previous definition
      110 | #define ECONNREFUSED 107
          |
    natpmp.c:271:5: warning: ‘readnatpmpresponseorretry’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
      271 | int readnatpmpresponseorretry(natpmp_t * p, natpmpresp_t * response)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~
    ar crs libnatpmp.a natpmp.o getgateway.o
    make[1]: Leaving directory '/home/ubuntu/bitcoin/depends/work/build/x86_64-w64-mingw32/libnatpmp/20150609-13efa1beb87'
    Staging libnatpmp...
    Postprocessing libnatpmp...
    Caching libnatpmp...
    ```
    fanquake committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    ee35745 View commit details
    Browse the repository at this point in the history
  2. build: compile libnatpmp with -DNATPMP_STATICLIB on Windows

    This fixes linking issues and mirrors what we do with miniupnpc.
    fanquake committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    7af2502 View commit details
    Browse the repository at this point in the history