Code Monkey home page Code Monkey logo

Comments (7)

cho-m avatar cho-m commented on May 25, 2024 3

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.

from homebrew-core.

booi avatar booi commented on May 25, 2024

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

from homebrew-core.

SMillerDev avatar SMillerDev commented on May 25, 2024

Did you try reporting this upstream?

from homebrew-core.

booi avatar booi commented on May 25, 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.

from homebrew-core.

SMillerDev avatar SMillerDev commented on May 25, 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

from homebrew-core.

booi avatar booi commented on May 25, 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.

from homebrew-core.

carlocab avatar carlocab commented on May 25, 2024

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"

from homebrew-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.