Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581492 - app-portage/gentoolkit-0.3.1-r1 - revdep-rebuild reporting false "broken orphan files"
Summary: app-portage/gentoolkit-0.3.1-r1 - revdep-rebuild reporting false "broken orph...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL: https://forums.gentoo.org/viewtopic-t...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-28 23:38 UTC by Boris Staletic
Modified: 2016-06-27 16:21 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Staletic 2016-04-28 23:38:22 UTC
Hello,

When I emerged armv6j and armv7a tool chains using "crossdev -S -v -t $CTARGET" revdep-rebuild started reporting some .so files as "broken orphan files". The old version, revdep-rebuild.sh, reports the system in consistent state. The files in question are present and owned by the packages they are supposed to. I checked CONTENTS file, equery f $packagename, equery check $packagename, equery b $filename, moving the files away and reemerging. The end result is always the same, revdep-rebuild reports files as "broken orphans", though everything looks like it should.

Reproducible: Always

Steps to Reproduce:
1. Use amd64 architecture (have not tried it on other)
2. Emerge crossdev
3. Emerge armv6j and/or armv7a cross tool chain
4. Run revdep-rebuild (the python version)
Actual Results:  
Revdep-rebuild reports some files as "broken orphan files"

Expected Results:  
Revdep-rebuild should report system linking in consistent state

Output of revdep-rebuild:
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please files bugs at: https://bugs.gentoo.org/
 * Checking dynamic linking consistency
 * Assign files to packages

 !!! Broken orphaned files: No installed package was found for the following:
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libgomp.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libatomic.so.1.1.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libitm.so.1.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libatomic.so.1.1.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libasan.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libubsan.so.0.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libstdc++.so.6.0.20
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libasan.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libgomp.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libitm.so.1.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libubsan.so.0.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libstdc++.so.6.0.20

There is nothing to emerge. Exiting.
Comment 1 Boris Staletic 2016-04-28 23:48:43 UTC
Portage 2.2.28 (python 2.7.11-final-0, hardened/linux/amd64, gcc-5.3.0, glibc-2.23-r2, 4.5.1 x86_64)
=================================================================
System uname: Linux-4.5.1-x86_64-Intel-R-_Core-TM-_i5-2500_CPU_@_3.30GHz-with-gentoo-2.2
KiB Mem:     6068352 total,    148496 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 28 Apr 2016 18:00:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.3_p42-r2::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo
dev-util/cmake:           3.5.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /home/portage-tree/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes

bstaletic
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/home/portage-tree/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/home/portage-tree/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl alsa amd64 berkdb bzip2 cli cracklib crypt cxx dri ffmpeg gdbm hardened iconv justify libressl mmx mmxext modules multilib ncurses nptl openmp pax_kernel pcre pie readline savedconfig seccomp session sse sse2 ssl ssp tcpd unicode urandom vim xattr xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="libressl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4 python2_7" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="modesetting" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 2 Boris Staletic 2016-04-29 00:12:00 UTC
This is the revdep-rebuild --debug output:

 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please files bugs at: https://bugs.gentoo.org/
	main(), _libs_to_check = set([])
 * Found a valid cache, skipping collecting phase
	analyse(), Found 6175 libraries (+1941 symlinks) and 5990 binaries
 * Scanning files
	scan(), scanelf params = ['-BF', '%F %f %S %n %M'], # files: 6289
	scan(), final output length: 4723
	scan_files(); total time to get scanelf data is 144 milliseconds
	scan_files(); total filenames found: 3105 in 194 milliseconds
 * Checking dynamic linking consistency
	analyse(), Searching for 6289 libs, bins within 8116 libraries and links
	LibCheck.__init__(), new searchlibs: ['32', '64']
	LibCheck.search(), Checking for broken 32 bit libs
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libatomic.so.1.1.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libatomic.so.1.1.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libubsan.so.0.0.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libubsan.so.0.0.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libgomp.so.1.0.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libgomp.so.1.0.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libasan.so.1.0.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libasan.so.1.0.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libstdc++.so.6.0.20
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libstdc++.so.6.0.20
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libitm.so.1.0.0
	LibCheck.search(); FOUND: 32bit, ld-linux-armhf.so.3, /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libitm.so.1.0.0
	LibCheck.search(), Checking for broken 64 bit libs
	LibCheck.search(); Total found: 1 libs, 12 files in 112 milliseconds
 * Broken files that requires: ld-linux-armhf.so.3 (32 bits)
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libasan.so.1.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libatomic.so.1.1.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libgomp.so.1.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libitm.so.1.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libstdc++.so.6.0.20
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libubsan.so.0.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libasan.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libatomic.so.1.1.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libgomp.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libitm.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libstdc++.so.6.0.20
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libubsan.so.0.0.0
	LibCheck.process_results(); total filepaths found: 12 in 1 milliseconds
 * Assign files to packages
	assign_packages(); assigned 0 packages, 12 orphans in 470 milliseconds

 !!! Broken orphaned files: No installed package was found for the following:
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libgomp.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libatomic.so.1.1.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libitm.so.1.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libatomic.so.1.1.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libasan.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libubsan.so.0.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libstdc++.so.6.0.20
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libasan.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libgomp.so.1.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libitm.so.1.0.0
	* /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/libubsan.so.0.0.0
	* /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.3/libstdc++.so.6.0.20

There is nothing to emerge. Exiting.
rebuild return code = 0
Comment 3 Brian Dolbec gentoo-dev 2016-05-18 14:53:24 UTC
I've now committed some fixes to the python revdep-rebuild fixing the masks where they were not being honored.

Please try adding:

/usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3

to the SEARCH_DIRS_MASK variable in /etc/revdep-rebuild/99revdep-rebuild.

Or you can add a file called cross-gcc-arm with that variable assignment.  It will be added to the others in that directory.

I don't know enough about cross development linking to troubleshoot this further.
Hopefully this should remove the false positive for you.
Comment 4 Brian Dolbec gentoo-dev 2016-05-18 14:54:48 UTC
Please test with gentoolkit-9999, I will be making another release very soon, it would be good to know if the mask works for you before the release is made.  In case it needs some adjustment.
Comment 5 Boris Staletic 2016-05-18 19:27:43 UTC
I've tried both adding 'SEARCH_DIRS_MASK="/usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3/"' to the 99revdep-rebuild and, afterwards a new file called cross-gcc-arm. Since both seemed to make nodifference, I merged 9999 version and ran revdep-rebuild again. This time the script found the same files again. Then I tried replacing the line above with 'SEARCH_DIRS_MASK="${SEARCH_DIRS_MASK} /usr/lib64/gcc/armv6j-hardfloat-linux-gnueabi/4.9.3"' as I thought it mayoverride theprevious value of the variable. This again changed nothing.

Note: Ifound two files named 05cross-armv6j-hardfloat-linux-gnueabi and 05cross-armv7a-hardfloat-linux-gnueabi that contain 'SEARCH_DIRS_MASK="/usr/armv6j-hardfloat-linux-gnueabi"' and 'SEARCH_DIRS_MASK="/usr/armv7a-hardfloat-linux-gnueabi"' rspectively. No matter if those lines are commented out or not the output of revdep-rebuild stays exactly as it was before.
Comment 6 Boris Staletic 2016-05-18 20:08:04 UTC
I just realised that recdep-rebuild also caches the files for the collect() stage, but even if I use the --ignore flag it still reports files as orphans. Only now I'm sure it picked all the paths in SEARCH_DIRS_MASK
Comment 7 Brian Dolbec gentoo-dev 2016-05-18 21:17:21 UTC
Thank you for the testing.   I'll see what I can figure out about this one.
Comment 8 Boris Staletic 2016-06-26 11:54:09 UTC
I've merge two more cross tool chains: avr and armv7a-none-eabi. I'm still using the git version of gentoolkit. Running revdep-rebuild this time again reported "Broken orphan files". The strange part is (at least to me) that it had not reported any files belonging to the new tool chains (i.e. the output remained the same).
Comment 9 Boris Staletic 2016-06-27 16:21:50 UTC
I'm not convinced this is a revdep-rebuld bug any more. Only with the two tool chains causing revdep-rebuild to behave oddly I get two more errors from emerge itself. Both happening after emerge finishes the final merge and before printing out any messages. The first error is about bzip2 being an invalid command. bzip2 is valid, I have never touched any portage settings regarding bzip. The other error is "no python interpreter". This is also not true, as I have a valit python:2.7 and python:3.5. Of the two python interpreters I've set 2.7 as the first, but changing this had no impact on anything. Also I update my system almost daily and thatworks perfectly.