Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910063 - dev-libs/icu: use preserve-libs.eclass
Summary: dev-libs/icu: use preserve-libs.eclass
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
Depends on:
Reported: 2023-07-08 16:27 UTC by Adrian Schollmeyer
Modified: 2023-07-09 04:25 UTC (History)
1 user (show)

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

emerge --info (emerge-info.txt,19.17 KB, text/plain)
2023-07-08 16:31 UTC, Adrian Schollmeyer

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Schollmeyer 2023-07-08 16:27:57 UTC
I am not sure if this actually a case of a missing dependency, but I've encountered a problem with libarchive tar after updating dev-libs/icu, causing subsequent builds to fail, e.g.:

 * Messages for package dev-libs/boost-1.82.0-r1:                                                                                                                                             
 * ERROR: dev-libs/boost-1.82.0-r1::gentoo failed (unpack phase):                                                                                                                             
 *   unpack: failure unpacking boost_1_82_0.tar.bz2                                                                                                                                           
 * Call stack:                                                                                                                                                                                
 *     , line  136:  Called src_unpack                                                                                                                                     
 *             environment, line 3255:  Called default                                                                                                                                        
 *, line  872:  Called default_src_unpack                                                                                                                             
 *, line  899:  Called __eapi0_src_unpack                                                                                                                             
 *, line  807:  Called unpack 'boost_1_82_0.tar.bz2'                                                                                                                  
 *, line  439:  Called __unpack_tar 'bzip2 -d'                                                                                                                        
 *, line  372:  Called __assert_sigpipe_ok 'unpack: failure unpacking boost_1_82_0.tar.bz2'                                                                           
 *, line   41:  Called die                                                                                                                                            
 * The specific snippet of code:                                                                                                                                                              
 *              [[ ${x} -ne 0 && ${x} -ne ${PORTAGE_SIGPIPE_STATUS:-141} ]] && die "$@"                                                                                                       
 * If you need support, post the output of `emerge --info '=dev-libs/boost-1.82.0-r1::gentoo'`,                                                                                               
 * the complete build log and the output of `emerge -pqv '=dev-libs/boost-1.82.0-r1::gentoo'`.                                                                                                
 * The complete build log is located at '/var/tmp/portage/dev-libs/boost-1.82.0-r1/temp/build.log'.                                                                                           
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/boost-1.82.0-r1/temp/environment'.                                                                                    
 * Working directory: '/var/tmp/portage/dev-libs/boost-1.82.0-r1/work'                                                                                                                        
 * S: '/var/tmp/portage/dev-libs/boost-1.82.0-r1/work/boost_1_82_0'                                                              

Looking at build.log:

>>> Unpacking source...
>>> Unpacking boost_1_82_0.tar.bz2 to /var/tmp/portage/dev-libs/boost-1.82.0-r1/work
tar: error while loading shared libraries: cannot open shared object file: No such file or directory

Reproducible: Always

Steps to Reproduce:
1. Grab a system with an old version of dev-libs/icu (e.g. 72)
2. Install app-arch/libarchive
3. Update dev-libs/icu to 73.1
4. Try to run any libarchive tool
Actual Results:  
tar: error while loading shared libraries: cannot open shared object file: No such file or directory

Expected Results:  
Whatever tool is run (in my case tar) should work as always.

Output from ldd shows that app-arch/libarchive is linked against

Before rebuilding:

# ldd /usr/lib64/ (0x00007ffee2bf1000) => /usr/lib64/ (0x00007ff2af017000) => /lib64/ (0x00007ff2af00c000) => /lib64/ (0x00007ff2aefde000) => /lib64/ (0x00007ff2aef28000) => /lib64/ (0x00007ff2aef15000) => /lib64/ (0x00007ff2aeefb000) => /usr/lib64/ (0x00007ff2aed92000) => /lib64/ (0x00007ff2aebbf000) => not found => /lib64/ (0x00007ff2aeae4000)
        /lib64/ (0x00007ff2af53b000)

After rebuilding:

(chroot) nex-gentoo-bin / # ldd /usr/lib64/ (0x00007ffce3314000) => /usr/lib64/ (0x00007f9ffac0e000) => /lib64/ (0x00007f9ffac03000) => /lib64/ (0x00007f9ffabd5000) => /lib64/ (0x00007f9ffab1f000) => /lib64/ (0x00007f9ffab0c000) => /lib64/ (0x00007f9ffaaf2000) => /usr/lib64/ (0x00007f9ffa989000) => /lib64/ (0x00007f9ffa7b6000) => /usr/lib64/ (0x00007f9ffa5b7000) => /lib64/ (0x00007f9ffa4dc000)
        /lib64/ (0x00007f9ffb132000) => /usr/lib64/ (0x00007f9ff8653000) => /usr/lib/gcc/x86_64-pc-linux-gnu/12/ (0x00007f9ff8431000) => /usr/lib/gcc/x86_64-pc-linux-gnu/12/ (0x00007f9ff8412000)
Comment 1 Adrian Schollmeyer 2023-07-08 16:31:32 UTC
Created attachment 865281 [details]
emerge --info

Note that while the gentoo repo shows a different sync-uri, the last sync was made against an official Gentoo mirror a few hours ago.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-09 04:25:53 UTC
You appear to have FEATURES="-preserve-libs" (preserve-libs is the default), so if your tar uses libarchive and libarchive is linked with ICU, it's broken.

Let's use preserve-libs.eclass (which is for *-preserve-libs* users, not preserve-libs users) in ICU given ICU is really a critical system library anyway, not just because of libarchive.