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

Compile error on latest Alpine #6943

Closed
psi-4ward opened this Issue Sep 7, 2018 · 6 comments

Comments

Projects
None yet
4 participants
@psi-4ward
Copy link

psi-4ward commented Sep 7, 2018

PowerDNS gives me compile errors for 4.1.2 and 4.1.4 on latest alpine docker base image.

checking whether compiling and linking against OpenSSL's libcrypto works... yes
checking /usr/include/openssl/ecdsa.h usability... yes
checking /usr/include/openssl/ecdsa.h presence... yes
checking for /usr/include/openssl/ecdsa.h... yes
CXX      opensslsigners.o
opensslsigners.cc: In function 'void RSA_get0_key(const RSA*, const BIGNUM**, const BIGNUM**, const BIGNUM**)':
opensslsigners.cc:80:20: error: 'void RSA_get0_key(const RSA*, const BIGNUM**, const BIGNUM**, const BIGNUM**)' was declared 'extern' and later 'static' [-fpermissive]                                                                                                                                                           
 static inline void RSA_get0_key(const RSA* rsakey, const BIGNUM** n, const BIGNUM** e, const BIGNUM** d) {                                                      
                    ^~~~~~~~~~~~                                                                           

....

opensslsigners.cc: In function 'int ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*)':
opensslsigners.cc:137:19: error: 'int ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*)' was declared 'extern' and later 'static' [-fpermissive]
 static inline int ECDSA_SIG_set0(ECDSA_SIG* signature, BIGNUM* pr, BIGNUM* ps) {
                   ^~~~~~~~~~~~~~
In file included from opensslsigners.cc:27:0:
/usr/include/openssl/ecdsa.h:148:5: note: previous declaration of 'int ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*)'
 int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
     ^~~~~~~~~~~~~~
make[3]: *** [Makefile:2581: opensslsigners.o] Error 1
make[3]: Leaving directory '/tmp/pdns-4.1.2/pdns'
make[2]: *** [Makefile:2145: all] Error 2
make[2]: Leaving directory '/tmp/pdns-4.1.2/pdns'
make[1]: *** [Makefile:540: all-recursive] Error 1
make[1]: Leaving directory '/tmp/pdns-4.1.2'
make: *** [Makefile:471: all] Error 2

To reproduce you could checkout master from https://github.com/psi-4ward/docker-powerdns and run a docker build .

Probably a bug with libressl (v2.7)?

Thanks for your help!

@phonedph1

This comment has been minimized.

Copy link
Contributor

phonedph1 commented Sep 8, 2018

Similar: #4338

@rgacogne

This comment has been minimized.

Copy link
Member

rgacogne commented Sep 8, 2018

rgacogne@1648b8f might help, but I didn't actually test it.

@Habbie

This comment has been minimized.

Copy link
Member

Habbie commented Sep 8, 2018

From my testing, master on Alpine (with libressl 2.7, I checked) fails as above. Master+rgacogne@1648b8f:

/pdns # pdns/pdnsutil test-algorithms
Warning: unable to read configuration file '/etc/pdns/pdns.conf': No such file or directory
Testing algorithm 5: 'OpenSSL RSA' ->'OpenSSL RSA' -> 'OpenSSL RSA' Signature & verify ok, signature 237usec, verify 54usec
Testing algorithm 7: 'OpenSSL RSA' ->'OpenSSL RSA' -> 'OpenSSL RSA' Signature & verify ok, signature 260usec, verify 84usec
Testing algorithm 8: 'OpenSSL RSA' ->'OpenSSL RSA' -> 'OpenSSL RSA' Signature & verify ok, signature 288usec, verify 49usec
Testing algorithm 10: 'OpenSSL RSA' ->'OpenSSL RSA' -> 'OpenSSL RSA' Signature & verify ok, signature 268usec, verify 48usec
Testing algorithm 13: 'OpenSSL ECDSA' ->'OpenSSL ECDSA' -> 'OpenSSL ECDSA' Signature & verify ok, signature 618usec, verify 716usec
Testing algorithm 14: 'OpenSSL ECDSA' ->'OpenSSL ECDSA' -> 'OpenSSL ECDSA' Signature & verify ok, signature 1494usec, verify 1176usec
@Habbie

This comment has been minimized.

Copy link
Member

Habbie commented Sep 8, 2018

With that patch, pdnsutil test-algorithms still works with OpenSSL 1.0.2p from osx brew.

@Habbie

This comment has been minimized.

Copy link
Member

Habbie commented Sep 8, 2018

On osx brew, with libressl:

  • openssl 1.0.2p with or without patch: works
  • patch+libressl 2.7.4: works
  • master+2.7.4: fails
  • master+2.6.4: works
  • patch+2.6.4: works
@psi-4ward

This comment has been minimized.

Copy link
Author

psi-4ward commented Sep 9, 2018

  • It compiles with libressl 2.6.4 from alpine:3.7
  • It compiles with 2.7 + 1648b8f

@rgacogne rgacogne referenced this issue Sep 10, 2018

Merged

Fix compilation with LibreSSL 2.7.0+ #6948

2 of 7 tasks complete

@rgacogne rgacogne added auth rec labels Sep 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.