Summary: | dev-lang/spidermonkey-78.10.1: fails to compile on prefix with dev-lang/rust-1.52.1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Guilherme Amadio <amadio> |
Component: | Current packages | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gyakovlev, mozilla, rust |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/20866 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Guilherme Amadio
![]() https://github.com/gentoo/gentoo/pull/19815 https://github.com/gentoo/gentoo/pull/20073 ^ relevant changes that went in recently. seems you are using dev-lang/rust try using rust-bin? it should be forced to use correct libc. we may need patchelf dev-lang/rust as well. I'm not sure how it determines which paths to use. and no it's not LD_LIBRARY_PATH failure. crate uses prefix headers and tried to link with prefix libs but using host libc, which lacks symbols. Please look at the error more closely: = note: /bin/sh: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/x86_64/usr/lib/libtinfo.so.5) This is /bin/sh trying to use libtinfo.so.5 from prefix, most likely due to LD_LIBRARY_PATH being set when the shell was invoked. The prefix shell should have been used here, not /bin/sh, and LD_LIBRARY_PATH should most likely be empty. All libraries being linked by rust are pointing to the prefix if you look at the command line, so it's not rust trying to use host libraries that is the problem. maybe you are right. but this looks somewhat relevant https://github.com/rust-lang/cargo/issues/6582 build system uses this as linker wrapper: /tmp/portage/dev-lang/spidermonkey-78.10.1/work/firefox-78.10.1/build/cargo-linker is a shell script with /bin/sh as shebang. all it does is > #!/bin/sh > eval ${MOZ_CARGO_WRAP_LD} ${MOZ_CARGO_WRAP_LDFLAGS} '"$@"' so maybe this file should be eprefixified? =) I have no test environment, but worth trying I think. Indeed, prefixifying the scripts fixed the build. I will push a fix soon, or via a merge request if you'd rather see it beforehand. I don't maintain spidermonkey, so I have no say there. should be straightforward enough. but if you want to modify rust then yeah, send patch or open PR and lmk, I'll take a look. This is the patch: diff --git a/dev-lang/spidermonkey/spidermonkey-78.10.1.ebuild b/dev-lang/spidermonkey/spidermonkey-78.10.1.ebuild index b6cfe9ac633..5408e1fe7ec 100644 --- a/dev-lang/spidermonkey/spidermonkey-78.10.1.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-78.10.1.ebuild @@ -13,7 +13,7 @@ PYTHON_COMPAT=( python3_{7..9} ) WANT_AUTOCONF="2.1" -inherit autotools check-reqs flag-o-matic llvm multiprocessing python-any-r1 toolchain-funcs +inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix python-any-r1 toolchain-funcs MY_PN="mozjs" MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases @@ -230,6 +230,11 @@ src_prepare() { python/mozbuild/mozbuild/configure/check_debug_ranges.py \ || die "sed failed to set toolchain prefix" + # use prefix shell in wrapper linker scripts, bug #789660 + if [[ -n ${EPREFIX} ]]; then + hprefixify "${WORKDIR}"/firefox-${MY_PV}/build/cargo-{,host-}linker + fi + einfo "Removing pre-built binaries ..." find third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die @mozilla, could you please ack this? hprefixify doesn't do anything if not in prefix, so you can drop the conditional IMO Sure, makes sense. Thanks Fabian. I will drop the conditional before pushing. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c2a795bc5c6714bf8e77984d570e43ca4043ff7 commit 8c2a795bc5c6714bf8e77984d570e43ca4043ff7 Author: Guilherme Amadio <amadio@gentoo.org> AuthorDate: 2021-05-18 08:18:48 +0000 Commit: Guilherme Amadio <amadio@gentoo.org> CommitDate: 2021-05-19 12:19:07 +0000 dev-lang/spidermonkey: use prefix shell, bug #789660 Closes: https://bugs.gentoo.org/789660 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Guilherme Amadio <amadio@gentoo.org> dev-lang/spidermonkey/spidermonkey-78.10.1.ebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) |