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

Fix MinGW builds of Premake #1420

Merged
merged 4 commits into from
Apr 1, 2020
Merged

Fix MinGW builds of Premake #1420

merged 4 commits into from
Apr 1, 2020

Conversation

starkos
Copy link
Member

@starkos starkos commented Mar 30, 2020

What does this PR do?

Gets Premake's bootstrap makefile to work properly with MinGW (64-bit only). This is an attempt to resurrect PR #1111.

Closes #559.

# To build with bootstrap script
set CC=gcc
mingw32-make -f Bootstrap.mak mingw PLATFORM=x64

# To build with Premake
premake5 --cc=mingw gmake2
mingw32-make config=debug_x64

How does this PR change Premake's behavior?

A few additions were made to Premake to improve support for MinGW specifically. Those were added by @tdesveauxPKFX in #1111, I've maintained them as is.

Anything else we should know?

I've successfully built Premake using the 64-bit version of MinGW using these changes. I was not able to build with the 32-bit version, though that may have been a local setup issue; I didn't pursue it. Since, best I could tell, we aren't currently able to build with MinGW at all this seems like an incremental win.

I left @tdesveauxPKFX's commits intact so he would get some credit for the fix, since he did the bulk of the work on this one.

Two unit tests fail with the MinGW build:

  1. base_os.remove_ReturnsTrue_OnFile gets an "Access denied" error when it tries to delete a temporary file
  2. premake_binmodules.testExample fails with "module 'example' not found"

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass (minimal code changes)
  • Mention any related issues
  • Follow our coding conventions
  • Minimize the number of commits

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

@starkos starkos changed the title Fix/bootstrap mingw Fix MinGW builds of Premake Mar 30, 2020
Copy link
Member

@samsinsane samsinsane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, for what it's worth, it seems like AppVeyor has MinGW support, might be possible to have CI jobs for MinGW.

premake5.lua Show resolved Hide resolved
src/tools/mingw.lua Show resolved Hide resolved
tdesveaux and others added 4 commits March 31, 2020 16:19
`stat64i32` is undefined when building with mingw32
I'm not sure why this is still needed, since "version" has also been added to the `premake5.lua` config for Windows builds. But it's failing the CI builds, so restoring for now.
@starkos
Copy link
Member Author

starkos commented Mar 31, 2020

Rebased to master, waiting for checks to complete.

@starkos
Copy link
Member Author

starkos commented Mar 31, 2020

HTTP tests are failing with "Bad Gateway", but it varies which platform fails each time I run it. If I can't get a clean pass I may just merge.

@starkos starkos merged commit 9def08f into master Apr 1, 2020
@starkos starkos deleted the fix/bootstrap-mingw branch April 1, 2020 13:29
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.

Curl error with MinGW building
3 participants