Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mingw build environment #1182

Merged
merged 14 commits into from
Jan 1, 2025
Merged

Update mingw build environment #1182

merged 14 commits into from
Jan 1, 2025

Conversation

DanRStevens
Copy link
Collaborator

Part of:

Updates the Mingw build environment:

  • Bump image version number
  • Fix Dockerfile so it is buildable with current apt packages (software-properties-common)
  • Fix Docker image so it is usable locally (add user account)
  • Disable warnings when compiling glew
  • Fix deprecation warning when installing Wine apt repo
  • Make it easier to upgrade SDL and Glew dependencies
  • Update SDL dependencies
  • Update Wine package to one for Ubuntu 22.04 (matching the base image, instead of a 21.04 package)
  • Update to a newer version of Wine
  • Update CircleCI to build with new image

Note this PR falls short of updating the base image to Ubuntu 24.04, as there were problems with the update that still haven't been worked out. Still, the updates so far are good progress.

The older version is no longer installable with `apt`. That makes the Docker image no longer buildable without updating the version.
Normally when run locally, it will run with the UID of the current user. For a single user Ubuntu system, that will likely be with UID `1000`. That user will need a writeable Wine prefix folder, which is typically `~/.wine`. If a matching user does not exist, it may try to write to `/.wine`, which would only be writeable to `root`. By creating a local user, we provide a writeable space for this common case, and can also cache the output of `wineboot`, which reduces Wine startup time when running a build in the container.
Normally there is a copious amount of warning messages when compiling Glew, which obscure any other messages as the output quickly fills the entire console scrollback buffer. This makes it harder to check on previous jobs for warnings, and harder to check on compile options and normal output messages.

Perhaps the original project could use some work to reduce the large number of warning messages. That's not part of this project though.
This fixes the deprecation warning concerning `apt-key`. We avoid using `/etc/apt/trusted.gpg.d/` to store key info, since that folder is globally trusted for all `apt` repos. We only want the new key to work for the new `wine` repo.
This will make updates easier, as version numbers don't need to be pasted in multiple locations.
Note there is an SDL2 version `2.30.10` release, however the Mingw package for that release is broken:
- libsdl-org/SDL#11610
- libsdl-org/SDL#11795
It seems a non-exitent path got baked into the `sdl2-config` output, so the compiler tries looking in a folder that doesn't exist for SDL2 files.
Ubuntu 22.04 is `jammy`, whereas Ubuntu 21.04 is `impish`. When we prepared the Ubuntu 22.04 based image there were not yet up-to-date versions of Wine to go with it. Hence we installed a version for `impish` rather than `jammy`, as it seemed to be close enough.
This version of Wine requires an explicit `.exe` suffix on the executable names when opening them with `wine`. Without the suffix, loading fails with error `c0000135` (`STATUS_DLL_NOT_FOUND`), which is defined in `ntstatus.h`.

For details, see PR #1181.
Update Wine packages from those for `impish` (Ubuntu `21.04`) to those for `jammy` (Ubuntu `22.04`). This also requires an update to the Wine package versions. The earliest `jammy` release is `7.0.1`, and the most recent is `9.0.0.0`.
It seems this updated version works fine, though verion `9.0.0.0` seems to not run the unit test executable, and terminates without an error message. This looks to be the latest version without that problem.
Running `wineboot` creates an extra layer of about 400MB. Plus, on CircleCI the image runs as `root`, so we would need this cached for `root` rather than `user`. Additionally, switching to `user` and then back to `root` creates a Codacy warning. The warning is maybe a bit silly, but I suppose the `wineboot` layer caching is also a bit silly too.
@DanRStevens DanRStevens merged commit 613afd0 into main Jan 1, 2025
10 checks passed
@DanRStevens DanRStevens deleted the updateMingw branch January 1, 2025 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant