Bug 225326 - security/nss: fails to build on aarch64
Summary: security/nss: fails to build 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: freebsd-gecko mailing list
URL:
Keywords: needs-patch, needs-qa, regression
Depends on:
Blocks: 201763
  Show dependency treegraph
 
Reported: 2018-01-19 20:43 UTC by Jan Beich
Modified: 2018-01-29 16:51 UTC (History)
4 users (show)

See Also:
jbeich: maintainer-feedback+


Attachments
patch (1.34 KB, patch)
2018-01-29 10:42 UTC, mikael.urankar
no flags Details | Diff
patch (823 bytes, patch)
2018-01-29 10:53 UTC, mikael.urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2018-01-19 20:43:04 UTC
cd FreeBSD11.1_OPT.OBJ ; sh '/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/.'/sign.sh '/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/../../../dist/FreeBSD11.1_OPT.OBJ' \
'/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/FreeBSD11.1_OPT.OBJ' FreeBSD \
'/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/../../../dist/FreeBSD11.1_OPT.OBJ/lib' '/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/../../../dist/FreeBSD11.1_OPT.OBJ/lib/libsoftokn3.so'
/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/FreeBSD11.1_OPT.OBJ/shlibsign -v -i /wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/../../../dist/FreeBSD11.1_OPT.OBJ/lib/libsoftokn3.so
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
moduleSpec configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB, noModDB
gmake[3]: *** [Makefile:92: ../../../dist/FreeBSD11.1_OPT.OBJ/lib/libsoftokn3.chk] Error 1

Build logs:
11.1 aarch64 - https://clbin.com/elf0g
12.0 aarch64 - https://clbin.com/rxWLu
Comment 1 mikael.urankar 2018-01-29 10:42:59 UTC
Created attachment 190151 [details]
patch

I added some dlerror() in devel/nspr, it turns out that Hacl_Poly1305_64_mk_state is missing in some library (forgot to copy the error message)
it's fixed upstream: https://hg.mozilla.org/projects/nss/rev/1668fafc1db4
Comment 2 mikael.urankar 2018-01-29 10:53:22 UTC
Created attachment 190152 [details]
patch
Comment 3 commit-hook freebsd_committer 2018-01-29 11:11:43 UTC
A commit references this bug:

Author: jbeich
Date: Mon Jan 29 11:11:32 UTC 2018
New revision: 460255
URL: https://svnweb.freebsd.org/changeset/ports/460255

Log:
  security/nss: unbreak on aarch64 after r459458

  PR:		225326
  Submitted by:	mikael.urankar@gmail.com
  Obtained from:	upstream (NSS 3.36)
  MFH:		2018Q1

Changes:
  head/security/nss/files/patch-bug1432455
Comment 4 Jan Beich freebsd_committer 2018-01-29 11:13:10 UTC
Thank you for tracking down upstream commit. Landed.
Comment 5 Mark Millard 2018-01-29 14:18:54 UTC
(In reply to Jan Beich from comment #4)

# svnlite info /usr/ports/ | grep "Re[plv]"                                                                                                                                                     Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 460228
Last Changed Rev: 460228

# uname -apKU
FreeBSD FBSDFSSD 12.0-CURRENT FreeBSD 12.0-CURRENT  r327485M  amd64 amd64 1200054 1200054


My attempt to amd64 -> arrch64 cross build ports
via poudriere-devel got:

'/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/FreeBSD12.0_OPT.OBJ' FreeBSD \
'/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/../../../dist/FreeBSD12.0_OPT.OBJ/lib' '/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/../../../dist/FreeBSD12.0_OPT.OBJ/lib/libsoftokn3.so'
/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/FreeBSD12.0_OPT.OBJ/shlibsign -v -i /wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign/../../../dist/FreeBSD12.0_OPT.OBJ/lib/libsoftokn3.so
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
moduleSpec configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB, noModDB
gmake[3]: *** [Makefile:92: ../../../dist/FreeBSD12.0_OPT.OBJ/lib/libsoftokn3.chk] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd/shlibsign'
gmake[2]: *** [../coreconf/rules.mk:101: libs] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss/cmd'
gmake[1]: *** [coreconf/rules.mk:101: libs] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/security/nss/work/nss-3.35/nss'
*** Error code 1

Stop.
make: stopped in /usr/ports/security/nss
=>> Cleaning up wrkdir
===>  Cleaning for nss-3.35
build of security/nss | nss-3.35 ended at Sun Jan 28 22:19:21 PST 2018
build time: 00:08:32
Comment 6 Jan Beich freebsd_committer 2018-01-29 14:26:04 UTC
(In reply to Mark Millard from comment #5)
> Revision: 460228
> Last Changed Rev: 460228

Did you forget to... update?

$ echo $((460228 >= 460255))
0
Comment 7 Mark Millard 2018-01-29 16:51:07 UTC
(In reply to Jan Beich from comment #6)

There is what I intended to type as the version number
for update and what I actually typed (one wrong
digit). Then I did not notice the mismatch.

So updating again: -r460312 this time, . . .

[00:02:43] [03] [00:00:00] Building security/nss | nss-3.35
. . .
[00:08:09] [03] [00:05:26] Finished security/nss | nss-3.35: Success

Sorry for the noise.