[Top][All Lists]

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

solving of name conflicts in included .a

From: Jan Kratochvil
Subject: solving of name conflicts in included .a
Date: Sun, 3 Nov 2002 22:46:48 +0100
User-agent: Mutt/1.4i


When you include convenience library (.a) containing two conflicting name
objects (same basename from two different directories) only one of those two
object files will survive in ".libs/libA.lax/" arena:
        rm -fr .libs/libA.lax/libB.a
        mkdir .libs/libA.lax/libB.a
        (cd .libs/libA.lax/libB.a && ar x /abs/path/to/A/B/.libs/libB.a)

The attached patch implements automatic renaming of "*.*" to "*-$seqnum.*"
in such case:
        libtool: link: warning: object name conflicts; renaming object files
        libtool: link: warning: to ensure that they will not overwrite
        (cd .libs/libA.lax/libB.a && ar xN 1 /abs/path/to/A/B/.libs/libB.a 
'XconflictX.o' && mv -f 'XconflictX.o' 'XconflictX-1.o')
        (cd .libs/libA.lax/libB.a && ar xN 2 /abs/path/to/A/B/.libs/libB.a 
'XconflictX.o' && mv -f 'XconflictX.o' 'XconflictX-2.o')

Although reanming to a new name may be confusing IMO there is no better option.
The original (conflicting) name is not left there in any instance to prevent
misleading confusion of different object file found than expected.

Patched against current libtool CVS. "works4me".
Not subscribed in any libtool lists, please gimme a Cc.

Best Regards,

Description: Text document

reply via email to

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