pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/53353 (devel/nss fails to build on armv7 on rpi2)



The following reply was made to PR pkg/53353; it has been noted by GNATS.

From: Timo Buhrmester <fstd.lkml%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/53353 (devel/nss fails to build on armv7 on rpi2)
Date: Wed, 15 Apr 2020 21:44:05 +0200

 > believed to be fixed already
 
 I just had this happen with 2020Q1 on a native armv7hf build
 (9_STABLE on a Banana Pi (the original/first one I believe))
 
 It boils down to shlibsign (via NSPR) attempting a to dlopen(3)
 libfreebl3.so with RTLD_NOW, however, libfreebl3.so, as built
 on this HW at least, cannot be dlopen()ed with RTLD_NOW because
 the symbol "gcm_HashInit_hw" cannot be found (as confirmed with
 a testcase and dynamic linker debugging, below)
 
 | [...]
 | search referencing object for gcm_HashInit_hw
 | check "gcm_HashInit_hw" vs "gcm_HashInit_hw" in /pkg_comp/obj/pkgsrc/devel/nss/default/nss-3.51/nss/lib/freebl/NetBSD9.0_STABLE_OPT.OBJ/NetBSD_SINGLE_SHLIB/libfreebl3.so
 | check "gcm_HashInit_hw" vs "malloc" in /pkg_comp/obj/pkgsrc/devel/nss/default/nss-3.51/nss/lib/freebl/NetBSD9.0_STABLE_OPT.OBJ/NetBSD_SINGLE_SHLIB/libfreebl3.so
 | search _rtld_list_main for gcm_HashInit_hw
 | search object 0x7bec0000 (./tc) for gcm_HashInit_hw
 | check "gcm_HashInit_hw" vs "__syscall" in ./tc
 | check "gcm_HashInit_hw" vs "dlopen" in ./tc
 | check "gcm_HashInit_hw" vs "_exit" in ./tc
 | search object 0x7bec0400 (/libkver/lib/libkver.so) for gcm_HashInit_hw
 | check "gcm_HashInit_hw" vs "warnx" in /libkver/lib/libkver.so
 | search object 0x7bec0800 (/usr/lib/libc.so.12) for gcm_HashInit_hw
 | check "gcm_HashInit_hw" vs "_Unwind_GetIPInfo" in /usr/lib/libc.so.12
 | search _rtld_list_global for gcm_HashInit_hw
 | search DAG with root 0x7bec0c00 (/pkg_comp/obj/pkgsrc/devel/nss/default/nss-3.51/nss/lib/freebl/NetBSD9.0_STABLE_OPT.OBJ/NetBSD_SINGLE_SHLIB/libfreebl3.so) for gcm_HashInit_hw
 | search object 0x7bec1000 (/usr/pkg/lib/nspr/libplc4.so) for gcm_HashInit_hw
 | check "gcm_HashInit_hw" vs "PL_strnchr" in /usr/pkg/lib/nspr/libplc4.so
 | search object 0x7bec1800 (/usr/pkg/lib/nspr/libnspr4.so) for gcm_HashInit_hw
 | check "gcm_HashInit_hw" vs "malloc" in /usr/pkg/lib/nspr/libnspr4.so
 | search object 0x7bc1a000 (/usr/lib/libpthread.so.1) for gcm_HashInit_hw
 | search object 0x7bec1400 (/usr/pkg/lib/nspr/libplds4.so) for gcm_HashInit_hw
 | check "gcm_HashInit_hw" vs "libVersionPoint" in /usr/pkg/lib/nspr/libplds4.so
 | search object 0x7bec1c00 (/pkg_comp/obj/pkgsrc/devel/nss/default/nss-3.51/nss/cmd/shlibsign/../../../dist/NetBSD9.0_STABLE_OPT.OBJ/lib/libnssutil3.so) for gcm_HashInit_hw
 | check "gcm_HashInit_hw" vs "SEC_UniversalStringTemplate" in /pkg_comp/obj/pkgsrc/devel/nss/default/nss-3.51/nss/cmd/shlibsign/../../../dist/NetBSD9.0_STABLE_OPT.OBJ/lib/libnssutil3.so
 | Search the dynamic linker itself.
 | check "gcm_HashInit_hw" vs "dlvsym" in /usr/libexec/ld.elf_so
 | check "gcm_HashInit_hw" vs "dlsym" in /usr/libexec/ld.elf_so
 | check "gcm_HashInit_hw" vs "__dlclose" in /usr/libexec/ld.elf_so
 | lookup failed
 
 The patch below "fixes" it for me, in the sense that it at least finishes
 compiling -- I can't predict what runtime consequences it might have.
 
 Timo
 
 ---------8<--------------------------------------------
 
 --- nss/lib/freebl/genload.c.orig	2020-04-15 18:42:03.836791127 +0000
 +++ nss/lib/freebl/genload.c	2020-04-15 18:42:06.837963155 +0000
 @@ -102,7 +102,7 @@
  #endif
              libSpec.type = PR_LibSpec_Pathname;
              libSpec.value.pathname = fullName;
 -            dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
 +            dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_LAZY | PR_LD_LOCAL);
              PORT_Free(fullName);
          }
      }
 


Home | Main Index | Thread Index | Old Index