joshdholtz / wassup

Easily scriptable terminal dashboard
MIT License
75 stars 1 forks source link

Installing via `bundle install` failed due to curses #14

Open thorstenstark opened 8 months ago

thorstenstark commented 8 months ago

Trying to install wssup via bundle install fails due to an error with curses.

M1 MBP Ruby 3.0.0 (via rvm)

console output:

Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Using bundler 2.3.6
Using domain_name 0.6.20240107
Using http-accept 1.7.0
Using mime-types-data 3.2024.0305
Using netrc 0.11.0
Fetching curses 1.4.4
Using http-cookie 1.0.5
Using mime-types 3.5.2
Using rest-client 2.1.0
Installing curses 1.4.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/<username>/Developer/TBO/wassup/vendor/bundle/ruby/3.0.0/gems/curses-1.4.4/ext/curses
/Users/<username>/.rvm/rubies/ruby-3.0.0/bin/ruby -I /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r ./siteconf20240312-62407-o8xe1i.rb extconf.rb
checking for tgetent() in -ltinfow... no
checking for tgetent() in -ltinfo... no
checking for tgetent() in -ltermcap... yes
checking for ncursesw/curses.h... no
checking for ncurses.h... yes
checking for initscr() in -lncursesw... no
checking for initscr() in -lncurses... yes
header: ncurses.h
library: ncurses
checking for beep()... yes
checking for bkgd()... yes
checking for bkgdset()... yes
checking for curs_set()... yes
checking for deleteln()... yes
checking for doupdate()... yes
checking for flash()... yes
checking for getbkgd()... yes
checking for getnstr()... yes
checking for init()... no
checking for init in ncurses.h... no
checking for isendwin()... yes
checking for keyname()... yes
checking for keypad()... yes
checking for resizeterm()... yes
checking for scrl()... yes
checking for set()... no
checking for set in ncurses.h... no
checking for setscrreg()... yes
checking for ungetch()... yes
checking for addnwstr()... yes
checking for wattroff()... yes
checking for wattron()... yes
checking for wattrset()... yes
checking for wbkgd()... yes
checking for wbkgdset()... yes
checking for wdeleteln()... yes
checking for wgetnstr()... yes
checking for wresize()... yes
checking for wscrl()... yes
checking for wsetscrreg()... yes
checking for werase()... yes
checking for redrawwin()... yes
checking for waddnwstr()... yes
checking for mvderwin()... yes
checking for derwin()... yes
checking for touchwin()... yes
checking for untouchwin()... yes
checking for wtouchln()... yes
checking for is_linetouched()... yes
checking for is_wintouched()... yes
checking for def_prog_mode()... yes
checking for reset_prog_mode()... yes
checking for timeout()... yes
checking for wtimeout()... yes
checking for nodelay()... yes
checking for init_color()... yes
checking for wcolor_set()... yes
checking for use_default_colors()... yes
checking for assume_default_colors()... yes
checking for newpad()... yes
checking for unget_wch()... yes
checking for get_wch()... yes
checking for wget_wch()... yes
checking for PDC_get_key_modifiers()... no
checking for PDC_get_key_modifiers in ncurses.h... no
checking for convertible type of chtype... unsigned int
checking for _XOPEN_SOURCE_EXTENDED... yes
checking for ESCDELAY in ncurses.h... yes
checking for TABSIZE in ncurses.h... yes
checking for COLORS in ncurses.h... yes
checking for COLOR_PAIRS in ncurses.h... yes
checking for function curses_version in ncurses.h... yes
checking for variable curses_version in ncurses.h... no
checking for ncursesw/menu.h... no
checking for ncurses/menu.h... no
checking for curses/menu.h... no
checking for menu.h... yes
checking for new_menu() in -lmenuw... no
checking for new_menu() in -lmenu... yes
checking for ncursesw/form.h... no
checking for ncurses/form.h... no
checking for curses/form.h... no
checking for form.h... yes
checking for new_form() in -lformw... no
checking for new_form() in -lform... yes
checking for form_driver_w()... yes
checking for sizeof(WINDOW) is available... no
checking for sizeof(MEVENT) is available... yes
checking for sizeof(ITEM) is available... yes
checking for sizeof(MENU) is available... yes
checking for sizeof(FIELD) is available... yes
checking for sizeof(FORM) is available... yes
creating extconf.h
creating Makefile

current directory: /Users/<username>/Developer/TBO/wassup/vendor/bundle/ruby/3.0.0/gems/curses-1.4.4/ext/curses
make "DESTDIR=" clean

current directory: /Users/<username>/Developer/TBO/wassup/vendor/bundle/ruby/3.0.0/gems/curses-1.4.4/ext/curses
make "DESTDIR="
compiling curses.c
curses.c:5103:5: error: incompatible function pointer types passing 'VALUE (VALUE, VALUE)' (aka 'unsigned long (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
    rb_define_method(cItem, "opts", item_opts_m, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:287:135: note: expanded from macro 'rb_define_method'
#define rb_define_method(klass, mid, func, arity)           RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
                                                                                                                                      ^~~~~~
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:254:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \
                                                                       ^
curses.c:5124:5: error: incompatible function pointer types passing 'VALUE (VALUE, VALUE)' (aka 'unsigned long (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
    rb_define_method(cMenu, "fore", menu_get_fore, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:287:135: note: expanded from macro 'rb_define_method'
#define rb_define_method(klass, mid, func, arity)           RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
                                                                                                                                      ^~~~~~
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:254:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \
                                                                       ^
curses.c:5126:5: error: incompatible function pointer types passing 'VALUE (VALUE, VALUE)' (aka 'unsigned long (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
    rb_define_method(cMenu, "back", menu_get_back, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:287:135: note: expanded from macro 'rb_define_method'
#define rb_define_method(klass, mid, func, arity)           RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
                                                                                                                                      ^~~~~~
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:254:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \
                                                                       ^
curses.c:5130:5: error: incompatible function pointer types passing 'VALUE (VALUE, VALUE)' (aka 'unsigned long (unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
    rb_define_method(cMenu, "opts", menu_opts_m, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:287:135: note: expanded from macro 'rb_define_method'
#define rb_define_method(klass, mid, func, arity)           RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
                                                                                                                                      ^~~~~~
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/<username>/.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:254:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \
                                                                       ^
4 errors generated.
make: *** [curses.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/<username>/Developer/TBO/wassup/vendor/bundle/ruby/3.0.0/gems/curses-1.4.4 for inspection.
Results logged to /Users/<username>/Developer/TBO/wassup/vendor/bundle/ruby/3.0.0/extensions/arm64-darwin-21/3.0.0/curses-1.4.4/gem_make.out

  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:90:in `run'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:42:in `block in make'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:34:in `each'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:34:in `make'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:64:in `block in build'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tempfile.rb:317:in `open'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:156:in `build_extension'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `block in build_extensions'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:187:in `each'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:187:in `build_extensions'
  /Users/<username>/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/installer.rb:821:in `build_extensions'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/source/rubygems.rb:204:in `install'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/worker.rb:62:in `apply_func'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/worker.rb:54:in `loop'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/worker.rb:54:in `process_queue'
  /Users/<username>/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.6/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing curses (1.4.4), and Bundler cannot continue.

In Gemfile:
  wassup was resolved to 0.4.1, which depends on
    curse
thorstenstark commented 6 months ago

I found a solution for my problem: using bash instead of the default zsh solved my problem .