Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-alt
Navigation:
Lists: gentoo-alt: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-alt@g.o
From: Fabian Groffen <grobian@g.o>
Subject: Re: AIX: libiconv issues still ?
Date: Thu, 24 May 2007 10:22:46 +0200
Ok, I think I finally got awake/enough coffee.


Index: bin/misc-functions.sh
===================================================================
--- bin/misc-functions.sh       (revision 6598)
+++ bin/misc-functions.sh       (working copy)
@@ -294,8 +294,14 @@
        # http://bugs.gentoo.org/4411
        abort="no"
        for a in "${ED}"usr/lib*/*.a ; do
-               s=${a%.a}.so
-               if [[ ! -e ${s} ]] ; then
+               [[ ${CHOST} == *-darwin* ]] \
+                       && s=${a%.a}.dylib \
+                       || s=${a%.a}.so
+               # On platforms which have no (GNU) linker scripts (like Darwin,
+               # AIX and IRIX) we use symlinks.  Since they are still in the
+               # install image they point to non-existing libs, which make
+               # existence tests fail.  Just check for a link for this reason.
+               if [[ ! -e ${s} ]] && [[ ! -L ${s} ]] ; then
                        s=${s%usr/*}${s##*/usr/}
                        if [[ -e ${s} ]] ; then
                                vecho -ne '\a\n'


This is applied against the current portage source.  I greatly
simplified the check, since the original check isn't so exhaustive
either.  All in all, we don't check if a symlink points to something
valid (neither do we check the gnu-ld script to do so), but we just
check there is no file or link in usr/lib and then check if something is
in lib.

Two problems here:

1. the check above this check looks for absolute symlinks in libs, and
   warns if a lib is symlinked that crosses the /usr boundary.
2. the -e ${s} in the lib dir will fail if the symlink is dead, however,
   since it should be a relative symlink, it should work.

So, I think gen_usr_ldscript should generate a relative symlink instead
of an absolute symlink, right?
I never noticed it, because these checks were never run on Darwin, but
they soon will after this is solved.

If we change gen_usr_ldscript, the symlink will become relative, and the
whole patch above will become unnecessary.



On 24-05-2007 09:45:02 +0200, Fabian Groffen wrote:
> On 23-05-2007 23:58:48 +0200, Michael Haubenwallner wrote:
> > > > +           s=${a%.a}.so
> > > s = lib/libfoo.so.1.so
> > > or
> > > s = usr/lib/libfoo.so.so
> > > I think this is wrong.  Is the replacement really necessary?  I think .a
> > > has always been replaced in this case.
> > 
> > err, s is recreated from (still initial) $a, not (current) $s:
> 
> My bad.
> 
> > s = /D/prefix/usr/lib/libfoo.so
> > 
> > > >             s=${s%usr/*}${s##*/usr/}
> > > s = lib/libfoo.so(.so)
> > 
> > s = /D/prefix/lib/libfoo.so
> > 
> > > > +           if [[ -L ${s} ]] && rs=$(readlink "${s}"); then
> > 
> > lib/libfoo.so could be a symlink '-> libfoo.so.1'.
> > 
> > rs = libfoo.so.1
> > 
> > Hmm, could this also be a symlink to somewhere outside lib/ ?
> > Or even '-> /prefix/lib/libfoo.so.1' ?
> > If not, we might not need to resolve symlinks (to $D) again here at all,
> > as [[ -e ]] succeeds if symlink is resolveable.
> 
> I think it should exist.  Nothing more.  So -e should suffice.
> 
> > > > +               [[ ${rs} == /* ]] && s="${D}${rs}" || s="${ED}usr/lib/${rs}"
> > > Hmmm... if s is a link, and it is relative, should it start from
> > > ${ED}lib in that case?
> > 
> > oops, you're right, should read:
> > +               [[ ${rs} == /* ]] && s="${D}${rs}" || s="${ED}lib/${rs}"
> 
> Let's commit it like this then...
> 
> -- 
> Fabian Groffen
> Gentoo on a different level
> 
> -- 
> gentoo-alt@g.o mailing list
> 

-- 
Fabian Groffen
Gentoo on a different level

-- 
gentoo-alt@g.o mailing list


Replies:
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
References:
Re: AIX: libiconv issues still ?
-- Marshall McMullen
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
Re: AIX: libiconv issues still ?
-- Marshall McMullen
Re: AIX: libiconv issues still ?
-- Fabian Groffen
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
Re: AIX: libiconv issues still ?
-- Fabian Groffen
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
Re: AIX: libiconv issues still ?
-- Fabian Groffen
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
Re: AIX: libiconv issues still ?
-- Fabian Groffen
Navigation:
Lists: gentoo-alt: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: AIX: libiconv issues still ?
Next by thread:
Re: AIX: libiconv issues still ?
Previous by date:
Re: AIX: libiconv issues still ?
Next by date:
Re: AIX: libiconv issues still ?


Updated Jun 17, 2009

Summary: Archive of the gentoo-alt mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.