Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 694248

Summary: sys-apps/portage: internal soname dependencies do not resolve for dev-lang/rust
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: herrtimson, rust
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 694246, 704320    
Attachments: /var/db/pkg/dev-lang/rust-1.34.2/NEEDED.ELF.2
/var/db/pkg/dev-lang/rust-1.37.0/NEEDED.ELF.2

Description Zac Medico gentoo-dev 2019-09-12 23:08:21 UTC
Inappropriate warnings like these appear in output of emerge -p --depclean --ignore-soname-deps=n:

>  * Broken soname dependencies found:
>  *
>  *   x86_64: librustc_save_analysis-f4bf796e9d81ec1d.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_resolve-d191ca29dd458c15.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_codegen_ssa-028ebb5e2a5988d9.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc-e3e616c17ce5b792.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libsyntax_pos-e758981dc2bb49b8.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libserialize-d9e80fd4681d073a.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libstd-cdf83fc191b5d8a6.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_typeck-45d7dd541435c043.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_codegen_utils-741666f3889340ce.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_mir-5d1116448e35e7f6.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_driver-2146d3e6cf6eb050.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libfmt_macros-81e027940f2b7d79.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_mir-5d1116448e35e7f6.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_driver-2146d3e6cf6eb050.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libfmt_macros-81e027940f2b7d79.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_cratesio_shim-76315b96a8d6c1b6.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_data_structures-1996cebf322bb533.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libtest-f73888264e9191bb.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_borrowck-02ab75054f900480.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libterm-daf42308060fe3b3.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libarena-a84fc95aedd17045.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libsyntax_ext-f9161b6ef362a0d4.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_target-de277137893d6209.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_lint-4497b5caceb2ea72.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_plugin-6584fac5b564c7a1.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_allocator-ed461df42c9babfe.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_incremental-a80b204cba07478e.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_errors-25443e1378b87999.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_metadata-76da7101239307d2.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_passes-38ac710f6edea89c.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libsyntax-087da8498b028f6d.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_privacy-ea82028671eb9c2f.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_fs_util-368b315c65f0b065.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: libgraphviz-0ca3d15fe0eb5eb1.so required by:
>  *     dev-lang/rust-1.34.2
>  *
>  *   x86_64: librustc_traits-0573219e76b62628.so required by:
>  *     dev-lang/rust-1.34.2
Comment 1 Zac Medico gentoo-dev 2019-09-12 23:09:32 UTC
Created attachment 589750 [details]
/var/db/pkg/dev-lang/rust-1.34.2/NEEDED.ELF.2
Comment 2 Zac Medico gentoo-dev 2019-09-14 21:25:54 UTC
Created attachment 589848 [details]
/var/db/pkg/dev-lang/rust-1.37.0/NEEDED.ELF.2

Same issue with dev-lang/rust-1.37.0.
Comment 3 Georgy Yakovlev archtester gentoo-dev 2019-09-27 00:10:22 UTC
just for the record as discussed
there's an rpath patch which some distros carry

https://git.alpinelinux.org/aports/tree/community/rust/alpine-change-rpath-to-rustlib.patch

we could ship it and stop installing duplicate libs completely.
I'll test it, see how it behaves and add to rust 1.38 and later.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2019-12-26 08:01:12 UTC
as of 1.40.0 rust no longer installs same set of libs to public and private locations, so alpine patch is not what we need.

but probably debian patch will work
https://sources.debian.org/patches/rustc/1.39.0+dfsg1-4/d-add-soname.patch/
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2019-12-26 19:15:29 UTC
I would agree that we should carry that Debian patch.
Comment 6 Larry the Git Cow gentoo-dev 2019-12-30 09:59:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0449fb463341e064a926929e1c6d1c22b963891

commit a0449fb463341e064a926929e1c6d1c22b963891
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-12-29 10:17:49 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-12-30 09:58:30 +0000

    dev-lang/rust: revbump 1.40.0 with fixes
    
    add parallel-compiler useflag, to use pass RUSTFLAGS=" -Zthreads=<num>"
    add debian soname patch
    add system-bootstrap
    install rustlib into /usr/lib unconditionally
    drop multilib hacks
    various minor fixes
    add myself to metadata.xml explicitly
    
    Bug: https://bugs.gentoo.org/694248
    Bug: https://bugs.gentoo.org/703744
    Bug: https://bugs.gentoo.org/703470
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust/files/1.40.0-add-soname.patch |  36 +++
 dev-lang/rust/metadata.xml                  |   6 +
 dev-lang/rust/rust-1.40.0-r1.ebuild         | 340 ++++++++++++++++++++++++++++
 3 files changed, 382 insertions(+)
Comment 7 Zac Medico gentoo-dev 2019-12-30 20:47:19 UTC
The debian soname patch works for me. Thanks!