[gnutls-devel] GnuTLS | Undefined symbol for ___get_cpuid_count when building on macOS Sierra (#816)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Tue Aug 6 15:05:22 CEST 2019
Caleb Xu created an issue:
## Description of problem:
Building `gnutls` 3.6.9 fails on macOS Sierra with error:
```
Undefined symbols for architecture x86_64:
"___get_cpuid_count", referenced from:
_register_x86_crypto in libaccelerated.a(x86-common.o)
```
## Version of gnutls used:
3.6.9
## Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
>From source tarball, testing in CI for updating the Homebrew package manager with `gnutls` 3.6.9. Associated change on the Homebrew side: https://github.com/Homebrew/homebrew-core/pull/42779
## How reproducible:
Steps to Reproduce:
* Download and unpack 3.6.9 tarball (https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.9.tar.xz)
* `./configure --disable-dependency-tracking --disable-silent-rules --disable-static --prefix=#{prefix} --sysconfdir=#{etc} --with-default-trust-store-file=#{etc}/openssl/cert.pem --disable-guile --disable-heartbeat-support --with-p11-kit`
* `make install`
## Actual results:
```
Undefined symbols for architecture x86_64:
"___get_cpuid_count", referenced from:
_register_x86_crypto in libaccelerated.a(x86-common.o)
```
## Expected results:
Successful compilation.
---
Based on my limited understanding from googling this particular error, it seems that the symbol in question was added into `clang` starting in `llvm` 5.0.0. macOS Sierra ships with a toolchain derived from `llvm` 4.0.0, so the symbol is not available.
I have attempted to use `gcc` to build it instead, but `gcc` does not seem to like some of the macOS Security framework that `gnutls` links against:
```
In file included from /System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32,
from /System/Library/Frameworks/Security.framework/Headers/Security.h:43,
from system/certs.c:49:
/System/Library/Frameworks/Security.framework/Headers/Authorization.h:192:7: error: variably modified 'bytes' at file scope
192 | char bytes[kAuthorizationExternalFormLength];
| ^~~~~
```
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/issues/816
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190806/18acc282/attachment.html>
More information about the Gnutls-devel
mailing list