[build] Update ax_jni_include_dir.m4 macro #460

pull kallewoof wants to merge 2 commits into bitcoin-core:master from kallewoof:update-ax_jni_include_dir changing 1 files +26 −21
  1. kallewoof commented at 8:26 AM on June 15, 2017: member

    Prior to this patch, this macro fails to find a working directory for the JNI headers, and results in compile failure when doing

    ./configure --enable-experimental --enable-module-ecdh --enable-jni
    

    on more recent macOS versions. The relevant commit upstream is here from the GNU.org page for the macro. The original (identical to the version in this commit) is here.

    The compile failure:

    $ make
    gcc -I. -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o
    gcc gen_context.o -o gen_context
    ./gen_context
      CC       src/libsecp256k1_la-secp256k1.lo
      CC       src/java/libsecp256k1_jni_la-org_bitcoin_NativeSecp256k1.lo
    In file included from src/java/org_bitcoin_NativeSecp256k1.c:4:
    In file included from src/java/org_bitcoin_NativeSecp256k1.h:2:
    /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Headers/jni.h:45:10: fatal error:
          'jni_md.h' file not found
    #include "jni_md.h"
             ^
    1 error generated.
    make: *** [src/java/libsecp256k1_jni_la-org_bitcoin_NativeSecp256k1.lo] Error 1
    
  2. jgriffiths commented at 12:06 AM on June 29, 2017: contributor

    Pinging @theuni, if you get a moment to review this could you ack/nack? Thanks.

  3. theuni commented at 6:14 AM on June 30, 2017: contributor

    Without looking into it in much detail, utACK on the bump to latest upstream.

  4. jgriffiths commented at 1:15 PM on June 30, 2017: contributor

    Thanks @theuni - On further testing here the AC_CHECK_FILE part needs to be removed otherwise cross compilation is broken by this upgrade. Hopefully @kallewoof will update the PR shortly.

  5. theuni commented at 2:31 PM on June 30, 2017: contributor

    @jgriffiths ugh, that's what I get for not looking in detail. Thanks for that.

    I forgot that we have un-upstreamed changes to that file. Digging through my history I found this, which we'll need (partially) merged back in: https://github.com/theuni/secp256k1/commit/2d9055f22ca7fd5922059bb3b6ea2ac2540af951

    Any interest in upstreaming the result?

  6. kallewoof commented at 11:14 AM on July 3, 2017: member

    I manually applied https://github.com/theuni/secp256k1/commit/2d9055f22ca7fd5922059bb3b6ea2ac2540af951 which seems to be mostly compatible with the updated version.

  7. kallewoof force-pushed on Jul 3, 2017
  8. [build] Update ax_jni_include_dir.m4 macro to deal with recent versions of macOS 5b22977922
  9. [build] Tweak JNI macro to warn instead of error for JNI not found. e7daa9b3c2
  10. kallewoof force-pushed on Jul 6, 2017
  11. kallewoof commented at 9:07 AM on July 6, 2017: member

    Upstream PR was merged. This PR was rebased with new upstream. A tiny tweak to WARN instead of ERROR was added as well. 5b22977 should be identical to upstream.

  12. theuni commented at 11:51 PM on July 7, 2017: contributor

    @kallewoof thanks!

    utACK e7daa9b3c24cff39b02f767124ae027eee233070

  13. gmaxwell commented at 11:05 PM on February 6, 2018: contributor

    ACK

  14. gmaxwell merged this on Feb 6, 2018
  15. gmaxwell closed this on Feb 6, 2018

  16. gmaxwell referenced this in commit cd329dbc3e on Feb 6, 2018

github-metadata-mirror

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

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