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

Re: Wine MinGW system libraries



Le jeu. 9 sept. 2021 à 07:32, Paul Wise <pabs@debian.org> a écrit :
>
> On Thu, 2021-09-09 at 00:59 -0500, Zebediah Figura wrote:
>
> > Unfortunately, no. We have no way of knowing the caller.
>
> Can the PE loading mechanism do something like inject a fake dlopen
> function available only in the Wine namespace that just passes the Wine
> namespace to the dlmopen function? Or the same but for each library?

The problem is that windows apps particularly games try to check if
mapped ram exec pages are from dll from disk and not modified in
memory.

Thus if we create namespace, this crappy software will stop to work
except if we create or symlink a library with an unique name that the
wine applications could fetch

Note that windows use for libraryname only the basename not the
fullpatch (zebediah could you confirm)

I am proposing (for simplicity I call the problematic lib libpng that
depends on libz)
1. build like usual a libpng and libz. libpng depend on linbz
2. copy libpng to libwinepng and libz to libwinez
3 use a new patchpe command (like the patchelf command) to patch the
depend of libwinepng
So globally a post link time namespace (it will be better on debian
side than to recompile and pass flags to library).

You  propose:
1. build like usual a libpng and libz. libpng
2 create symlink libwinepng -> libpng, liwinez->libz
3. instruct the loader to load libwinepng privatly using namespace
approach and do at run time the patchpe work

I believe that your approach is technically superior but could be done
on the top of my first approach and a second step.

Zebediah could you please give use feedback from wine team ?

If patchpe is workable (and I firmly believe it is), you could add a
task to see if paul wise solution is workable and report here.

Next step, will be to refine your proposal. For instance i really
dislike the libpng libwinepng mapping I will prefer a mapping given as
perlre
and something that encode the wine ABI like s/^lib/lib-wineinternaluseABI1.0/g

It will allow to create pkgconfig file for wine version of lib automatically

Bastien
>
> --
> bye,
> pabs
>
> https://wiki.debian.org/PaulWise


Reply to: