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

Build from source instructions #118

Open
john11abc opened this issue Dec 31, 2024 · 4 comments
Open

Build from source instructions #118

john11abc opened this issue Dec 31, 2024 · 4 comments

Comments

@john11abc
Copy link

Where are the scripts to build Wine for macOS from source? How can I build and package the latest Wine version for macOS?

@igelbox
Copy link

igelbox commented Jan 25, 2025

How can I build and package the latest Wine version for macOS?

I just successfully compiled wine-9.21 using https://gitlab.winehq.org/wine/wine/-/wikis/MacOS-Building
Had a trouble with [1] 89242 killed ./wine notepad but it seems the DYLD_FALLBACK_LIBRARY_PATH= hack solved this.

Dammit, actually I ran global wine instead of local ./wine, so the local one is still being killed (

However I'm still unable to compile with provided options. It seems some libraries are missing from my environment and probably some digging around macports would help. But I'm not experienced in macports at all. So agree:

The build instructions would be highly useful here.

@Gcenx
Copy link
Owner

Gcenx commented Jan 26, 2025

Don’t just blindly copy/paste the configure flags, those are provided so it’s known what is being used for the provided packages.

For macOS (10.15+) you only need to set --enable-archs=i386,x86_64

@igelbox
Copy link

igelbox commented Jan 27, 2025

Yeah, but it didn't build either way.

Well, finally I managed to build it for my M2. The [1] 89242 killed ./wine notepad error was related to the native arm64 architecture. It happens Wine doesn't support that and must be built via cross-compiler as x86_64 (and/or i386 but I don't have such cross-compiler installed yet). So I left the instructions in my README here igelbox/wine#2

Moreover I managed to integrate (see next commits in the same PR) reasonably fresh vkd3d (with fixed HLSL function overloading and more HLSL intrinsic functions). So I could replace wined3d.dll in CrossOver-24 and get many of <STALKER Anomaly with MO2 and lotsa mods> shader compilation errors fixed. However not all of them..

it's a damn double cross-compiling (windows on mac-x86 on mac-m2) but I need to go deeper
Image

@Gcenx
Copy link
Owner

Gcenx commented Jan 27, 2025

Oh you tried to build wine for x86_64 on Apple Silicon against arm64 brew dependence’s no wonder you had issues.

Wine can be built for arm64 but it’s useless currently on macOS.

You already have a cross compiler toolchain installed, Xcode uses llvm that’s a cross compiler toolchain. That’s how you were able to build wine for x86_64 from an x86_64 Terminal session.

It’s not very hard to cross compile wine, the problem is you also need dependencies of the correct architecture as well, forcing the terminal session for x86_64 and running an Intel brew install works as you’ve discovered (also how Apple did game-porting-toolkit)


And it looks like Julliard remembered to copy over the Winehq macOS compilation section, it might need some slight tweaks to account for Apple Silicon systems but most just use the official Winehq packages from here anyway so I’ve been lazy to update it anymore.

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

No branches or pull requests

3 participants