custom DLL cannot be loaded no matter what

Questions about Wine on Linux
Locked
b2402401
Level 1
Level 1
Posts: 7
Joined: Sun Nov 09, 2014 3:19 pm

custom DLL cannot be loaded no matter what

Post by b2402401 »

This is the exact problem I'm facing. I tried using a custom DLL, put it in my app directory / system32 / syswow64 directory, changed DLL overrides, even used a custom Wine build, but no matter what, the DLL I'm trying to replace still is the one that came with my distro's Wine build. What's even more strange, I removed it completely from my system32 directory, used "export WINEDEBUG=-all,+loaddll" and it clearly shows that somehow the library is loaded from my system32 directory ! What else could I do except using "make install" for the custom Wine build ?
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: custom DLL cannot be loaded no matter what

Post by dimesio »

So you have a distro Wine package installed, and have also built Wine from source with a hacked version of one of the dlls, but when running from the build directory Wine is still using the installed dlls from the distro package? Is that correct? How exactly did you run Wine from the build directory (post the exact command)?

Also, what dll is this? There are some dlls that cannot be set to native.

FYI, the dlls in system32 installed by Wine are fake; the real dll.so files are in /usr/lib/wine and /usr/lib64/wine (on an rpm-based system; Debian-based systems are somewhat different).
b2402401
Level 1
Level 1
Posts: 7
Joined: Sun Nov 09, 2014 3:19 pm

Re: custom DLL cannot be loaded no matter what

Post by b2402401 »

Forgot to mention that I'm using version 1.6.2.
So you have a distro Wine package installed, and have also built Wine from source with a hacked version of one of the dlls, but when running from the build directory Wine is still using the installed dlls from the distro package? Is that correct?
Most likely, yes. If there is a way to diagnose it, I don't know how.
How exactly did you run Wine from the build directory
WINEPREFIX=~/test ~/.local/share/wine/wine-1.6.2-custom/wine64 app.exe

Running 'wine' instead of 'wine64' gives me this error:
wine: could not find the Wine loader in /home/user/.local/share/wine/wine-1.6.2-custom
Also, what dll is this?
wined3d.dll
I suppose there is a way to use my hacked version since I was able to do this on a 32 bit OS with invoking the command: <path>/wine app.exe.
It seems that for my Ubuntu-based distro the DLL paths are: /usr/lib/i386-linux-gnu/wine/ and /usr/lib/x86_64-linux-gnu/wine/. I tried replacing wined3d.dll.so located in these, but all I got was that the application didn't even want to launch.
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: custom DLL cannot be loaded no matter what

Post by dimesio »

b2402401 wrote: Running 'wine' instead of 'wine64' gives me this error:
wine: could not find the Wine loader in /home/user/.local/share/wine/wine-1.6.2-custom
Sounds like you may have built only 64 bit Wine, which is an unsupported configuration. You need a proper WoW64 setup.
http://wiki.winehq.org/Wine64
http://wiki.winehq.org/BuildingBiarchWineOnUbuntu

Or, if you don't have any 64 bit Windows apps you need to run, you could just build 32 bit Wine on 64 bit.
http://wiki.winehq.org/WineOn64bit
b2402401
Level 1
Level 1
Posts: 7
Joined: Sun Nov 09, 2014 3:19 pm

Re: custom DLL cannot be loaded no matter what

Post by b2402401 »

The application required only a 32 bit environment.
http://wiki.winehq.org/WineOn64bit - the lxc method worked perfectly, now the app runs my custom wined3d.dll. Thank you for the advice. But nevertheless, I'll ask - is there a way to make it read a custom wined3d.dll without using a whole custom Wine build ?
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: custom DLL cannot be loaded no matter what

Post by dimesio »

You can try replacing the 32 bit dll.so file with the 32 bit one you've created. If it works, you will have to redo that every time you upgrade your Wine package. It could also break your installed Wine. It may be easier to just keep the custom build and run from that, especially if this is the only app that needs that hacked dll.
Locked