[Top][All Lists]

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

Re: lt_dlopen fails on AIX

From: Michael Haubenwallner
Subject: Re: lt_dlopen fails on AIX
Date: Fri, 31 Aug 2012 16:53:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120327 Thunderbird/10.0.3

On 08/29/2012 11:18 AM, Brice Goglin wrote:
> Hello,
> I cannot get ltdl to load plugins on AIX 6.1. I am compiling plugins
> with -module -avoid-version. libtool generates a ".so" but then embeds
> it inside a ".a" and it looks like it really wants me to use this ".a"
> since the ".so" doesn't even get installed.
> When lt_dlopen tries to open the plugins (tried dlopen with an extension
> and dlopenext without extension), it fails saying "file not found". The
> raw dlopen doesn't want to load the .a file because of a "bad magic number".
> dlopen succeeds if I use "foo.a(" as a file name instead of
> "foo.a", and if I add RTLD_MEMBER to the flags. But I don't see any
> reference to RTLD_MEMBER in libltdl, so I assume I am not building the
> plugins correctly.

Yep, AIX support in libtool is far from ideal.

As indicated by Perry, during the AIX port of Gentoo Prefix, besides making
ltdl more flexible in where/how to load shared objects from, I've grown up a
working solution for filename-based shared library versioning - known as the
"soname" feature in ELF/Linux world, as well as ltdl

As it applies to libgcc_s too, I've outlined this already in

To keep static linking possible, this should be done with runtime-linking 
enabled only.

On the other hand, projects using libtool usually aren't designed just for AIX,
but mainly for platforms that cannot disable runtime-linking at all ...

However, the libtool (and ltdl) patches for that still aren't ready for 
but I plan to resume working on that... (can't promise anything unfortunately).

Anyway, I've rebased them to current master these days, made them working again,
and pushed to github:

Use 'configure --enable-aix-soname' to see how it works, although bootstrapping
is a little tricky at the moment, it doesn't work with current gnulib...

Other open issues:
* The "--enable-aix-soname=compat" mode isn't implemented yet.
* If that compat mode actually is necessary at all.
* If the name "aix-soname" and the values "no,compat,yes" are the best choice.
* If it is possible to get rid of doing different things upon -brtl in LDFLAGS.
* Outstanding tests with xlc and xlC (we do have gcc only here).
* ...


reply via email to

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