bug-libtool
[Top][All Lists]
Advanced

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

libltdl on AIX


From: Tom Epperly
Subject: libltdl on AIX
Date: Thu, 28 Aug 2008 11:44:50 -0700
User-agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724)

We just upgraded to a more recent version of libltdl on my project, and
the behavior for AIX seems to have changed. In the past, it seems to
have ignored the results of the LTDL_DLOPEN_SELF_WORKS
(AC_LIBTOOL_DLOPEN_SELF) test, and now when the test fails it forces a
lt_dlopen(NULL, ...) to fail.

In libtool-2.2.4/libltdl/loaders/dlopen.c, the following lines appear:

  /* On AIX, dlopen(NULL) succeeds but dlsym of symbols fails.
     In this case, fail here to let the preopen loader do the job. */
#ifndef LTDL_DLOPEN_SELF_WORKS
  if (!filename)
    module = NULL;
  else
#endif
    module = dlopen (filename, module_flags);

The comment in the code fragment above isn't completely correct.
dlopen(NULL) works just fine on AIX provided you use -Wl,-bexpall when
you link your executable. The configure macro that checks whether
dlopen(NULL) works doesn't use -Wl,-bexpall, so the test fails. Ideally,
the configure check would add -Wl,-bexpall when testing when
dlopen(NULL) works on AIX.

In past versions of libtool, the results from the test didn't matter
because it seems that libltdl went ahead and called dlopen(NULL) even if
configure didn't think it would work.  It would be better for us if
libltdl had the old behavior or if the configure script tried
-Wl,-bexpall because declaring that dlopen self doesn't work.

Regards,

Tom Epperly
Center for Applied Scientific Computing
Lawrence Livermore National Laboratory




reply via email to

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