Cannot export hidden symbol __gnutls_arm_cpuid_s when building on macOS Monterey in M1 machine.
Description of problem:
Building gnutls
3.7.2 fails on macOS Monterey with error:
...
CCLD libgnutls.la<br>
ld: warning: cannot export hidden symbol __gnutls_arm_cpuid_s from accelerated/.libs/libaccelerated.a(aarch64-common.o)<br>
Undefined symbols for architecture arm64:<br>
"_c_isdigit", referenced from:<br>
__asn1_expand_object_id in libminitasn1.a(parser_aux.o)<br>
__asn1_check_identifier in libminitasn1.a(parser_aux.o)<br>
ld: symbol(s) not found for architecture arm64<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Version of gnutls used:
3.7.2
Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
Tarball downloaded from gnupg.org
How reproducible:
In a Mac M1 with macOS Monterey and using ZSH, follow next steps:
Steps to Reproduce:
% curl -O https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7/gnutls-3.7.2.tar.xz
% tar -xvf gnutls-3.7.2.tar.xz
% pushd gnutls-3.7.2
% /usr/local/sbin/unbound-anchor -a "/etc/unbound/root.key"
% CFLAGS="-m64" CXXFLAGS="-m64" ./configure --prefix=/usr/local --without-p11-kit --with-ncluded-libtasn1 --with-included-unistring
% make
Actual results:
...
ld: warning: cannot export hidden symbol __gnutls_arm_cpuid_s from accelerated/.libs/libaccelerated.a(aarch64-common.o)<br>
Undefined symbols for architecture arm64:<br>
"_c_isdigit", referenced from:<br>
__asn1_expand_object_id in libminitasn1.a(parser_aux.o)<br>
__asn1_check_identifier in libminitasn1.a(parser_aux.o)<br>
ld: symbol(s) not found for architecture arm64<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Expected results:
Successful compilation.