Bug 223019 - devel/py-grpcio: unbreak on aarch64
Summary: devel/py-grpcio: unbreak on aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Vanilla I. Shu
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2017-10-14 22:49 UTC by Jan Beich
Modified: 2018-12-04 00:52 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (vanilla)


Attachments
v0 (2.49 KB, patch)
2017-10-14 22:49 UTC, Jan Beich
jbeich: maintainer-approval? (vanilla)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-10-14 22:49:39 UTC
Created attachment 187183 [details]
v0

FreeBSD supports AT_HWCAP but it's currently limited to armv6 and armv7. Let's prepare for aarch64 future.

Build logs:
11.1 aarch64 - http://sprunge.us/RSbU
12.0 aarch64 - http://sprunge.us/TUHe
Comment 1 Vanilla I. Shu freebsd_committer freebsd_triage 2017-10-29 00:10:38 UTC
Committed and confirmed, thanks.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-10-29 00:10:58 UTC
A commit references this bug:

Author: vanilla
Date: Sun Oct 29 00:10:28 UTC 2017
New revision: 453086
URL: https://svnweb.freebsd.org/changeset/ports/453086

Log:
  1: Update to 1.7.0.
  2: unbreak on aarch64.

  PR:		223019 [2]
  Submitted by:	jbeich@ [2]
  MFH:		2017Q4

Changes:
  head/devel/py-grpcio/Makefile
  head/devel/py-grpcio/distinfo
  head/devel/py-grpcio/files/patch-setup.py
  head/devel/py-grpcio/files/patch-src_core_tsi_ssl__transport__security.c
  head/devel/py-grpcio/files/patch-src_python_grpcio_grpc__core__dependencies.py
  head/devel/py-grpcio/files/patch-third__party_boringssl_crypto_cpu-aarch64-linux.c
  head/devel/py-grpcio/files/patch-third__party_boringssl_include_openssl_base.h
  head/devel/py-grpcio/files/patch-third__party_boringssl_ssl_CMakeLists.txt
Comment 3 Val Packett 2018-07-12 00:20:17 UTC
Hi, I'm currently working on aarch64 in lang/mono which also uses BoringSSL, so I've found this patch via google, took it and encountered a problem:

__has_include(<sys/auxv.h>) is true (on 12-CURRENT), but this header does not actually define 'getauxval'. Its contents (minus header guard and copyright) are:

#include <sys/types.h>
#include <machine/elf.h>

__BEGIN_DECLS
int elf_aux_info(int aux, void *buf, int buflen);
__END_DECLS


Yet somehow, devel/py-grpcio does build. Maybe because it uses GCC?? That's the only difference I can think of. I'm building Mono with clang, and it complains about 'getauxval' not being defined. I removed the __has_include(<sys/auxv.h>) part, but still surprised that it worked here...
Comment 4 Jan Beich freebsd_committer freebsd_triage 2018-07-12 01:53:48 UTC
According to bug 223016 comment 4 there's no plan to implement AT_HWCAP on aarch64. NEON is standard on aarch64 and enabled by default on FreeBSD armv7, so #if defined(__ARM_NEON) is often enough.

(In reply to Greg V from comment #3)
> __has_include(<sys/auxv.h>) is true (on 12-CURRENT), but this header does not actually define 'getauxval'.

Maybe read discussion in https://lists.freebsd.org/pipermail/freebsd-ports/2017-December/111463.html

> Yet somehow, devel/py-grpcio does build.

After 1.13.0 the affected code is guarded[1] by OPENSSL_LINUX, so the patch is nop.

https://boringssl.googlesource.com/boringssl/+/862e0d2e1b65%5E!/crypto/cpu-aarch64-linux.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-12-04 00:52:59 UTC
A commit references this bug:

Author: jbeich
Date: Tue Dec  4 00:52:15 UTC 2018
New revision: 486567
URL: https://svnweb.freebsd.org/changeset/ports/486567

Log:
  devel/py-grpcio: drop unused patch after r473596

  PR:		223019

Changes:
  head/devel/py-grpcio/files/patch-third__party_boringssl_crypto_cpu-aarch64-linux.c