Summary: | security/nss: fails to build on aarch64 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Renato Botelho <garga> | ||||||
Component: | Individual Port(s) | Assignee: | freebsd-gecko (Nobody) <gecko> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | mikael, pkubaj | ||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(gecko) |
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Renato Botelho
2020-09-01 14:59:53 UTC
I put some dlerror() in devel/nspr (nspr/pr/src/linking/prlink.c), here are the logs: /usr/ports/security/nss/work/nss-3.56/nss/cmd/shlibsign/FreeBSD13.0_OPT.OBJ/shlibsign -v -i /usr/ports/security/nss/work/nss-3.56/nss/cmd/shlibsign/../../../dist/FreeBSD13.0_OPT.OBJ/lib/libsoftokn3.so Error 0.2: Undefined symbol "nspr_use_zone_allocator" moduleSpec configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB, noModDB Error 3: /usr/ports/security/nss/work/nss-3.56/nss/cmd/shlibsign/../../../dist/FreeBSD13.0_OPT.OBJ/lib/libfreeblpriv3.so: Undefined symbol "gcm_HashInit_hw" Error 3: Cannot open "../../../nss/lib/softoken/FreeBSD13.0_OPT.OBJ/libfreeblpriv3.so" Error 3: /usr/ports/security/nss/work/nss-3.56/nss/cmd/shlibsign/../../../dist/FreeBSD13.0_OPT.OBJ/lib/libfreeblpriv3.so: Undefined symbol "gcm_HashInit_hw" C_Initialize failed: 0x00000030, CKR_DEVICE_ERROR NSPR error code: -5977: Failure to load dynamic library Initiailzing softoken failed: 0x00000030, CKR_DEVICE_ERROR NSPR error code: -5977: Failure to load dynamic library gcm_HashInit_hw is implemented in gcm-aarch64.c but is not compiled for aarch64/FreeBSD I'm still digging... (In reply to Mikael Urankar from comment #1) It seems to build with NS_USE_GCC = 1 in nss/coreconf/FreeBSD.mk (In reply to Mikael Urankar from comment #2) regressed with https://github.com/nss-dev/nss/commit/189d45b71fc004d8737e000987038fe1ffa857b4 *sigh* It builds for me (only tried 13-current) with: @@ -20,7 +21,21 @@ endif ifeq ($(CPU_ARCH),amd64) CPU_ARCH = x86_64 endif +ifneq (,$(filter arm%, $(CPU_ARCH))) +CPU_ARCH = arm +endif +ifneq (,$(filter powerpc%, $(CPU_ARCH))) +CPU_ARCH = ppc +endif +ifeq ($(CPU_ARCH),aarch64) +NS_USE_GCC = 1 +endif <snip> Created attachment 217716 [details]
v1
Can you try this patch?
(In reply to Mikael Urankar from comment #6) It fixed the problem. Thanks! Created attachment 217839 [details] v2 use upstream patch from: https://bugzilla.mozilla.org/show_bug.cgi?id=1659256 Comment on attachment 217839 [details]
v2
I can confirm 12.1 aarch64 builds fine after applying the patch.
A commit references this bug: Author: mikael Date: Wed Sep 9 13:36:33 UTC 2020 New revision: 548091 URL: https://svnweb.freebsd.org/changeset/ports/548091 Log: security/nss: fix build on aarch64 Import upstream patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1659256 PR: 249053 Reported by: garga@ Approved by: jbeich@ Changes: head/security/nss/files/patch-bug1659256 Can you MFH to 2020Q3 as well? (In reply to Jan Beich from comment #11) I've sent an email to ports-secteam (In reply to Mikael Urankar from comment #12) Build fixes are under blanket approval. A commit references this bug: Author: mikael Date: Mon Sep 14 17:04:04 UTC 2020 New revision: 548632 URL: https://svnweb.freebsd.org/changeset/ports/548632 Log: MFH: r548091 security/nss: fix build on aarch64 Import upstream patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1659256 PR: 249053 Reported by: garga@ Approved by: jbeich@ Approved by: ports-secteam (joneum) Changes: _U branches/2020Q3/ branches/2020Q3/security/nss/files/patch-bug1659256 |