summary refs log tree commit diff stats
path: root/results/scraper/box64/2359
blob: 588440068007657e82d52e11d7fb74ce4d8b1fff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Bundle more x86_64 and x86 libraries
I propose adding a small shell script to help obtain x86_64 and x86 library files.

_Why?_

1. There are [concerns](https://github.com/ptitSeb/box64/issues/1789) about where the x86_64 library files in the Box64 git repository are coming from (likewise for x86 library files in Box86).
2. There is no easy way to track those library versions and handle updates.
3. Some libraries are too complicated to wrap, have too many functions to wrap, or have simply not been wrapped due to limited time and resources.
4. Box32 has way less wrapped libraries. There are about 6x more libraries wrapped in Box64 compared to Box32.
5. Box86 can also benefit from the x86 libraries.

**Basically, the biggest benefit is that more applications and games will work. Users should not have to worry about searching for and setting up x86_64 and x86 library files.**

Here are some examples issues it could help:
    - https://github.com/ptitSeb/box64/issues/80
    - https://github.com/ptitSeb/box64/issues/187
    - https://github.com/ptitSeb/box64/issues/296
    - https://github.com/ptitSeb/box64/issues/375
    - https://github.com/ptitSeb/box64/issues/950
    - https://github.com/ptitSeb/box64/issues/1065
    - https://github.com/ptitSeb/box64/issues/1279
    - https://github.com/ptitSeb/box64/issues/1809
    - https://github.com/ptitSeb/box64/issues/2254
    - https://github.com/ptitSeb/box64/issues/2282

_How?_

We need to download and extract Linux packages to grab the library files. I was thinking of using AlmaLinux 9 (or any other Enterprise Linux [EL] distribution) due to it getting 10 years of updates with security backports. It’s also easy to take a x86_64 package name and find the equivalent x86 package automatically. I’ve found that there are some more obscure packages and we can source those from where ever they exist. We can create checksums for each package and library file to ensure consistency and authenticity. Once we package the library files into a new directory structure (/usr/lib/box64/libs-x86_64 and /usr/lib/box64/libs-x86 - or does something like this exist already?), we create a tarball, then upload that to a tagged GitHub release.

I've talked with Seb about creating an entire root file system (rootfs) / chroot. We decided against it because that can get really large really fast. For example, FEX uses a rootfs that is over 1 GiB in size. My proof-of-concept so far for bundling the library files is about 24 MiB.

_Potential Issues?_

- Although EL packages have 10 years of support, they provide the smallest amount of Linux packages and libraries compared to other Linux distributions.
    - In practice, I haven’t found this to be an issue so far.
- Some packages have overlapping files with other packages. We'll need to handle conflicts somehow.
- Some libraries are really hard to find. We need to grab them from obscure Linux distributions or archives. For example, I found an old package for backwards compatibility that was only packaged by Solus. There could possibly be compatibility issues by using libraries from different distributions.
    - From my limited testing with a few libraries from non-EL sources and everything else from EL, it seemed to work.
- Upstream Box64 packages for various Linux distributions will need to be updated to include these library files.
- Moving libraries out of the Box64 git repository would make it less of an out-of-the-box experience.
    - We could update the Makefile to automatically download the missing x86_64 and x86 libraries.

_Who?_

I have a proof-of-concept of this posted [here](https://winesapos.lukeshort.cloud/box64/) that I can expand upon. I've been using this with great success so far for making Box32 more functional on my X Elite laptop.
- _sources = All of the download packages are kept for preservation purposes. We could mirror these on box64.org or archive.org.
- lib32 = All of the extracted x86 libraries.
- lib64 = All of the extracted x86_64 libraries.
- box64-get-libs.sh = A simple script to extract packages.
    - Goals before merging include to (1) automatically populate the `/usr/lib/box64/libs-x86[_64]` directories, (2) create tarball releases for GitHub, (3) verify checksums, and (4) handle a simple CSV file full of packages to download.
- readme.txt = Notes about where the packages are coming from and some hints for finding x86_64 and x86 packages.

I’d love to get feedback from the wider Box64 team and community. Once we agree on a plan, I can create a draft PR.