[Top][All Lists]

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

Relink on AIX: Doesn't Just Work (TM)

From: Daniel Sands
Subject: Relink on AIX: Doesn't Just Work (TM)
Date: Wed, 26 Dec 2007 20:45:34 -0700

When relink for install is done, any libs that are part of the same package
will be linked by their full installed path and not by -L,-l.  This is
because hardcode_direct is set to "yes".  It is true that if you specify a
library by its path, its path will be linked into the program or library.
But apparently for relinking libraries, libtool thinks this means that the
full path is supposed to be used instead of -L,-l   This doesn't work unless
the dependent .la's were already installed in their final install directory,
instead of for packaging.  I would suggest that unless some specific command
line option were used, AIX should use the libpath approach like most other
platforms use.

Here are AIX's rules for loading shared libs and objects, for future

1) Shared libraries are ARchives of shared objects.  If linked against a
shared object, a lib or program will expect the module it loads to be a
shared object.  If linked against a shared library, it will expect to find
an ARchive that contains a certain member.

2) If a shared lib/object is specified by full path, the linked lib or
program will expect to find it at that exact path.  Otherwise it will search
the LIBPATH environment variable followed by the built-in run path.

In my opinion, the vast majority of cases for AIX should use the
LIBPATH/runpath method instead of the full path.  Is there any reason not to
handle it this way?

reply via email to

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