Skip to content

Build 1.7.2 fails on alpine Linux on Arm64 #525

Open

Description

@kometchtech

As reported in #457, I have noticed that the build fails when using build on arm64 Alpine Linux.

  • Alpine Linux 3.16.2 aarch64
  • getdns 1.7.2
  • gnutls 3.16.16
#0 19.09 [ 37%] Building C object CMakeFiles/getdns_objects.dir/src/tls/val_secalgo.c.o
#0 19.63 /usr/src/src/tls/val_secalgo.c: In function '_verify_nettle_dsa':
#0 19.63 /usr/src/src/tls/val_secalgo.c:1723:31: error: storage size of 'pubkey' isn't known
#0 19.63  1723 |         struct dsa_public_key pubkey;
#0 19.63       |                               ^~~~~~
#0 19.67 /usr/src/src/tls/val_secalgo.c:1779:9: warning: implicit declaration of function 'nettle_dsa_public_key_init'; did you mean 'nettle_rsa_public_key_init'? [-Wimplicit-function-declaration]
#0 19.67  1779 |         nettle_dsa_public_key_init(&pubkey);
#0 19.67       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
#0 19.67       |         nettle_rsa_public_key_init
#0 19.70 /usr/src/src/tls/val_secalgo.c:1792:16: warning: implicit declaration of function 'dsa_sha1_verify_digest'; did you mean 'rsa_sha1_verify_digest'? [-Wimplicit-function-declaration]
#0 19.70  1792 |         res &= dsa_sha1_verify_digest(&pubkey, digest, &signature);
#0 19.70       |                ^~~~~~~~~~~~~~~~~~~~~~
#0 19.70       |                rsa_sha1_verify_digest
#0 19.71 /usr/src/src/tls/val_secalgo.c:1796:9: warning: implicit declaration of function 'nettle_dsa_public_key_clear'; did you mean 'nettle_rsa_public_key_clear'? [-Wimplicit-function-declaration]
#0 19.71  1796 |         nettle_dsa_public_key_clear(&pubkey);
#0 19.71       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 19.71       |         nettle_rsa_public_key_clear
#0 19.71 /usr/src/src/tls/val_secalgo.c:1723:31: warning: unused variable 'pubkey' [-Wunused-variable]
#0 19.71  1723 |         struct dsa_public_key pubkey;
#0 19.71       |                               ^~~~~~
#0 19.74 /usr/src/src/tls/val_secalgo.c: In function '_verify_nettle_ecdsa':
#0 19.75 /usr/src/src/tls/val_secalgo.c:1907:57: error: 'nettle_secp_256r1' undeclared (first use in this function); did you mean 'nettle_get_secp_256r1'?
#0 19.75  1907 |                         nettle_ecc_point_init(&pubkey, &nettle_secp_256r1);
#0 19.75       |                                                         ^~~~~~~~~~~~~~~~~
#0 19.75       |                                                         nettle_get_secp_256r1
#0 19.75 /usr/src/src/tls/val_secalgo.c:1907:57: note: each undeclared identifier is reported only once for each function it appears in
#0 19.77 /usr/src/src/tls/val_secalgo.c:1929:57: error: 'nettle_secp_384r1' undeclared (first use in this function); did you mean 'nettle_get_secp_384r1'?
#0 19.77  1929 |                         nettle_ecc_point_init(&pubkey, &nettle_secp_384r1);
#0 19.77       |                                                         ^~~~~~~~~~~~~~~~~
#0 19.77       |                                                         nettle_get_secp_384r1
#0 19.83 make[2]: *** [CMakeFiles/getdns_objects.dir/build.make:538: CMakeFiles/getdns_objects.dir/src/tls/val_secalgo.c.o] Error 1
#0 19.83 make[2]: *** Waiting for unfinished jobs....
#0 22.66 make[1]: *** [CMakeFiles/Makefile2:892: CMakeFiles/getdns_objects.dir/all] Error 2
#0 22.66 make: *** [Makefile:146: all] Error 2

This problem does not occur in 1.7.0.
Is there any way to resolve this issue? Also, would I need to provide any additional information?

Activity

  1. kometchtech commented on Aug 20, 2022

    @kometchtech
    Author

    Sorry again and again.
    We have been able to reproduce the issue and have reopened it.

  2. wtoorop commented on Aug 22, 2022

    @wtoorop
    Contributor

    Thanks @kometchtech . I've installed an alpine linux container to reproduce, but it looks the build failed with be because gnutls-dane cannot be found. Did you manually compile gnutls for your installation?

  3. kometchtech commented on Aug 22, 2022

    @kometchtech
    Author

    @wtoorop

    Thank you very much.

    I manually built gnutls by giving the following configure option.

    ARG BUILD_BASE="alpine-sdk lld gawk autoconf automake libtool xz"
    ARG BUILD_PKGS="${BUILD_BASE} openssl-dev gmp-dev libgmpxx libtasn1-dev p11-kit-dev libidn2-dev \
                    zlib-dev unbound-dev unbound-libs libunistring-dev libc6-compat libgcc nettle-dev "
    ENV LD="ld.lld"
    
    # build dependencies install
    RUN --mount=type=cache,target=/var/cache/apk \
        apk add --no-cache --update ${BUILD_PKGS}
    
        && ./configure \
           --disable-doc \
           --disable-tests \
           --enable-shared \
           --disable-tools \
           --disable-guile \
           --disable-srp-authentication \
           --disable-psk-authentication \
           --disable-anon-authentication \
           --enable-openssl-compatibility \
           --disable-dtls-srtp-support \
           --disable-alpn-support \
           --disable-heartbeat-support \
           --without-p11-kit \
           --without-tpm
    

    Is this information sufficient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions