How do you build this correctly?
philipwilk opened this issue ยท 12 comments
Hi, I'm trying to build locally from master, but I'm not getting a usable binary out the other end. As I'm using Fedora, I've used arch containers to build everything, which makes it much easier than using a vm ๐
These are the steps I've taken when building:
- Clone the master branch
- Install dependencies for glibc
- Built glibc
- Installed the custom glibc and other wine dependencies (all of them)
- Built wine and export it
I've taken the binaries from wine-lol*-x86_64.pkg/opt/wine-lol and put them into lutris' wine runners folder so I can select them from within lutris, but some stuff is missing compared to wine-lol-5.5-2x86+64 (shipped with the lutris install of lol).
I think it has something to do with only building 32 bit stuff because wine64 is missing from wine-lol/bin, but I don't know how to fix this in the pkgbuild.
The Dockerfile I used to compile is in my fork, so anyone can try compile using it.
All you need to do to compile using it is clone the master with the Dockerfile in the root directory, then build it by running
docker build . -t wine-lol (this will take a while as it's actually building).
Then run the image you created a moment ago with a directory mounted for it to export wine to by doing
docker run -v /directory/to/export/to:/wine-exports wine-lol (this should only take a moment because it's already built)
After you run those two commands, /directory/to/export/to will have a package in it with what was just built.
Edit note:
Also, FORTIFY_SOURCE seems to redefine the same repos and links so many times it isn't even funny how much time it could be wasting.
At first: Fedora is no supported platform. I just completely failed to find out how this "RPM" nightmare works. At least for me this package format is the worst of all I've seen so far. So if you have any experience with this, I would really be happy if you would find a way to create some RPM build instructions to repackage the Arch package to RPM.
Next to your mistakes.
-
You can't place wine-lol to "anywhere". Have a look where the Arch package would place it. Place it to this exact location. And also place wine-lol-glibc to this location! This is not just for building! Wine-lol has a hard dependency to wine-lol-glibc and will crash if it is not at the exact same location as defined while building wine-lol. So your build steps most probably were fine. You just missed to extract both packages to the correct location.
Note: If you extract the packages, most probably it is enough to only extract the stuff below /opt. I have one config file which goes to /etc but there is a good chance that this does not fit into any distribution but Arch. At least for Debian based distributions I decided to better leave it out. -
About wine64*: My wine-lol build is a 32 bit wine build only! That's enough as LoL has no 64 bit components and I don't want to waste time for building and hard drive space just for components that will never be used for anything.
So I need to install wine-lol-glibc on my computer as well for this build of wine-lol to work? Wine-lol wants to be in /opt/wine-lol, so where do I put the contents of the glibc package, /opt/wine-lol/wine-lol or just /opt/wine-lol?
(the folder with wine-lol-glibc in the package is just called wine-lol as well)
Just exactly how the Arch packages are organized.
I can't find how the arch packages are organised that's why I'm asking ๐
I only found wine-lol because it's referenced as /opt/wine-lol, but not glibc?
/opt/wine-lol is the "unique prefix" for everything "wine-lol related".
In theory you can extract both Arch packages to "/" and you should have a working setup.
Ok, to get it working with lutris, I've put opt/wine-lol/. from both wine-lol and wine-lol-glibc into wine-lol in /opt/wine-lol and ~/.local/share/lutris/runners/wine/wine-lol, which lets you select it from lutris as a runner and it works fine.
I'm gonna take a look at making the build portable so putting it into the lutris wine runners folders just works, because having to put it into /opt with root/sudo feels like unecessary elevation of perms.
It is needed as this is the only way to have a separate glibc. You can configure this as runner in Lutris without adding a copy of the whole wine stuff.
If lutris-lol manges to do it then there has got to be some way of doing it
Closed because I got this built in the end
If lutris-lol manges to do it then there has got to be some way of doing it
They don't have to deal with a patched glibc version. That's the difference in my solution. As I don't want to change the system glibc in any way (after all that's one of the most important system libraries), I place my own one with the required patch and make wine build against it. This causes some absolute paths to my glibc binaries to be compiled into the wine binaries. So there is no way to place this to "somewhere where Lutris would like to have it". It has to be at the exact location that was configured at compile time or the wine binaries will not use the patched glibc.
But IMHO this is a small disadvantage compared to changing a system setting globally which influences all 32 bit applications and not just LoL.
I forgot to mention: If you really want to spend more time into this it would be more useful if you find a way to repackage to RPM properly.
