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

musikcube 3.0.2_1 crashing on startup #170629

Open
4 tasks done
booi opened this issue May 2, 2024 · 7 comments
Open
4 tasks done

musikcube 3.0.2_1 crashing on startup #170629

booi opened this issue May 2, 2024 · 7 comments
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@booi
Copy link
Contributor

booi commented May 2, 2024

brew gist-logs <formula> link OR brew config AND brew doctor output

> brew config                                                                                              HOMEBREW_VERSION: 4.2.20
ORIGIN: https://github.com/Homebrew/brew
HEAD: c2ed3327c605c3e738359c9807b8f4cd6fec09eb
Last commit: 4 days ago
Core tap JSON: 02 May 17:00 UTC
Core cask tap JSON: 02 May 17:00 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vim
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
 CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.45.0 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.4.1-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.3
Rosetta 2: false

> brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  python-jinja
  python-pyparsing
  python-click
  python-pbr
  python-attrs
  python-sympy
  python-platformdirs
  python-mpmath
  python-distlib
  python-filelock
  python-networkx
  python-mutagen
  python-brotli
  python-markupsafe

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  openssl@1.1

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Run musikcube

What happened (include all command output)?

Crashed on startup

> musikcube
[1]    26623 abort      musikcube

What did you expect to happen?

Should run without crashing. Installing the previous version does work. I believe the following commit has either incorrectly built bottles possibly?

a3c88a9

> brew uninstall musikcube
Uninstalling /opt/homebrew/Cellar/musikcube/3.0.2_1... (81 files, 11.3MB)

> wget "https://raw.githubusercontent.com/Homebrew/homebrew-core/3905387c0909a37e6099fe99979243e376d36257/Formula/m/musikcube.rb"
--2024-05-02 10:07:49--  https://raw.githubusercontent.com/Homebrew/homebrew-core/3905387c0909a37e6099fe99979243e376d36257/Formula/m/musikcube.rb
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2014 (2.0K) [text/plain]
Saving to: ‘musikcube.rb’

musikcube.rb                   100%[=================================================>]   1.97K  --.-KB/s    in 0s      

2024-05-02 10:07:49 (14.9 MB/s) - ‘musikcube.rb’ saved [2014/2014]


> brew install --build-from-source musikcube.rb
Error: Failed to load cask: musikcube.rb
Cask 'musikcube' is unreadable: wrong constant name #<Class:0x0000000107617530>
Warning: Treating musikcube.rb as a formula.
==> Fetching musikcube
==> Downloading https://github.com/clangen/musikcube/archive/refs/tags/3.0.2.tar.gz
==> Downloading from https://codeload.github.com/clangen/musikcube/tar.gz/refs/tags/3.0.2
    # -=O#-   #      #                                                                                                  
==> cmake -S . -B build
==> cmake --build build
==> cmake --install build
==> Downloading https://formulae.brew.sh/api/cask.jws.json

🍺  /opt/homebrew/Cellar/musikcube/3.0.2_1: 81 files, 10.9MB, built in 53 seconds
==> Running `brew cleanup musikcube`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/booi/Library/Caches/Homebrew/musikcube--3.0.2.tar.gz... (4.6MB)

> musikcube (success!)

Step-by-step reproduction instructions (by running brew commands)

> brew install musikcube
==> Downloading https://ghcr.io/v2/homebrew/core/musikcube/manifests/3.0.2_1
Already downloaded: /Users/booi/Library/Caches/Homebrew/downloads/20299fe98dd7e679c052e24c93c373f114bd590f99e79eeda9b86cc8e36b26d3--musikcube-3.0.2_1.bottle_manifest.json
==> Fetching musikcube
==> Downloading https://ghcr.io/v2/homebrew/core/musikcube/blobs/sha256:973c9e44a3834eff19673fe4aa85a46edeccd856f8d384368
Already downloaded: /Users/booi/Library/Caches/Homebrew/downloads/1c73b472e26c358faeaacaee4bd4ae1fe534ae040e139bbdf849ae43df39b802--musikcube--3.0.2_1.arm64_sonoma.bottle.tar.gz
==> Pouring musikcube--3.0.2_1.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/musikcube/3.0.2_1: 81 files, 11.3MB
==> Running `brew cleanup musikcube`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

> musikcube                                                                                                
[1]    26623 abort      musikcube
@booi booi added the bug Reproducible Homebrew/homebrew-core bug label May 2, 2024
@booi
Copy link
Contributor Author

booi commented May 2, 2024

cc @ZhongRuoyu if you have any insight as the committer of a3c88a9

@SMillerDev
Copy link
Member

Did you try reporting this upstream?

@booi
Copy link
Contributor Author

booi commented May 2, 2024

Did you try reporting this upstream?

There hasn't been any commits to the upstream repo for > 5 months, I assume this is some sort of bottle/build issue vs. an upstream issue.

@SMillerDev
Copy link
Member

Sounds more likely that there is some dependency that was updated and now it doesn't work anymore. Which means it'll slowly break for everyone. Upstream is the best place to help identify the issue. We might be able to work around it here, but without upstream I doubt it'll be fixed

@booi
Copy link
Contributor Author

booi commented May 2, 2024

Sounds more likely that there is some dependency that was updated and now it doesn't work anymore. Which means it'll slowly break for everyone. Upstream is the best place to help identify the issue. We might be able to work around it here, but without upstream I doubt it'll be fixed

argh ok. I'll try building from source this weekend see if i can isolate the issue and open something upstream. but i'll be honest, C++ build issues isn't exactly my strong point.

@cho-m
Copy link
Member

cho-m commented May 14, 2024

From quick glance, issue seems to be from ncurses bump.

Partly a side-effect of musikcube statically linking to ncurses on macOS and partly due to fragile brew ncurses static lib.

It looks like libncursesw.a records /opt/homebrew/Cellar/ncurses/X.Y/share/terminfo, which means the path breaks on updates:

strings /opt/homebrew/opt/ncurses/lib/libncursesw.a | rg Cellar/ -B1 -A1
TERMINFO
/opt/homebrew/Cellar/ncurses/6.5/share/terminfo
HOME

As workaround, manually overriding path via TERMINFO=/opt/homebrew/opt/ncurses/share/terminfo musikcube should behave as expected


Rebuilding bottle will temporarily fix the issue, but it will break again on next ncurses (e.g. 6.6)

Building with dynamic linkage will probably help as it doesn't burn Cellar path into musikcube binary. May want to request upstream support here as they are forcing static linkage https://github.com/clangen/musikcube/blob/3.0.2/src/musikcube/CMakeLists.txt#L107-L109

        message(STATUS "[ncurses] detected Darwin, linking statically")
        set(CURSES_LIBRARY_NAME "lib${CURSES_LIBRARY_NAME}.a")
        set(PANEL_LIBRARY_NAME "lib${PANEL_LIBRARY_NAME}.a")

Also, brew ncurses may need a fix for static lib and musikcube may need a test for TUI.

@carlocab
Copy link
Member

This might work, but testing it will be annoying:

diff --git a/Formula/n/ncurses.rb b/Formula/n/ncurses.rb
index d593662e900..9218c0bf80e 100644
--- a/Formula/n/ncurses.rb
+++ b/Formula/n/ncurses.rb
@@ -44,7 +44,11 @@ class Ncurses < Formula
       "--with-gpm=no",
       "--without-ada",
     ]
-    args << "--with-terminfo-dirs=#{share}/terminfo:/etc/terminfo:/lib/terminfo:/usr/share/terminfo" if OS.linux?
+    args << if OS.mac?
+      "--with-terminfo-dirs=#{opt_share}"
+    else
+      "--with-terminfo-dirs=#{opt_share}/terminfo:/etc/terminfo:/lib/terminfo:/usr/share/terminfo"
+    end
 
     system "./configure", *args
     system "make", "install"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

No branches or pull requests

4 participants