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

Bug 105792

Summary: fix_libtool_files fixlafiles.awk: lib64 and lib32 skipped
Product: Gentoo Linux Reporter: Christophe Saout <christophe>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: amd64
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Christophe Saout 2005-09-13 06:09:15 UTC
fix_libtool_files.sh skips /lib32, /lib64 and /usr/lib32, /usr/lib64 because
they are considered subdirectories of /lib and /usr/lib. This causes trouble if
/lib and /lib64 (and /usr/lib*) are not the same, like for the experimental
no-symlinks profile on amd64.


Reproducible: Always
Steps to Reproduce:
1. Use /usr/portage/profiles/default-linux/amd64/2005.0/no-symlinks
2. Upgrade gcc
3. Unmerge old gcc / run fix_libtool_files.sh


Actual Results:  
.la files in /usr/lib64 are not fixed

Expected Results:  
.la files in /usr/lib64 should be fixed to point to the new libstdc++ directory


I think the error comes from this part in fixlafiles.awk:

                                #
                                # Drop the directory if its a child directory of
                                # one that was already added ...
                                # For example, if we have:
                                #  /usr/lib /usr/lib/mozilla /usr/lib/nss
                                # We really just want to save /usr/lib
                                #
                                CHILD = 0
                                for (y in DIRLIST) {
                                        if (nodes[x] ~ "^" DIRLIST[y]) {
                                                CHILD = 1
                                                break
                                        }
                                }
                                if (CHILD) continue

(nodes[x] ~ "^" DIRLIST[y]) treats /usr/lib64 as a subdirectory of /usr/lib. It
should probably be:

                                        if (nodes[x] "/" ~ "^" DIRLIST[y] "/") {

So that it checks whether /usr/lib64/ starts with /usr/lib/ which it doesn't,
but works for real subdirectories.

--

Portage 2.0.52-r1 (default-linux/amd64/2005.1/no-symlinks,
gcc-4.0.2-beta20050908-hardenednopie, glibc-2.3.5.20050725-r0, 2.6.12-rc1-cs2
x86_64)
=================================================================
System uname: 2.6.12-rc1-cs2 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre8
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.13
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
sys-devel/binutils:  2.16.91.0.3
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe -D_FORTIFY_SOURCE=1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -pipe -D_FORTIFY_SOURCE=1 -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks multilib-strict sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://gentoo.inode.at/source/
http://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="de_DE@euro"
LINGUAS="de en"
MAKEOPTS="-j5"
PKGDIR="/home/system/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aalib acl acpi alsa amd64 apache2 authdaemond avi berkdb bitmap-fonts
bzip2 cairo caps cdb crypt curl devmap droproot eds emboss encode exif fam
foomaticdb fortran gcj gd gdbm gif gmp gpm gs gstreamer gtk2 guile hardened
iconv idn imagemagick imap imlib ipv6 java jpeg junit kerberos lcms ldap libg++
libgda libwww lzw lzw-tiff maildir mcal motif mp3 mpeg mysql ncurses nfsv4 nls
nptl odbc oggvorbis opengl pam pdf pdflib perl php pic png postgres postscript
python quicktime quotas readline samba sasl sdl slang snmp source spamassassin
spell ssl tcl tcpd tiff truetype truetype-fonts type1-fonts unicode usb
userlocales utf8 webdav xinerama xml xml2 xpm xv zlib linguas_de linguas_en
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Comment 1 SpanKY gentoo-dev 2005-09-24 00:31:24 UTC
that will add dups though ... if we change it to

                    if (nodes[x] ~ "^" DIRLIST[y] "(/|$)") {

everything should be kosher

added to cvs, thanks