<p>I was hoping that someone would be able to suggest something about this
(the same process works perfectly fine on my Debian Jessy machine)</p>

<pre><code>$ uname -a
Linux front 4.8.0-1-amd64 #1 SMP Debian 4.8.7-1 (2016-11-13) x86_64 GNU/Linux

$ git config --get remote.origin.url
https://github.com/bitcoin-core/secp256k1

$ git pull
Already up-to-date.

$ ./autogen.sh
...

$ ./configure
...

$ 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
  CCLD     libsecp256k1.la
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CC       src/tests-tests.o
src/tests.c: In function ‘test_ecdsa_der_parse’:
src/tests.c:3702:52: error: dereferencing pointer to incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
valid_openssl = !BN_is_negative(sig_openssl-&gt;r) &amp;&amp;
!BN_is_negative(sig_openssl-&gt;s) &amp;&amp; BN_num_bits(sig_openssl-&gt;r) &gt; 0 &amp;&amp;
BN_num_bits(sig_openssl-&gt;r) &lt;= 256 &amp;&amp; BN_num_bits(sig_openssl-&gt;s) &gt; 0 &amp;&amp;
 BN_num_bits(sig_openssl-&gt;s) &lt;= 256;
                                                ^~
Makefile:1050: recipe for target 'src/tests-tests.o' failed
make: *** [src/tests-tests.o] Error 1
</code></pre>

<p><strong>EDIT:</strong> replacing <code>./configure</code> by <code>./configure --enable-tests=no</code> leads to a successful build. The command <code>make check</code> is also successful.</p>

<p><strong>EDIT2:</strong> As indicated by Andrew, the answer is to use <code>./configure --enable-openssl-tests=no</code></p>

<p><strong>EDIT3: This issue has been resolved on master branch, as far as I can tell</strong></p>

CC BY-SA 3.0
2016-11-30T19:00:57.747Z
Looks like OpenSSL has changed something out from under us ... for now you can compile with `--enable-openssl-tests=no` to still get the tests, OpenSSL is only used in the test jig and only in a small way. Can you open an issue on the libsecp github?
Andrew Poelstra
CC BY-SA 3.0
2016-11-30T20:17:11.680Z
Hi Andrew, thank you. I can confirm that `--enable-openssl-tests=no` solves the issue while giving access to tests. Yes I will open an issue on libsecp github
Sven Williamson
CC BY-SA 3.0
2016-11-30T20:47:07.727Z
Andrew I am guessing you don't care, but if you were to write a quick answer, I would obviously validate it since your comment closes this thread
Sven Williamson
CC BY-SA 3.0
2016-12-02T22:37:15.827Z
@AndrewPoelstra: yes, OpenSSL 1.1.0 makes some structs 'opaque' including ECDSA_SIG. You are now supposed to use `ECDSA_SIG_{set,get}0` to access the fields.
dave_thompson_085
<linux><secp256k1><c><make>
Cannot build secp256k1 C library on Debian stretch
Sven Williamson
# Cannot build secp256k1 C library on Debian stretch

(Asked by: username_0 on 2016-11-30)

I was hoping that someone would be able to suggest something about this
(the same process works perfectly fine on my Debian Jessy machine)
$ uname -a
Linux front 4.8.0-1-amd64 #1 SMP Debian 4.8.7-1 (2016-11-13) x86_64 GNU/Linux

$ git config --get remote.origin.url
https://github.com/bitcoin-core/secp256k1

$ git pull
Already up-to-date.

$ ./autogen.sh
...

$ ./configure
...

$ 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
  CCLD     libsecp256k1.la
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CC       src/tests-tests.o
src/tests.c: In function ‘test_ecdsa_der_parse’:
src/tests.c:3702:52: error: dereferencing pointer to incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
valid_openssl = !BN_is_negative(sig_openssl->r) &&
!BN_is_negative(sig_openssl->s) && BN_num_bits(sig_openssl->r) > 0 &&
BN_num_bits(sig_openssl->r) <= 256 && BN_num_bits(sig_openssl->s) > 0 &&
 BN_num_bits(sig_openssl->s) <= 256;
                                                ^~
Makefile:1050: recipe for target 'src/tests-tests.o' failed
make: *** [src/tests-tests.o] Error 1

EDIT: replacing ./configure by ./configure --enable-tests=no leads to a successful build. The command make check is also successful.
EDIT2: As indicated by Andrew, the answer is to use ./configure --enable-openssl-tests=no
EDIT3: This issue has been resolved on master branch, as far as I can tell

**Tags:** linux, secp256k1, c, make

> **Comments:**
> **username_1**: Looks like OpenSSL has changed something out from under us ... for now you can compile with `--enable-openssl-tests=no` to still get the tests, OpenSSL is only used in the test jig and only in a small way. Can you open an issue on the libsecp github?  
> **username_0**: Hi Andrew, thank you. I can confirm that `--enable-openssl-tests=no` solves the issue while giving access to tests. Yes I will open an issue on libsecp github  
> **username_0**: Andrew I am guessing you don't care, but if you were to write a quick answer, I would obviously validate it since your comment closes this thread  
> **username_2**: @AndrewPoelstra: yes, OpenSSL 1.1.0 makes some structs 'opaque' including ECDSA_SIG. You are now supposed to use `ECDSA_SIG_{set,get}0` to access the fields.  

---

## 0 answers

