Hello Kent, * Kent Boortz wrote on Tue, Sep 12, 2006 at 12:19:15PM CEST: > > All is well, except on AIX 5.2. What happens is that libtool part of > the build produces a binary with soname ".so", but this file is also, > according to AIX tradition, put into a AR archive. And this is what is > installed with "make install".
Libtool supports two different "modes" on AIX: runtimelinking and no runtimelinking. (The exact AIX linker semantics are more complex, Libtool uses somewhat of a simplification by distinguishing these cases.) > - How do I prevent the AR version to be installed with "make install", > but instead get the ".so" version, i.e. a module I can load? Use runtimelinking when compiling libltdl: ./configure LDFLAGS=-Wl,-brtl If in doubt, use that always, as runtimelinking is closer to what people used to ELF semantics expect. > - I saw there are some versions, or hacked versions, of "ltdl.c" > floating round that sets RTLD_MEMBER on AIX, enabling opening > a "module" inside a AR container. As far as I can see, this never > made it to the official source, why not? Please post a reference. > - Browsing the source of libtool (in no way claiming I understand > anything I see), I come across a symbol "aix_use_runtimelinking" > that seems to prefer ".so" over the AR container, but it is set if > "-brtl" is in LDFLAGS. I thought libtool was to protect me from > depending on flags, that I in my Makefile.am need to write > something like > > # Set with AM_CONDITIONAL in configure.in > if WANT_AIX_RUNTIMELINKING > mymodule_la_LDFLAGS = -brtl That would have to be "-Wl,-brtl", I believe. (At least if you also want to use GCC on AIX.) And you should pass this flag to configure, else that will make some wrong settings. I don't know why Libtool supports both modes on AIX (and thus exposes the user to take care of this difference). That was way before my exposure to Libtool. Flexibility, I guess, and the hassles of getting the non-runtimelinking mode to work well enough. > Sorry if part of this is automake questions, it is so hard to tell > sometimes from the user perspective. No, you're quite right here. Cheers, Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool
