Trying to install the gem as per documentation. Tried Rubies 3.3, 3.2, 3.1.
$ gem install curses -- --use-system-libraries --with-ncurses-dir=/opt/homebrew/opt/ncurses
Fetching curses-1.4.4.gem
Building native extensions with: '--use-system-libraries --with-ncurses-dir=/opt/homebrew/opt/ncurses'
This could take a while...
ERROR: Error installing curses:
ERROR: Failed to build gem native extension.
current directory: /Users/piotr/.gem/ruby/3.1.3/gems/curses-1.4.4/ext/curses
/Users/piotr/.rubies/ruby-3.1.3/bin/ruby -I /Users/piotr/.rubies/ruby-3.1.3/lib/ruby/3.1.0 extconf.rb --use-system-libraries --with-ncurses-dir\=/opt/homebrew/opt/ncurses
checking for tgetent() in -ltinfow... no
checking for tgetent() in -ltinfo... no
checking for tgetent() in -ltermcap... yes
checking for ncursesw/curses.h... yes
checking for initscr() in -lncursesw... yes
header: ncursesw/curses.h
library: ncursesw
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 ncursesw/curses.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 ncursesw/curses.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 ncursesw/curses.h... no
checking for convertible type of chtype... unsigned int
checking for _XOPEN_SOURCE_EXTENDED... yes
checking for ESCDELAY in ncursesw/curses.h... yes
checking for TABSIZE in ncursesw/curses.h... yes
checking for COLORS in ncursesw/curses.h... yes
checking for COLOR_PAIRS in ncursesw/curses.h... yes
checking for function curses_version in ncursesw/curses.h... yes
checking for variable curses_version in ncursesw/curses.h... no
checking for ncursesw/menu.h... yes
checking for new_menu() in -lmenuw... yes
checking for ncursesw/form.h... yes
checking for new_form() in -lformw... yes
checking for form_driver_w()... yes
checking for sizeof(WINDOW) is available... yes
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/piotr/.gem/ruby/3.1.3/gems/curses-1.4.4/ext/curses
make DESTDIR\= sitearchdir\=./.gem.20240313-99458-tl51wo sitelibdir\=./.gem.20240313-99458-tl51wo clean
current directory: /Users/piotr/.gem/ruby/3.1.3/gems/curses-1.4.4/ext/curses
make DESTDIR\= sitearchdir\=./.gem.20240313-99458-tl51wo sitelibdir\=./.gem.20240313-99458-tl51wo
compiling curses.c
curses.c:3072:1: warning: function 'no_item' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
curses.c:3270:1: warning: function 'no_menu' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
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/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.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/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.0/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.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/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.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/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.0/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.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/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.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/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.0/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.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/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.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/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.0/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/piotr/.rubies/ruby-3.1.3/include/ruby-3.1.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); \
^
2 warnings and 4 errors generated.
make: *** [curses.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/piotr/.gem/ruby/3.1.3/gems/curses-1.4.4 for inspection.
Results logged to /Users/piotr/.gem/ruby/3.1.3/extensions/arm64-darwin-22/3.1.0-static/curses-1.4.4/gem_make.out