Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 759127 - dev-libs/nss-3.59: ...work/nss-3.59/nss-abi_x86_64.amd64/cmd/shlibsign/./sign.sh: line 49: shlibsign: command not found
Summary: dev-libs/nss-3.59: ...work/nss-3.59/nss-abi_x86_64.amd64/cmd/shlibsign/./sign...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: crossdev-bugs
  Show dependency tree
 
Reported: 2020-12-08 21:47 UTC by Aisha Tammy
Modified: 2024-02-02 14:31 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info.txt (emerge --info.txt,5.87 KB, text/plain)
2020-12-08 21:47 UTC, Aisha Tammy
Details
build.log (build.log.tgz,21.00 KB, application/x-compressed-tar)
2020-12-08 21:48 UTC, Aisha Tammy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aisha Tammy 2020-12-08 21:47:55 UTC
Created attachment 677302 [details]
emerge --info.txt

nss fails on crossdev host compiling for amd64
Comment 1 Aisha Tammy 2020-12-08 21:48:10 UTC
Created attachment 677305 [details]
build.log
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2020-12-08 23:23:43 UTC
Wondering if https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/nss/nss-3.59-r1.ebuild?id=d3f2cba10c86d044abad85e9b00b539e365eca8f#n72 is not firing for you...
Comment 3 Aisha Tammy 2020-12-09 00:22:51 UTC
CBUILD didn't have nss at all so... not sure if that sed would've helped.
Comment 4 Aisha Tammy 2020-12-09 01:32:53 UTC
sorry I forgot to mention this, but installing nss on CBUILD fixes the problem.

There definitely needs to be a way to tell portage that some packages want themselves to be present in BDEPEND on CBUILD.
Comment 5 Raul Rangel 2023-06-29 15:44:04 UTC
Hrmm, I just ran into this as well.
```
shlibsign -v -i /build/arm64-generic/tmp/portage/dev-libs/nss-3.68.2-r3/work/nss-3.68.2/nss-.arm64/cmd/shlibsign/../../dist/Linux6.1_aarch64_clang_glibc_PTH_64_OPT.OBJ/lib/libsoftokn3.so
/build/arm64-generic/tmp/portage/dev-libs/nss-3.68.2-r3/work/nss-3.68.2/nss-.arm64/cmd/shlibsign/./sign.sh: line 37: shlibsign: command not found
```

I would add `BDEPEND+=" dev-libs/nss"` to the ebuild, but this dependency only applies when cross compiling... I wonder what the correct way to handle this is. Should we add a new `USE` flag `cross-compile` that portage will set when the CBUILD != CHOST? Then we could do `BDEPEND+=" cross-compile? ( dev-libs/nss )"`.
Comment 6 Raul Rangel 2023-06-29 21:33:45 UTC
If anyone was curious, this is the hack I put in place in our (chromiumos) build system: https://chromium-review.googlesource.com/c/chromiumos/bazel/+/4655206
Comment 7 SpanKY gentoo-dev 2024-01-27 06:51:19 UTC
this isn't a situation for USE flags.  packages can use `tc-is-cross-compiler` to determine on the fly whether they should build their own copy of local tools.  some packages already do this.  some will cheat and see if the tools are already available in $PATH and are recent/compatible, and if so, use them, otherwise fallback to building a copy from the sources and adding those to their $PATH.
Comment 8 Joonas Niilola gentoo-dev 2024-02-02 14:31:13 UTC
(In reply to SpanKY from comment #7)
> this isn't a situation for USE flags.  packages can use
> `tc-is-cross-compiler` to determine on the fly whether they should build
> their own copy of local tools.  some packages already do this.  some will
> cheat and see if the tools are already available in $PATH and are
> recent/compatible, and if so, use them, otherwise fallback to building a
> copy from the sources and adding those to their $PATH.

If you have a setup with crosscompile available, could you write the update and commit? I can't test it easily and don't like to guess whether I got it right or not. I do see examples you mentioned of, though to take note.