nss: shlibsign mixes board & sdk binaries/execution |
|||
Issue description
depending on the settings, building nss for boards fails. snippet from nss build log:
make[3]: Leaving directory '/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign/mangle'
cd Linux2.6_x86_64_clang-7_glibc_PTH_64_OPT.OBJ ; sh '/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign/.'/sign.sh '/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign/../../dist/Linux2.6_x86_64_clang-7_glibc_PTH_64_OPT.OBJ' \
'/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign/Linux2.6_x86_64_clang-7_glibc_PTH_64_OPT.OBJ' Linux \
'/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/temp/fakedir' '/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign/../../dist/Linux2.6_x86_64_clang-7_glibc_PTH_64_OPT.OBJ/lib/libsoftokn3.so'
/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign/./sign.sh: line 36: cd: /build/grunt/tmp/portage/dev-libs/nss-3.38-r1/temp/fakedir: No such file or directory
shlibsign -v -i /build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign/../../dist/Linux2.6_x86_64_clang-7_glibc_PTH_64_OPT.OBJ/lib/libsoftokn3.so
/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign/./sign.sh: line 13: 24863 Illegal instruction (core dumped) shlibsign -v -i "${5}"
make[2]: *** [Makefile:92: ../../dist/Linux2.6_x86_64_clang-7_glibc_PTH_64_OPT.OBJ/lib/libsoftokn3.chk] Error 132
make[2]: Leaving directory '/build/grunt/tmp/portage/dev-libs/nss-3.38-r1/work/nss-3.38/nss-abi_x86_64.amd64/cmd/shlibsign'
we're either executing shlibsign from the sdk but with LD_LIBRARY_PATH pointing to the local nss paths (which is bad), or we're executing the local shlibsign instead of the sdk one (maybe with bad LD_LIBRARY_PATH settings?). either way, we need to unwrap this so only programs/libs from the sdk are used.
,
Nov 27
,
Nov 27
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/426477768a0f08a8c10f14b8e255bf622f216db2 commit 426477768a0f08a8c10f14b8e255bf622f216db2 Author: Chris McDonald <cjmcdonald@chromium.org> Date: Tue Nov 27 08:34:08 2018 nss: Patch shlibsign to stop tampering with library paths during signing process The exports in sign.sh were causing the build process to try to use the target's shlibsign and libraries instead of the build host's, causing an illegal instruction error when incompatible build flags were used. BUG= chromium:884946 TEST=Set board compiler flags to "-march=bdver4", then: "emerge-grunt dev-libs/nss", "emerge-grunt app-crypt/nss" Change-Id: Icb3f10c78c70812b439cc4189ffeeb033bcacc7b Reviewed-on: https://chromium-review.googlesource.com/1279074 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Chris McDonald <cjmcdonald@chromium.org> Reviewed-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/426477768a0f08a8c10f14b8e255bf622f216db2/dev-libs/nss/nss-3.38.ebuild [add] https://crrev.com/426477768a0f08a8c10f14b8e255bf622f216db2/dev-libs/nss/files/nss-3.38-shlibsign-path-pollution.patch [modify] https://crrev.com/426477768a0f08a8c10f14b8e255bf622f216db2/app-crypt/nss/nss-3.38.ebuild [rename] https://crrev.com/426477768a0f08a8c10f14b8e255bf622f216db2/dev-libs/nss/nss-3.38-r3.ebuild [rename] https://crrev.com/426477768a0f08a8c10f14b8e255bf622f216db2/app-crypt/nss/nss-3.38-r3.ebuild [add] https://crrev.com/426477768a0f08a8c10f14b8e255bf622f216db2/app-crypt/nss/files/nss-3.38-shlibsign-path-pollution.patch
,
Nov 27
|
|||
►
Sign in to add a comment |
|||
Comment 1 by vapier@chromium.org
, Sep 18