I have checked out Mercurial trunk (r15683 as of now) of the NSS library
and I could sucessfully build it on FreeBSD 11.3 with FreeBSD port patches 
applied.

However, when I apply a patch 
https://ylog.eu/tmp/nss-build-failure/arcpatch-D590.diff
on top of the trunk the build fails in a strange way:

../../coreconf/nsinstall/FreeBSD11.3_DBG.OBJ/nsinstall -R -m 775 
FreeBSD11.3_DBG.OBJ/shlibsign ../../../dist/FreeBSD11.3_DBG.OBJ/bin
gmake ../../../dist/FreeBSD11.3_DBG.OBJ/lib/libsoftokn3.chk 
../../../dist/FreeBSD11.3_DBG.OBJ/lib/libfreebl3.chk 
../../../dist/FreeBSD11.3_DBG.OBJ/lib/libfreeblpriv3.chk 
../../../dist/FreeBSD11.3_DBG.OBJ/lib/libnssdbm3.chk
gmake[4]: Entering directory '/usr/home/saper/sw/nss/cmd/shlibsign'
Makefile:100: warning: overriding recipe for target 'libs'
../../coreconf/rules.mk:73: warning: ignoring old recipe for target 'libs'
cd FreeBSD11.3_DBG.OBJ ; sh '/usr/home/saper/sw/nss/cmd/shlibsign/.'/sign.sh 
'/usr/home/saper/sw/nss/cmd/shlibsign/../../../dist/FreeBSD11.3_DBG.OBJ' \
'/usr/home/saper/sw/nss/cmd/shlibsign/FreeBSD11.3_DBG.OBJ' FreeBSD \
'/usr/local/lib' 
'/usr/home/saper/sw/nss/cmd/shlibsign/../../../dist/FreeBSD11.3_DBG.OBJ/lib/libsoftokn3.so'
/usr/home/saper/sw/nss/cmd/shlibsign/FreeBSD11.3_DBG.OBJ/shlibsign -v -i 
/usr/home/saper/sw/nss/cmd/shlibsign/../../../dist/FreeBSD11.3_DBG.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[4]: *** [Makefile:92: 
../../../dist/FreeBSD11.3_DBG.OBJ/lib/libsoftokn3.chk] Error 1

The runtime linker indicates that it simply cannot open 
/usr/home/saper/sw/nss/cmd/shlibsign/../../../dist/FreeBSD11.3_DBG.OBJ/lib/libsoftokn3.so
which is a symlink to  
"../../../nss/lib/softoken/FreeBSD11.3_DBG.OBJ/libsoftokn3.so":

$ pwd
/usr/home/saper/sw/nss
$ cd cmd/shlibsign/
$ ls -l 
/usr/home/saper/sw/nss/cmd/shlibsign/../../../dist/FreeBSD11.3_DBG.OBJ/lib/libsoftokn3.so
lrwxr-xr-x   1 saper    staff          60 Jun 28 22:36 
/usr/home/saper/sw/nss/cmd/shlibsign/../../../dist/FreeBSD11.3_DBG.OBJ/lib/libsoftokn3.so
 -> ../../../nss/lib/softoken/FreeBSD11.3_DBG.OBJ/libsoftokn3.so
$ ls -lL 
/usr/home/saper/sw/nss/cmd/shlibsign/../../../dist/FreeBSD11.3_DBG.OBJ/lib/libsoftokn3.so
-rwxr-xr-x   1 saper    staff     1280832 Jun 28 22:36 
/usr/home/saper/sw/dist/FreeBSD11.3_DBG.OBJ/lib/libsoftokn3.so

This symlink does not resolve from the "FreeBSD11.3_DBG.OBJ" subdirectory, but 
it all works for the simple build.

When I apply a patch, the build breaks.

https://ylog.eu/tmp/nss-build-failure/build_two <- a script to do a clean 
rebuild of both revisions
(r15683 clean, r15684 patch applied)

https://ylog.eu/tmp/nss-build-failure/build-r15683.log < successful build
https://ylog.eu/tmp/nss-build-failure/build-r15684.log < failed build

I have uninstalled nss package on the system to avoid potential library 
conflicts.

All files I have used are listed in the directory index: 
https://ylog.eu/tmp/nss-build-failure/

What could be wrong there?

Marcin

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to