RetroArch
RetroArch copied to clipboard
Current RetroArch cannot build with the menu disabled
Description
While troubleshooting a Haiku issue, I noticed that running ./configure --disable-menu
unfortunately does not allow RetroArch to build. This is not Haiku-specific and also happens on Linux (and I am assuming on most, if not all, archs)
Expected behavior
RetroArch should build, albeit with the menu disabled.
Actual behavior
CC retroarch.c
retroarch.c: In function ‘command_event’:
retroarch.c:4469:46: warning: implicit declaration of function ‘menu_state_get_ptr’; did you mean ‘uico_state_get_ptr’? [-Wimplicit-function-declaration]
4469 | struct menu_state *menu_st = menu_state_get_ptr();
| ^~~~~~~~~~~~~~~~~~
| uico_state_get_ptr
retroarch.c:4469:46: warning: initialization of ‘struct menu_state *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
retroarch.c:4528:26: error: invalid use of undefined type ‘struct menu_state’
4528 | menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH;
| ^~
retroarch.c:4528:54: error: ‘MENU_ST_FLAG_ENTRIES_NEED_REFRESH’ undeclared (first use in this function)
4528 | menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
retroarch.c:4528:54: note: each undeclared identifier is reported only once for each function it appears in
retroarch.c:4529:30: error: invalid use of undefined type ‘struct menu_state’
4529 | if (menu_st->driver_ctx->environ_cb)
| ^~
retroarch.c:4530:29: error: invalid use of undefined type ‘struct menu_state’
4530 | menu_st->driver_ctx->environ_cb(MENU_ENVIRON_RESET_HORIZONTAL_LIST,
| ^~
retroarch.c:4530:54: error: ‘MENU_ENVIRON_RESET_HORIZONTAL_LIST’ undeclared (first use in this function)
4530 | menu_st->driver_ctx->environ_cb(MENU_ENVIRON_RESET_HORIZONTAL_LIST,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
retroarch.c:4531:41: error: invalid use of undefined type ‘struct menu_state’
4531 | NULL, menu_st->userdata);
| ^~
make: *** [Makefile:209: obj-unix/release/retroarch.o] Error 1
Steps to reproduce the bug
- git clone the latest version of RA
-
./configure --disable-menu
-
make
Bisect Results
According to @sonninnos this was possibly introduced in 87b9d0328e0 but there are various errors at various stages.
I have a pull request ready (https://github.com/libretro/RetroArch/pull/16881) that will allow building with --disable-menu --disable-cheevos --disable-qt
but not --disable-menu
alone.
Version/Commit
- RetroArch: a759e601484c2202a6a3460b4dd5de708bb41821
Environment information
- OS: Debian GNU/Linux / Haiku
- Compiler: gcc 12.2.0 / gcc 13.3.0