libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: versioning test on AIX


From: Rainer Tammer
Subject: Re: versioning test on AIX
Date: Wed, 25 Aug 2010 09:16:17 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.0

 Hello Ralf,
there might be a simple solution for this problem on AIX.

For example my libltdl.a (from the AIX Toolbox or my own build) contains
the following:

32 bit member:

libltdl.so.0  <- from the old libtool
libltdl.so.3.1.6
ltdl.o

64 bit member:

libltdl.so.3.1.6
ltdl.o

If an old program uses libltdl.a then the old libltdl.so.0 member is
used, and if a
new program uses libltdl.a then the new member is used. During the
creation of
the archive you can set the old member to LOADONLY so that new  programs
are not linked against the old member.

This could be done during "make install", might this help?

Bye
  Rainer

On 21.08.2010 10:17, Ralf Wildenhues wrote:
> * Ralf Wildenhues wrote on Sat, Aug 07, 2010 at 12:30:01AM CEST:
>> The test tries to ensure that with an incompatible library upgrade,
>> programs previously linked against the old library still work.  This
>> usually works on systems where different major versions of a library
>> have different file names.  Which isn't the case for AIX without
>> runtimelinking (liba.a is the same name whether it contains liba.so.2
>> or liba.so.0):
> [...]
>
>> Now, the part that really surprised me was that this doesn't even work
>> with runtimelinking (configure LDFLAGS=-Wl,-brtl), even though the file
>> names aren't the issue here:
> [...]
>
>> So, while I'm not completely sure yet that there isn't another bug
>> lurking in libtool here, it seems that this is another AIX limitation.
>>
>> One way out may be to use loader domains; see here for a description:
>> <http://stromberg.dnsalias.org/~strombrg/AIX-shared-libs.html>
>>
>> I don't really see how to apply this concept in general, i.e., without
>> user intervention.  So, for now I propose the patch below to skip this
>> part of the part; I will leave time for comments before pushing it.
> No comments, so I'm pushing this patch.
>
> Also pushing the trivial cleanup patch below.
>
> Cheers,
> Ralf
>
>>     Skip part of versioning test on AIX.
>>     
>>     * tests/versioning.at (versioning): The AIX linker always
>>     records the unversioned library name, even with runtimelinking,
>>     so skip the execution test for the incompatibly upgraded
>>     library.
>>     Report by Rainer Tammer.
>>
>> diff --git a/tests/versioning.at b/tests/versioning.at
>> index eef7c4a..1d75f62 100644
>> --- a/tests/versioning.at
>> +++ b/tests/versioning.at
>> @@ -227,6 +227,11 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o 
>> liba.la liba4.lo ]dnl
>>  # available, so test_uninstalled will not necessarily work here any more.
>>  AT_CHECK([$LIBTOOL --mode=install cp liba.la $libdir], [], [ignore], 
>> [ignore])
>>  AT_CHECK([$LIBTOOL --mode=clean rm -f liba.la], [], [ignore], [ignore])
>> +
>> +# This test does not work on AIX, not even with runtimelinking, because
>> +# the linker always records the unversioned name as dependency.
>> +AT_CHECK([:; case $host_os in aix*) exit 77;; esac])
>> +
>>  test_installed
>
>     Remove dead code from versioning test.
>     
>     * tests/versioning.at (versioning): No need to build unused
>     prog3.
>
> diff --git a/tests/versioning.at b/tests/versioning.at
> index 69bf731..eef7c4a 100644
> --- a/tests/versioning.at
> +++ b/tests/versioning.at
> @@ -91,14 +91,6 @@ int main (void)
>  }
>  ]])
>  
> -AT_DATA([prog3.c], [[
> -extern int a (void), internal_detail;
> -int main (void)
> -{
> -  return a () + internal_detail - 42;
> -}
> -]])
> -
>  
>  inst=`pwd`/inst
>  libdir=$inst/lib
> @@ -109,7 +101,7 @@ mkdir $inst $libdir $bindir
>  for file in liba1.c liba2.c liba3.c liba4.c libb.c; do
>    $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
>  done
> -for file in prog1.c prog2.c prog3.c; do
> +for file in prog1.c prog2.c; do
>    $CC $CPPFLAGS $CFLAGS -c $file
>  done
>  
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]