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

Import formulae from homebrew/games (take two). #9753

Closed
wants to merge 10 commits into from
Closed

Import formulae from homebrew/games (take two). #9753

wants to merge 10 commits into from

Conversation

MikeMcQuaid
Copy link
Member

Try to import the formulae that failed to build on Sierra in #9685.

@mistydemeo @tomyun I'll leave this open for about a week after which things that still can't build with Clang on Sierra will be deleted from homebrew/games rather than imported.

@tomyun I'll give you write access to my fork and @mistydemeo should already have it.

@mistydemeo
Copy link
Contributor

@mistydemeo @tomyun I'll leave this open for about a week after which things that still can't build with Clang on Sierra will be deleted from homebrew/games rather than imported.

As mentioned in the previous PR, I've been at a conference and haven't had a chance to look before now - mind making it a week today (18th AEST)?

@mistydemeo
Copy link
Contributor

Raine itself isn't failing; what's failing is sdl_image --universal, because we removed webp's universal option in 2e69f2c.

@mistydemeo
Copy link
Contributor

mistydemeo commented Feb 11, 2017

openmsx fails due to clang crashing, which is an Apple/clang bug rather than an openmsx bug:

Compiling video/scalers/ScalerFactory.cc...
clang: error: unable to execute command: Floating point exception: 8
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/HQ3xScaler-9b2370.cpp
clang: note: diagnostic msg: /tmp/HQ3xScaler-9b2370.sh
clang: note: diagnostic msg: 

********************

Submitted as rdar://30475877.

@mistydemeo
Copy link
Contributor

The arx-libertatis bug appears to have already been fixed upstream: arx/ArxLibertatis@39fb9a0

@ilovezfs
Copy link
Contributor

ilovezfs commented Feb 11, 2017

@mistydemeo right ... but still would need an old CMake to build (or more patch(es) from HEAD), and even then once it built, it failed to launch in my 10.12 vm (could be because it's a vm, but I didn't investigate further given the CMake trouble).

@mistydemeo
Copy link
Contributor

HEAD launches fine for me, after some testing; I think it likely only fails to launch in a VM.

@ilovezfs
Copy link
Contributor

Neat! I wonder if they'd be willing to make a new tag.

@ilovezfs
Copy link
Contributor

Raine itself isn't failing; what's failing is sdl_image --universal, because we removed webp's universal option in 2e69f2c.

That's a show stopper since we're removing all 32-bit and universal options, except the ones used by wine, and those will also be removed as soon as they've all been vendored into the wine formula.

@mistydemeo
Copy link
Contributor

That's a show stopper since we're removing all 32-bit and universal options, except the ones used by wine, and those will also be removed as soon as they've all been vendored into the wine formula.

My understanding is that key portions of Raine are written in 32-bit ASM, and it can't be built as 64-bit at all.

@MikeMcQuaid
Copy link
Member Author

@mistydemeo We can always remove and re-add these so would rather if we stuck to a week here so the tap migration process can continue. Sounds like there's at least a few (if not all remaining) that we're not going to be able to realistically get fixed by next week so delete and re-add is probably their best bet.

@ilovezfs
Copy link
Contributor

openmsx fails due to clang crashing, which is an Apple/clang bug rather than an openmsx bug:

it compiles with ENV.O0

@mistydemeo
Copy link
Contributor

it compiles with ENV.O0

Sounds like a good workaround.

@MikeMcQuaid Do you want me to add commits to this branch, or submit a PR against the branch?

We can always remove and re-add these so would rather if we stuck to a week here so the tap migration process can continue.

A week is fine, I'd just rather it's a week from when I started looking at it!

@mistydemeo
Copy link
Contributor

Pushed a few changes:

  • arx-libertatis: fix stable build by backporting a few changes
  • arx-libertatis: add HEAD
  • openmsx: use -O0 to work around clang bug


# Version parsing is broken in the current stable; fixed upstream.
# This hardcodes the current version based on data from VERSION.
inreplace "src/core/Version.cpp.in" do |s|
Copy link
Contributor

Choose a reason for hiding this comment

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

These version issues are what using the old CMake addressed, but hard-coding them temporarily instead of vendoring the "correct" CMake seems fine to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, given that this will be fixed in the next stable version, I think some minimal hardcoding is probably best.

@@ -25,6 +25,23 @@ class ArxLibertatis < Formula
def install
args = std_cmake_args

# The patches for these aren't straightforward to backport because of
# other changes; these minimal inreplaces get it building.
# HEAD is fine, and the next stable release will contain these changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

The last stable release was in 2013. It would be good to get some kind of commitment out of upstream to at least create a new tag at some point soon.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. Development is clearly very active, but with four years between releases I would really like to see another.

Copy link
Contributor

Choose a reason for hiding this comment

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

Mind creating "Can haz tag plz?" issue so we can at least track where they stand on this?

@@ -21,6 +21,10 @@ class Openmsx < Formula
end

def install
# Fixes a clang crash; this is an LLVM/Apple bug, not an openmsx bug
# https://github.com/Homebrew/homebrew-core/pull/9753
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe also add the rdar://30475877 reference?

@mistydemeo
Copy link
Contributor

simutrans is failing because of QTKit:

sound/core-audio_sound.mm:12:9: fatal error: 'QTKit/QTMovie.h' file not found
#import <QTKit/QTMovie.h>
        ^

@ilovezfs
Copy link
Contributor

simutrans is failing because of QTKit:

Indeed. So the best we could is an or_later bottle, but I think it's probably best to nix the formula.

@mistydemeo
Copy link
Contributor

The two files using QTKit are very small - I'll see if I can work up a patch to port to AVFoundation.

@ilovezfs
Copy link
Contributor

The two files using QTKit are very small - I'll see if I can work up a patch to port to AVFoundation.

👍

@ilovezfs
Copy link
Contributor

@mistydemeo note it's also the same situation for magnetix:

In file included from /tmp/magnetix-20170211-88069-107zbbw/magnetiX_src/MXFSTableView.m:36:
In file included from /tmp/magnetix-20170211-88069-107zbbw/magnetiX_src/MXFSController.h:36:
/tmp/magnetix-20170211-88069-107zbbw/magnetiX_src/MagneticController.h:36:9: fatal error: 
      'QTKit/QTMovie.h' file not found
#import <QTKit/QTMovie.h>
        ^
1 error generated.

@mistydemeo
Copy link
Contributor

I guess this means I have to install Xcode. :(

@mistydemeo
Copy link
Contributor

Simutrans patch finished, and posted here: http://forum.simutrans.com/index.php?topic=16675.new#new

@ilovezfs
Copy link
Contributor

Nice work!

@mistydemeo
Copy link
Contributor

Ported magnetiX - branch here: https://github.com/mistydemeo/magnetiX/tree/avfoundation I've emailed the developer with the patch.

@ilovezfs
Copy link
Contributor

Nice!

So looks like raine will be the only casualty?

@mistydemeo
Copy link
Contributor

With Raine, if we're not willing to accept a version with vendored dependencies, I'll migrate it into my own tap with those changes.

@ilovezfs
Copy link
Contributor

The analytics show only 13 installs of raine since July, so I'm not sure it's worth the effort, but that's up to you.

@mistydemeo
Copy link
Contributor

It's a nice bit of emulation history. Raine was a big deal in the late 90s! I'm willing to put in the effort for a little nostalgia.

# Port audio code from QTKit to AVFoundation
# Required since 10.12 SDK no longer includes QTKit.
# Submitted by email to the developer.
patch do
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably should scope this to if DevelopmentTools.clang_build_version >= 800, no?

Copy link
Contributor

@mistydemeo mistydemeo Feb 12, 2017

Choose a reason for hiding this comment

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

Given it's a major patch, I'd rather not end up shipping two different versions of the audio code - would make support easier if we're only supporting one version.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mistydemeo as you may have guessed, I'm just anticipating what @MikeMcQuaid will/would/may say here hehe

# Port Mac audio code from QTKit to AVFoundation
# Required since 10.12 SDK no longer includes QTKit.
# Submitted upstream: http://forum.simutrans.com/index.php?topic=16675.0
patch do
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@MikeMcQuaid
Copy link
Member Author

Wow, great work @mistydemeo and @ilovezfs 💖

With Raine, if we're not willing to accept a version with vendored dependencies

@mistydemeo I'd be happy to accept the version with vendored dependencies 👍 . I don't have a problem with formulae using universal internally if they need it, just the proliferation of universal options/builds.

@mistydemeo
Copy link
Contributor

Pushed an update. The vendored dependencies all work at this point, but raine itself is having a little trouble finding them.

Formula/raine.rb Outdated
end

args = configure_args(r.name)
args << "--prefix=#{libexec}"
Copy link
Contributor

Choose a reason for hiding this comment

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

can they not be built statically instead and installed only in the buildpath?

Copy link
Contributor

Choose a reason for hiding this comment

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

I gave it a shot, but SDL_image isn't building: https://gist.github.com/fc4f62f12ad00ae68333b4e8c5db6fb0

Formula/raine.rb Outdated
ENV.prepend "PATH", "#{libexec}/bin", File::PATH_SEPARATOR
ENV.append_to_cflags "-I#{libexec}/include"
ENV.append "LDFLAGS", "-L#{libexec}/lib"
ENV.prepend "PKG_CONFIG_PATH", "#{libexec}/lib/pkgconfig", File::PATH_SEPARATOR
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems highly unusual. Do we have a brew bug?

Copy link
Contributor

Choose a reason for hiding this comment

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

ENV.prepend_path and ENV.append_path silently do nothing if the passed directory doesn't exist, which it won't yet in this circumstance. I could also have used prepend_create_path instead of forcing the prepend.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please either use ENV.prepend_create_path or defer calling ENV.prepend_path until the directory actually exists.

@MikeMcQuaid
Copy link
Member Author

mind making it a week today (18th AEST)?

This has rolled by and given it's still not building and wouldn't pass our notability requirements for a new formula I think it's worth punting on this. Still pretty good that all but one of the homebrew/games formulae has made it in, though.

@mistydemeo
Copy link
Contributor

Sorry for not commenting. I've pushed a working build for a dynamically-built Raine, and I'm 95% to a statically-built one. I'm testing a build now.

@mistydemeo
Copy link
Contributor

Pushed a static formula.

@mistydemeo
Copy link
Contributor

The only thing broken is linking against the system libbIp2.

@mistydemeo
Copy link
Contributor

Build works. I'll update the audit warnings.

Wrt notability, Raine has been around since the 90s; the move to GitHub is a recent one.

@mistydemeo mistydemeo closed this Feb 18, 2017
@mistydemeo
Copy link
Contributor

Merged!

@ilovezfs
Copy link
Contributor

🎊

@MikeMcQuaid MikeMcQuaid deleted the homebrew-games-import-two branch February 19, 2017 16:12
@MikeMcQuaid
Copy link
Member Author

Nice work both of you 🎉!

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants