Eu tento executar um programa do windows, que depende de um .dll, que não está no diretório atual nem no diretório do programa. A documentação menciona que a variável "WINEDLLPATH" é usada para dar uma dica sobre onde procurar por bibliotecas. Mas não consigo executar o programa mesmo quando esta variável está definida:
/home/rudi/foobar $ WINEDLLPATH=/opt/qt/win32/qt/5.6/mingw49_32/bin/ strace -o /tmp/cc1.log /opt/qt/win32/qt/Tools/mingw492_32/libexec/gcc/i686-w64-mingw32/4.9.2/cc1.exe --help
fixme:winediag:start_process Wine Staging 1.9.12 is a testing version containing experimental patches.
fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
err:module:import_dll Library libwinpthread-1.dll (which is needed by L"Z:\opt\qt\win32\qt\Tools\mingw492_32\libexec\gcc\i686-w64-mingw32\4.9.2\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\opt\qt\win32\qt\Tools\mingw492_32\libexec\gcc\i686-w64-mingw32\4.9.2\cc1.exe" failed, status c0000135
/home/rudi/foobar $ grep libwinpthread-1.dll /tmp/cc1.log
stat64("/home/rudi/.wine/dosdevices/z:/opt/qt/win32/qt/Tools/mingw492_32/libexec/gcc/i686-w64-mingw32/4.9.2/libwinpthread-1.dll", 0xffcdf99c) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/z:/opt/qt/win32/qt/Tools/mingw492_32/libexec/gcc/i686-w64-mingw32/4.9.2/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/z:/home/rudi/foobar/libwinpthread-1.dll", 0xffcdf99c) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/z:/home/rudi/foobar/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/syswow64/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/system/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/syswow64/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
stat64("/home/rudi/.wine/dosdevices/c:/windows/syswow64/wbem/libwinpthread-1.dll", 0xffcdf694) = -1 ENOENT (No such file or directory)
open("/lib/wine/libwinpthread-1.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/wine/libwinpthread-1.dll.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/opt/qt/win32/qt/5.6/mingw49_32/bin//libwinpthread-1.dll.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/qt/win32/qt/5.6/mingw49_32/bin//libwinpthread-1.dll.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
A parte irritante são as duas últimas linhas. Wine tenta abrir /opt/qt/win32/qt/5.6/mingw49_32/bin//libwinpthread-1.dll.so
, que seria o arquivo correto, se não houvesse o sufixo .so
.
Existe uma maneira de convencer o vinho a considerar os arquivos .dll em /opt/qt/win32/qt/5.6/mingw49_32/bin/
da mesma forma que trata os arquivos de $ PWD ou o diretório do programa?