[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ltdl sillyness
From: |
Peter O'Gorman |
Subject: |
ltdl sillyness |
Date: |
Wed, 12 Oct 2005 22:58:29 +0900 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Macintosh/20050317) |
Hi,
I just spent the last several hours trying to find out why a package was not
building for me on Tru64 4.0. Turns out to have been a ltdl bug or two. I
was hitting a libltdl assert (assertion dirname) and when I figured out why,
I patched ltdl to check that dir was set before calling
tryall_dlopen_module. This done, I got a much more useful error message and
discovered that libltdl was not loading any files in dependency_libs that
were specified -Lpath -lfoo.
Okay to apply to branch-1-5 and forward port?
Peter
Index: ChangeLog
2005-10-12 Peter O'Gorman <address@hidden>
* libltdl/ltdl.c (find_module): Check that dir is set.
(load_deplibs): Don't free the user search paths too early.
from Gary V. Vaughan <address@hidden>
Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.174.2.19
diff -u -3 -p -u -r1.174.2.19 ltdl.c
--- libltdl/ltdl.c 14 Sep 2005 16:08:13 -0000 1.174.2.19
+++ libltdl/ltdl.c 12 Oct 2005 13:53:21 -0000
@@ -2553,8 +2553,8 @@ find_module (handle, dir, libdir, dlname
/* maybe it was moved to another directory */
{
- if (tryall_dlopen_module (handle,
- (const char *) 0, dir, dlname) == 0)
+ if (dir && (tryall_dlopen_module (handle,
+ (const char *) 0, dir, dlname) == 0))
return 0;
}
}
@@ -2881,12 +2881,6 @@ load_deplibs (handle, deplibs)
}
}
- /* restore the old search path */
- LT_DLFREE (user_search_path);
- user_search_path = save_search_path;
-
- LT_DLMUTEX_UNLOCK ();
-
if (!depcount)
{
errors = 0;
@@ -2973,6 +2967,13 @@ load_deplibs (handle, deplibs)
cleanup:
LT_DLFREE (names);
+ /* restore the old search path */
+ if (user_search_path) {
+ LT_DLFREE (user_search_path);
+ user_search_path = save_search_path;
+ }
+ LT_DLMUTEX_UNLOCK ();
+
#endif
return errors;
- ltdl sillyness,
Peter O'Gorman <=