You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building current version 1.14 (2c04d96) of petitboot in postmarketOS v23.12 / Alpine Linux 3.19, with ncurses 6.4_p20231125 and gcc 13.2.1_git20231014 fails with:
In file included from ui/ncurses/nc-cui.h:25,
from ui/ncurses/generic-main.c:41:
ui/ncurses/nc-menu.h: In function 'pmenu_dump_item':
ui/ncurses/nc-menu.h:129:47: error: invalid use of incomplete typedef 'ITEM' {aka 'const struct tagITEM'}
129 | pb_debug("%p %s\n", item, (item ? item->name.str : "(null)"));
| ^~
ui/ncurses/nc-menu.h: In function 'pmenu_dump_items':
ui/ncurses/nc-menu.h:138:45: error: invalid use of incomplete typedef 'ITEM' {aka 'struct tagITEM'}
138 | (items[i] ? items[i]->name.str : "(null)"));
| ^~
make[2]: *** [Makefile:5726: ui/ncurses/petitboot_nc-generic-main.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/pmos/build/src/petitboot-v1.13'
make[1]: *** [Makefile:5907: all-recursive] Error 1
make[1]: Leaving directory '/home/pmos/build/src/petitboot-v1.13'
make: *** [Makefile:2824: all] Error 2
Looking at ncurses menu.h:
typedefstructtagITEM#if !NCURSES_OPAQUE_MENU
{
TEXTname; /* name of menu item */TEXTdescription; /* description of item, optional in display */structtagMENU*imenu; /* Pointer to parent menu */void*userptr; /* Pointer to user defined per item data */Item_Optionsopt; /* Item options */shortindex; /* Item number if connected to a menu */shorty; /* y and x location of item in menu */shortx;
boolvalue; /* Selection value */structtagITEM*left; /* neighbor items */structtagITEM*right;
structtagITEM*up;
structtagITEM*down;
}
#endif/* !NCURSES_OPAQUE_MENU */ITEM;
So item_name() has to be used instead of item->name.str. Here is half a patch:
However then it fails in another place, where petitboot tries to write to items[i]->name.str. Apparently there is no setter function for it in ncurses and a new label would need to be created instead (?) - I didn't look into it in detail.
The text was updated successfully, but these errors were encountered:
Building current version 1.14 (2c04d96) of petitboot in postmarketOS v23.12 / Alpine Linux 3.19, with ncurses 6.4_p20231125 and gcc 13.2.1_git20231014 fails with:
Looking at ncurses
menu.h
:So
item_name()
has to be used instead ofitem->name.str
. Here is half a patch:However then it fails in another place, where petitboot tries to write to items[i]->name.str. Apparently there is no setter function for it in ncurses and a new label would need to be created instead (?) - I didn't look into it in detail.
The text was updated successfully, but these errors were encountered: