Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936011 - net-libs/gnutls build error "field sha3_128 has incomplete type" on ARM MUSL
Summary: net-libs/gnutls build error "field sha3_128 has incomplete type" on ARM MUSL
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-13 20:43 UTC by Marius Dinu
Modified: 2024-07-22 15:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,6.94 KB, text/plain)
2024-07-13 20:43 UTC, Marius Dinu
Details
build log (net-libs:gnutls-3.8.6:20240713-202535.log,526.80 KB, text/x-log)
2024-07-13 20:44 UTC, Marius Dinu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Dinu 2024-07-13 20:43:49 UTC
Created attachment 897542 [details]
emerge --info

emerge net-libs/gnutls stops with these errors:

/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/mac.c:84:37: error: field 'sha3_128' has incomplete type
   84 |                 struct sha3_128_ctx sha3_128;
      |                                     ^~~~~~~~
/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/cipher.c: In function 'record_aes_gcm_encrypt_size':
/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/cipher.c:133:17: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  133 |             sum > AES_GCM_ENCRYPT_MAX_BYTES) {
      |                 ^
/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/mac.c: In function '_ctx_init':
/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/mac.c:748:40: error: 'sha3_128_init' undeclared (first use in this function); did you mean 'sha3_512_init'?
  748 |                 ctx->init = (init_func)sha3_128_init;
      |                                        ^~~~~~~~~~~~~
      |                                        sha3_512_init
/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/mac.c:748:40: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/mac.c:749:44: error: 'sha3_128_update' undeclared (first use in this function); did you mean 'sha3_512_update'?
  749 |                 ctx->update = (update_func)sha3_128_update;
      |                                            ^~~~~~~~~~~~~~~
      |                                            sha3_512_update
/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/mac.c:750:44: error: 'sha3_128_shake_output' undeclared (first use in this function)
  750 |                 ctx->digest = (digest_func)sha3_128_shake_output;
      |                                            ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-libs/gnutls-3.8.6/work/gnutls-3.8.6/lib/nettle/mac.c:757:44: error: 'sha3_256_shake_output' undeclared (first use in this function); did you mean 'sha3_256_shake'?
  757 |                 ctx->digest = (digest_func)sha3_256_shake_output;
      |                                            ^~~~~~~~~~~~~~~~~~~~~
      |                                            sha3_256_shake
make[4]: *** [Makefile:2589: mac.lo] Error 1

Thank you.
Comment 1 Marius Dinu 2024-07-13 20:44:17 UTC
Created attachment 897543 [details]
build log
Comment 2 Viorel Munteanu gentoo-dev 2024-07-20 14:50:48 UTC
Please also attach the output of `emerge --info`
Comment 3 Marius Dinu 2024-07-21 16:19:35 UTC
It's already attached.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-22 15:43:54 UTC
sha3_128_init was added in nettle-3.10.
Comment 6 Larry the Git Cow gentoo-dev 2024-07-22 15:50:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=494c6410ba408204129d2c7642c10755506df60b

commit 494c6410ba408204129d2c7642c10755506df60b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-07-22 15:48:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-07-22 15:48:02 +0000

    net-libs/gnutls: depend on >=nettle-3.10
    
    As a workaround for the backport/import upstream of sha3_* being broken,
    it seems.
    
    Closes: https://bugs.gentoo.org/936011
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/gnutls/{gnutls-3.8.6.ebuild => gnutls-3.8.6-r1.ebuild} | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)