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

Cross compiling on Ubuntu 16+ #1289

Open
rpspringuel opened this issue Feb 1, 2017 · 6 comments · Fixed by #1630
Open

Cross compiling on Ubuntu 16+ #1289

rpspringuel opened this issue Feb 1, 2017 · 6 comments · Fixed by #1630
Assignees

Comments

@rpspringuel
Copy link
Contributor

In preping the beta I've been trying to setup cross-compiling on my Ubuntu 16.04 VM and have discovered that the mingw32 port is not in the repositories for that version of Ubuntu. As a result, I can't build the Windows executable on that VM. There is a mingw-w64 port, which should be able to build both 32 and 64 bit executables, but it doesn't work with our build setup as currently structured, and I'm not in a position to figure out what changes are needed at the moment.

This doesn't present too big a problem for now, as I can simply switch to my Ubuntu 14.04 VM (where the mingw32 port is readily available) and build the executable there. However, in the long term we're probably going to have to look into switching the tool chain around for building the Windows executable.

@rpspringuel
Copy link
Contributor Author

In a similar vein, there is now a mingw-w64 cross compiler port for MacPorts, so ideally this update should allow for compilation of the Windows executable on both Mac and Linux.

Also, I found a page which shows a simple compiler selection script for mingw-w64:
https://sourceforge.net/p/mingw-w64/wiki2/UsingLinuxBinaries/

@henryso
Copy link
Contributor

henryso commented Feb 26, 2017

Does this mean we would no longer support win32-only systems? If so, do we care?

@rpspringuel
Copy link
Contributor Author

The mingw-w64 package contains both a 32 & 64 bit compiler.

@rpspringuel
Copy link
Contributor Author

The priority on this is now greatly increased as I'm having trouble getting my Ubuntu 14.04 VM to keep going.

rpspringuel added a commit to rpspringuel/gregorio that referenced this issue Feb 18, 2025
I don't know if this would solve gregorio-project#1289 on Linux machines, but at least on my Mac I can now build a windows executable and installer with this.
@rpspringuel rpspringuel linked a pull request Feb 20, 2025 that will close this issue
@eschwab
Copy link
Contributor

eschwab commented Feb 22, 2025

On an up-to-date Linux installation I can cross-compile for Windows. However using mingw-w64 it seems that it only supports 64bit. It might support 32bit, but that would require some more digging and testing. I think it is fine to drop building 32bit, since I presume that most users would be on 64bit boxes.

Or we could say that building on Linux for Win is 64bit only, and building on Mac for Win can do both. If I am looking at #1630 correctly, it appears that the Mac build is only targeting 32bit. It that correct?

@rpspringuel
Copy link
Contributor Author

To be honest, I wasn't trying for either, just to get it working. This was my first foray into getting cross-compiling working on my Mac and I'm working mostly by trial and error from examples found online, not any real understanding of what I'm doing.

Checking it now, it does seem that what I get is a 32bit executable. I suppose that I should be able to compile a 64bit executable too, but it would take some further fooling around to make it happen.

@eschwab eschwab self-assigned this Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants