libtool
[Top][All Lists]
Advanced

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

Disabling use of ".la" files when linking ?


From: Yvan FOURNIER
Subject: Disabling use of ".la" files when linking ?
Date: Tue, 20 Oct 2009 15:04:50 +0200


Hello,

I would like to know if it is possible to disable libtool's tracking of ".la" files (I found nothing in the documentation or on the web).

The rationale is the following :

In an autoconf context, compile and link tests for various libraries are done before libtool is used, and thus do not
use the info available in .la files. Once we have determined all the correct flags for external libraries, the main benefit
of .la files (tracking dependencies automatically) seems to be lost/unused.

In quite a few cases, the info in .la files leads to problems. This occurs when:

- A library was moved (I know this shouldn't be done, but when somebody already installed a library which is a pain to install
on a given architecture, such as HDF5 on an IBM Blue Gene/P, and they are not available for the correction, being able to ignore
.la files would be nice)

- A different compiler was used for two libraries; this happens for example with OpenMPI 1.3 built with gcc, which adds a
"-pthread" option in its .la files. Trying to configure/compile/link a code using this under autotools with a PGI compiler
leads to a link error as "-pthread" is not recognized. This could be considered an issue with the upstream library
not taking the required precautions and using a "-Wl,..." type option instead, but I have seen nothing in the libtool documentation
warning against such issues. Here again, ignoring .la files would be useful.

- A similar example also occured in a packaged GNU/Linux distribution (Ubuntu 9.04) with OpenMPI: the .la files included
a "-liverbs" option, while "libvierbs" is optional, loaded in a "plugin" type manner, and not installed by default. Here again,
the link failed due to the .la files, while configure had done fine.

- Finally, on a Blue Gene/P machine (cross-compiling environment with a mix of static and shared libraries), adding
a few C++ dependency libray options led libtool to add other libraries from the front-end machine instead of the target
machine, and the link failed also.

So basically, it would be nice to be able to use libtool's handling of static or shared library functionnality (i.e.
--enable/disable-shared/static in configure options, having executables built in .libs with a wrapper having
the appropriate LD_LIBRARY_PATH options to work pre-install, linking and possibly re-linking with the appropriate rpath
command when compiling/installing, etc.), but disable it's use of .la files.

An option similar to disable-shared (perhaps "ignore-la" to ignore, "disable-la" to not generate) that could also be
set through the autoconf LT_INIT macro would thus be welcome.

Ideally, rpath info could in addition be determined directly from library paths so as to keep libtool's rpath handling
(one of its strong points IMHO), even when not using .la files.

Best regards,

        Yvan Fournier


Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.

reply via email to

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