bsdgames-osx
bsdgames-osx copied to clipboard
Fails to install on 10.14 Mojave
After adding the tap, I get an error:
❯ brew tap ctdk/ctdk
==> Tapping ctdk/ctdk
Cloning into '/usr/local/Homebrew/Library/Taps/ctdk/homebrew-ctdk'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 7 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
Tapped 3 formulae (35 files, 35.7KB).
❯ brew install bsdgames-osx
==> Installing bsdgames-osx from ctdk/ctdk
==> Installing dependencies for ctdk/ctdk/bsdgames-osx: bsdmake
==> Installing ctdk/ctdk/bsdgames-osx dependency: bsdmake
==> Downloading https://homebrew.bintray.com/bottles/bsdmake-24.mojave.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring bsdmake-24.mojave.bottle.1.tar.gz
🍺 /usr/local/Cellar/bsdmake/24: 32 files, 244.3KB
==> Installing ctdk/ctdk/bsdgames-osx
==> Downloading https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz
==> Downloading from https://codeload.github.com/ctdk/bsdgames-osx/tar.gz/bsdgames-osx-2.19.3
######################################################################## 100.0%
Error: An exception occurred within a child process:
NoMethodError: undefined method `j1' for #<Object:0x00007ff7f08b5b10>
Any idea where:
NoMethodError: undefined method `j1' for #<Object:0x00007ff7f08b5b10>
might be coming from? 🤔
I assume it's coming from here: https://github.com/ctdk/homebrew-ctdk/blob/master/bsdgames-osx.rb#L16
Gah, I missed the notification on this issue when you first posted it. This is by no means the first time that a new MacOS release (either the OS itself or XCode) has broken building bsdgames-osx
. I'll get one of my Macs upgraded to Mojave and check out that PR you made in homebrew-ctdk
.
Thanks for bringing this to my attention; I'm always pretty cautious about doing upgrades of MacOS, so it may have been a while before I noticed this.
There is another one issue with 10.14, even after replacing ENV.j1
with ENV.deparallelize
:
$ brew install bsdgames-osx
==> Installing bsdgames-osx from ctdk/ctdk
==> Installing dependencies for ctdk/ctdk/bsdgames-osx: bsdmake
==> Installing ctdk/ctdk/bsdgames-osx dependency: bsdmake
==> Downloading https://homebrew.bintray.com/bottles/bsdmake-24.mojave.bottle.1.tar.
######################################################################## 100.0%
==> Pouring bsdmake-24.mojave.bottle.1.tar.gz
🍺 /usr/local/Cellar/bsdmake/24: 32 files, 244.3KB
==> Installing ctdk/ctdk/bsdgames-osx
==> Downloading https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar
==> Downloading from https://codeload.github.com/ctdk/bsdgames-osx/tar.gz/bsdgames-o
######################################################################## 100.0%
==> CFLAGS="-std=c11" bsdmake PREFIX=/usr/local/Cellar/bsdgames-osx/2.19.3 VARDIR=/u
==> bsdmake install PREFIX=/usr/local/Cellar/bsdgames-osx/2.19.3 VARDIR=/usr/local/v
Last 15 lines from /Users/vkhromov/Library/Logs/Homebrew/bsdgames-osx/02.bsdmake:
install
PREFIX=/usr/local/Cellar/bsdgames-osx/2.19.3
VARDIR=/usr/local/var/games
===> adventure (install)
mkdir -p /usr/local/Cellar/bsdgames-osx/2.19.3/bin
mkdir -p /usr/local/Cellar/bsdgames-osx/2.19.3/share/man/man6
install -s -o vkhromov -g staff -m 755 adventure /usr/local/Cellar/bsdgames-osx/2.19.3/bin
install: /usr/local/Cellar/bsdgames-osx/2.19.3/bin/adventure: chown/chgrp: Operation not permitted
*** Error code 71
Stop in /private/tmp/bsdgames-osx-20181227-29954-wf4uwi/bsdgames-osx-bsdgames-osx-2.19.3/adventure.
*** Error code 1
Stop in /private/tmp/bsdgames-osx-20181227-29954-wf4uwi/bsdgames-osx-bsdgames-osx-2.19.3.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/ctdk/homebrew-ctdk/issues
That's probably because the file already has admin
as the owner group, while install
tries to change that to staff
:
$ ls -ld /usr/local/Cellar/bsdgames-osx/2.19.3/
drwxr-xr-x 2 vkhromov admin 64 27 Dec 10:18 /usr/local/Cellar/bsdgames-osx/2.19.3/
I successfully used the following workaround
diff --git a/bsdgames-osx.rb b/bsdgames-osx.rb
index 99d15d7..32a49e0 100644
--- a/bsdgames-osx.rb
+++ b/bsdgames-osx.rb
@@ -22,6 +22,11 @@ class BsdgamesOsx < Formula
ENV["LIBOWN"] = user
ENV["MANOWN"] = user
ENV["SHAREOWN"] = user
+ grp = "admin"
+ ENV["BINGRP"] = grp
+ ENV["LIBGRP"] = grp
+ ENV["MANGRP"] = grp
+ ENV["SHAREGRP"] = grp
system "bsdmake", "install", "PREFIX=#{prefix}", "VARDIR=#{var}/games"
end
, not sure how to fix the issue properly though.