Hi, sorry for filing another bug about this, but I couldn't find one bug which adresses this part of revdep-rebuild. Also the provided patches I tried didn't work. I am using gentoolkit-0.2.2 and I get the following error(s): # revdep-rebuild -i Configuring search environment for revdep-rebuild Checking reverse dependencies... Packages containing binaries and libraries broken by a package update will be emerged. Collecting system binaries and libraries... done. (/root/.revdep-rebuild.1_files) Collecting complete LD_LIBRARY_PATH... done. (/root/.revdep-rebuild.2_ldpath) Checking dynamic linking consistency... /usr/bin/revdep-rebuild: line 402: /bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 404: /bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 404: /bin/egrep: Argument list too long /usr/bin/revdep-rebuild: line 450: /bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 450: /bin/egrep: Argument list too long done. (/root/.revdep-rebuild.3_rebuild) Assigning files to ebuilds... Nothing to rebuild Evaluating package order.../usr/bin/revdep-rebuild: line 583: /bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 583: /bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 583: /bin/tr: Argument list too long done. (/root/.revdep-rebuild.5_order) /usr/bin/revdep-rebuild: line 623: /bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 623: /bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 623: /bin/tr: Argument list too long Dynamic linking on your system is consistent... All done. /usr/bin/revdep-rebuild: line 631: /bin/rm: Argument list too long /usr/bin/revdep-rebuild: line 632: /bin/rm: Argument list too long -- A while ago I was trying to figure out why the argument list was too long, and strangely enough the arguments in that line where only a handfull of libraries. I don't know what it could be. regards, florian
Please provide emerge --info
(In reply to comment #1) > Please provide emerge --info > # emerge --info Portage 2.1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-gentoo-r3 i686) ================================================================= System uname: 2.6.16-gentoo-r3 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.60GHz Gentoo Base System version 1.6.14 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.1/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" DISTDIR="/media/Disk2/temp/gentoo_distfiles" FEATURES="autoconfig ccache distcc distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts cdr cli crypt cups directfb divx4linux dri dvd dvdread eds emboss encode esd fbcon ffmpeg firefox foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 hal hbci imagemagick imlib ipv6 irda isdnlog java jpeg kde libg++ libwww mad mikmod mmx mmx2 mono motif mp3 mpeg nas ncurses nls nptl nsplugin ofx ogg opengl oss pam pcmcia pcre pdf pdflib perl png pnp ppds pppd python qt quicktime quotes readline real reflection samba sdl session spell spl sse sse2 ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vcd vorbis win32codecs xinerama xml xmms xorg xv xvid xvmc zlib elibc_glibc kernel_linux userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS regards, florian
(In reply to comment #1) > Please provide emerge --info > sorry the other post was from another computer, where it works. here the correct one: # emerge --info Portage 2.1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.14-gentoo-r5 i686) ================================================================= System uname: 2.6.14-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 1500MHz Gentoo Base System version 1.6.14 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" DISTDIR="/mnt/misc/portage_tree/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/mnt/misc/portage_tree" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts cli crypt cups directfb divx4linux dri dvd dvdread eds emboss encode esd fbcon ffmpeg firefox foomaticdb fortran gd gdbm gif gpm gstreamer gtk gtk2 imagemagick imlib ipv6 isdnlog java jpeg kde libg++ libwww mad mikmod mmx mmx2 mono motif mozilla mp3 mpeg nas ncurses nls nptl nsplugin ogg opengl oss pam pcre pdf pdflib perl png pppd python qt quicktime readline real reflection samba sdl session spell spl sse sse2 ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode v4l v4l2 vhosts vorbis win32codecs xinerama xml xmms xorg xv xvid zlib elibc_glibc kernel_linux userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS regards, florian
do you have a /usr/lib/portage/bin/sed script, and if so, is it +x? If you do, it is safe to delete it. I am wondering again how it keeps getting on systems, it is only for non-gnu...
(In reply to comment #4) > do you have a /usr/lib/portage/bin/sed script, and if so, is it +x? nope, don't have that florian
I don't know if it helps in any way, but I don't understand at all why I get this error in the first place. If I add an echo before the first line where I get the error i.e.: ... 402: echo $LD_LIBRARY_MASK 403: LD_MASK="\\( $(echo "$LD_LIBRARY_MASK" | sed 's/\./\\./g;s/ / \\| /g') \\)" I get the following: ... Checking dynamic linking consistency... libodbcinst.so libodbc.so libjava.so libjvm.so /usr/bin/revdep-rebuild: line 403: /bin/sed: Argument list too long ... florian
It really looks to me like something is wrong with your sed command. What does the following return: echo "Hello" | /bin/sed 's/H/h/g' equery belongs /bin/sed equery check <package from above equery command>
(In reply to comment #7) > It really looks to me like something is wrong with your sed command. > > What does the following return: > echo "Hello" | /bin/sed 's/H/h/g' > equery belongs /bin/sed > equery check <package from above equery command> > it's is alright, I think. I did an reemerge just to be sure. and if I type the outcome of my last post in the commandline it works as expected: # LD_LIBRARY_MASK="libodbcinst.so libodbc.so libjava.so libjvm.so" # echo "$LD_LIBRARY_MASK" libodbcinst.so libodbc.so libjava.so libjvm.so # LD_MASK="\\( $(echo "$LD_LIBRARY_MASK" | sed 's/\./\\./g;s/ / \\| /g') \\)" # echo $LD_MASK \( libodbcinst\.so \| libodbc\.so \| libjava\.so \| libjvm\.so \) regards, florian
Do you get the same errors if you run revdep-rebuild --pretend as a normal user?
(In reply to comment #9) > Do you get the same errors if you run revdep-rebuild --pretend as a normal > user? > yes, same errors
Please run revdep-rebuild --ignore --keep-temp --pretend and attach the resulting ~/.revdep-rebuild files
Created attachment 90103 [details] output: revdep-rebuild --ignore --keep-temp --pretend
(Removing dev-portage from the CC as it has nothing to do with them) I have duplicated the problem, however, I don't have an easy solution. A workaround is to comment out line 388 which looks like: sed 's:/[^/]*$::' <$LIST.1_files | sort -ru When you do that you run the risk of revdep-rebuild not catching some broken dynamic links. The issue is being caused by the COMPLETE_LD_LIBRARY_PATH variable being larger than bash supports.
thanks, given your hint I think replacing line 392: < export COMPLETE_LD_LIBRARY_PATH="$(cat $LIST.2_ldpath)" with: >unset COMPLETE_LD_LIBRARY_PATH #just to be sure it is not exported >COMPLETE_LD_LIBRARY_PATH="$(< $LIST.2_ldpath)" should help. I think COMPLETE_LD_LIBRARY_PATH does not need to be exported or am I wrong? (if it does need to be exported that should be fixed...) the limit (according to other people) is not in bash but in the kernel and it is a limit of the size of the environment a job is allowed to have, thus if you do not export the variable it is just local and it works. regards, florian (In reply to comment #13) > (Removing dev-portage from the CC as it has nothing to do with them) > > I have duplicated the problem, however, I don't have an easy solution. A > workaround is to comment out line 388 which looks like: > > sed 's:/[^/]*$::' <$LIST.1_files | sort -ru > > When you do that you run the risk of revdep-rebuild not catching some broken > dynamic links. > > The issue is being caused by the COMPLETE_LD_LIBRARY_PATH variable being larger > than bash supports. >
(In reply to comment #14) > I think COMPLETE_LD_LIBRARY_PATH does not need to be exported or > am I wrong? (if it does need to be exported that should be fixed...) > > the limit (according to other people) is not in bash but in the kernel and it > is a limit of the size of the environment a job is allowed to have, thus if > you do not export the variable it is just local and it works. It doesn't need to be exported and I will fix that. However, that still doesn't fix the problem. The following is using your ldpath file: $ unset COMPLETE_LD_LIBRARY_PATH $ COMPLETE_LD_LIBRARY_PATH="$(cat .revdep-rebuild.2_ldpath)" $ ldd /bin/ls linux-gate.so.1 => (0xffffe000) librt.so.1 => /lib/librt.so.1 (0xb7fab000) libc.so.6 => /lib/libc.so.6 (0xb7e92000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7e7f000) /lib/ld-linux.so.2 (0xb7fc9000) $ LD_LIBRARY_PATH="$COMPLETE_LD_LIBRARY_PATH" ldd /bin/ls bash: /usr/bin/ldd: Argument list too long The last statement is used in revdep-rebuild and thus will still break even when we don't export COMPLETE_LD_LIBRARY_PATH. What is needed is a smart mechanism or heuristic to add paths appropriately to account for libraries in non-standard locations. Currently, revdep-rebuild is using the brute force approach of adding everything, which is what is causing this issue. Finally, I misstated what would happen if the line is commented out. You won't miss a broken library, you will get false positives for things that are not broken due to libraries being in non standard locations. Mozilla Firefox is one such example.
hmmm, that is true I guess, that removing the export does not really help. It helps on my system however (probably since I don't have broken packages). Now I get the following, which is a complete different issues, and I guess that the broken library shouldn't have been on my system in the first place. revdep-rebuild --ignore --keep-temp --pretend Configuring search environment for revdep-rebuild Checking reverse dependencies... Packages containing binaries and libraries broken by a package update will be emerged. Collecting system binaries and libraries... done. (/root/.revdep-rebuild.1_files) Collecting complete LD_LIBRARY_PATH... done. (/root/.revdep-rebuild.2_ldpath) Checking dynamic linking consistency... libodbcinst.so libodbc.so libjava.so libjvm.so broken /usr/lib/kde3/libkdiff3part.la (requires /usr/kde/3.4/lib/libkparts.la) broken /usr/lib/kde3/libkdiff3part.la (requires /usr/kde/3.4/lib/libkio.la) broken /usr/lib/kde3/libkdiff3part.la (requires /usr/kde/3.4/lib/libkdeui.la) broken /usr/lib/kde3/libkdiff3part.la (requires /usr/kde/3.4/lib/libkdesu.la) broken /usr/lib/kde3/libkdiff3part.la (requires /usr/kde/3.4/lib/libkwalletclient.la) broken /usr/lib/kde3/libkdiff3part.la (requires /usr/kde/3.4/lib/libkdecore.la) broken /usr/lib/kde3/libkdiff3part.la (requires /usr/kde/3.4/lib/libDCOP.la) broken /usr/lib/kde3/libkdiff3part.la (requires /usr/kde/3.4/lib/libkdefx.la) done. (/root/.revdep-rebuild.3_rebuild) Assigning files to ebuilds...find: missing argument to `-exec' done. (/root/.revdep-rebuild.4_ebuilds) Evaluating package order... done. (/root/.revdep-rebuild.5_order) Dynamic linking on your system is consistent... All done. --- however, a possible fix for: LD_LIBRARY_PATH="$COMPLETE_LD_LIBRARY_PATH" ldd /bin/ls would be sth like: for chunk in chunks LD_LIBRARY_PATH="$COMPLETE_LD_LIBRARY_PATH[chunk]" ldd /bin/ls what I mean is using only parts of COMPLETE_LD_LIBRARY_PATH and only if all ldd's fail consider the FILE broken. (takes longer but should work) On the other hand, I don't quite understand why LD_LIBRARY_PATH is needed in the first place. even the mozilla libraries have to be in some standard search path or not??? (but I don't claim to understand the whole issue completely, which is alright ;-)
I have also been hit by this - my main desktop which is an 'everything including the kitchen sink' system (>1400 packages)
Pushed commit too fast. using the ~x86 app-portage/gentoolkit-0.2.2 stable version silently fails, the above fails as stated. problem has occurred for awhile, but has now become critical for me after the modular xorg-x11 upgrade. Modified revdep-rebuild as per comment 14 and at least it now runs and comes up with a list of ebuilds.
Created attachment 90999 [details, diff] revdep-rebuild.137313.patch This patch adds the --no-path option to revdep-rebuild. Using this patch will instruct revdep-rebuild to only use the standard paths when setting LD_LIBRARY_PATH. This will cause it to report false positives for software that doesn't install its libraries in the standard locations. This patch will however allow systems impacted by this bug to be able to utilize revdep-rebuild. To use it, execute revdep-rebuild --no-path <other options>
The patch is in subversion rev 302.
what is the address of the svn repository? I have looked on gentoo.org and i cannot find any ref to it.
You can access the repository at: http://viewcvs.gentoo.org/viewcvs.py/gentoolkit/trunk/
According to http://lists.apple.com/archives/Darwinos-users/2004/Jul/msg00030.html the problem is that the environment variables are too large for the shell. For instance, my COMPLETE_LD_LIBRARY_PATH has 127,000+ characters in it. The patch supplied in Comment #19 does not fix this problem.
bump; me too, and this is starting to break other things. This bug has been open a long time now, for something so important.
If you have this problem, do the following: Install gentoolkit-0.2.3_pre1 or higher run revdep-rebuild --no-ld-path <other options> If it still fails, run revdep-rebuild --ignore --keep-temp --no-ld-path <other options>, then attach the output and the resulting .revdep-rebuild* files to this case
Release in gentoolkit-0.2.3_pre1
With app-portage/gentoolkit-0.2.3_pre3 the problem is fixed for me
*** This bug has been marked as a duplicate of bug 38751 ***
Similar symptoms, but this is not a duplicate of bug 38751.
Created attachment 108803 [details, diff] revdep-rebuild.patch this would fix it, or so I hope. I haven't tested it yet, as I get nowhere near that border(linux gives you 128kB for a command, my list is 16.5kB). As suggested by comment 16, it splits the list up, using split (before the newlines are removed, to make sure it doesn't split it in the middle of a filename). The patch is against gentoolkit-0.2.2. In some very rare cases (a file requiring libs spread over several parts), it might still give false positives, which can be fixed by checking MISSING_LIBS against 1_files.
Fixed in gentoolkit-0.2.3