libwine: Use rpath-based install name and library references for libwine on Mac.

Ken Thomases ken at codeweavers.com
Fri Jan 11 22:01:54 CST 2013


On Jan 11, 2013, at 11:13 AM, Alexandre Julliard wrote:

> Ken Thomases <ken at codeweavers.com> writes:
> 
>> ---
>> configure.ac          |    3 ++-
>> libs/wine/Makefile.in |    6 +++---
>> 2 files changed, 5 insertions(+), 4 deletions(-)
> 
> It doesn't seem to work when installed:
> 
> wine: failed to initialize: dlopen(/usr/local/lib/wine/ntdll.dll.so, 258): image not found

It works for me on Mac OS X 10.6.8.  On which version of the OS were you testing?

I assume you did indeed build it with the prefix /usr/local and there is a /usr/local/lib/wine/ntdll.dll.so.  Is that right?

What output do you get from the following commands:

otool -L /usr/local/bin/wine
otool -L /usr/local/lib/wine/ntdll.dll.so
otool -lV /usr/local/bin/wine | grep -A3 RPATH

Finally, in the development that lead to this patch, I noticed that the quoted "failed to initialize" trace only reports the error from the last attempt to open ntdll.dll.so.  Can you hack libwine to trace the error from each failed attempt?  Something like:

diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index 302e9c1..bb5d8e6 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -830,6 +830,7 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
             if (default_dlldir[0] && context.index < nb_dll_paths + 2) nb_dll_paths--;
             break;
         }
+else fprintf(stderr, "%s: failed for %s: %s\n", __func__, path, error);
     }
     free_dll_path( &context );
 


-Ken




More information about the wine-devel mailing list