Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building RetroArch with menu disabled #16881

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

kwyxz
Copy link
Contributor

@kwyxz kwyxz commented Aug 15, 2024

Description

This will allow compiling a RetroArch build with the menu disabled, HOWEVER it still requires disabling QT and Achievements (ie. it won't build with just --disable-menu and also needs --disable-menu --disable-cheevos --disable-qt)

Normal builds that don't invoke --disable-menu should be unaffected.

Related Issues

Workaround but not definitive fix for : #16880

Reviewers

@Autechre64 @sonninnos

@kwyxz
Copy link
Contributor Author

kwyxz commented Aug 15, 2024

All right, I think I managed to re-add cheevos while disabling menus and QT.

@RobLoach
Copy link
Member

Getting some errors when passing in the flags you provided...

C 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

@kwyxz
Copy link
Contributor Author

kwyxz commented Aug 15, 2024

This is exactly the output of the bug in #16880. Are you sure you built off my commits?

@RobLoach
Copy link
Member

I thought I did. Maybe it failed when I did a gh co 16881. I'll try it again tomorrow. Thanks!

@gouchi
Copy link
Member

gouchi commented Aug 15, 2024

I tried with

git clone https://github.com/libretro/RetroArch.git
cd RetroArch
git fetch origin pull/16881/head:pr16881
git checkout pr16881
./configure --disable-menu --disable-cheevos --disable-qt && make -j$(nproc)

But I am getting this error using gcc version 14.2.1 20240805

CC tasks/task_pl_thumbnail_download.c
CC tasks/task_netplay_find_content.c
tasks/task_pl_thumbnail_download.c: In function 'task_push_pl_entry_thumbnail_download':
tasks/task_pl_thumbnail_download.c:898:7: error: implicit declaration of function 'runloop_msg_queue_push'; did you mean 'msg_queue_push'? [-Wimplicit-function-declaration]
  898 |       runloop_msg_queue_push(
      |       ^~~~~~~~~~~~~~~~~~~~~~
      |       msg_queue_push
make: *** [Makefile:207: obj-unix/release/tasks/task_pl_thumbnail_download.o] Error 1
make: *** Waiting for unfinished jobs....

N.B = Also, it will be needed to continue the work for this PR which need --disable-menu.

@RobLoach
Copy link
Member

Confirming that I was able to compile it, without running into the error gouchi mentioned above.

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

@kwyxz
Copy link
Contributor Author

kwyxz commented Aug 15, 2024

Confirming that I was able to compile it, without running into the error gouchi mentioned above.

I was starting to wonder if maybe I screwed up one of my commits... thank you for confirming it works!

Also @gouchi you should not need to disable cheevos now, I think I got that fixed. Still need to disable QT though.

@gouchi
Copy link
Member

gouchi commented Aug 15, 2024

Ok I confirm it is working with ./configure --disable-menu --disable-qt using gcc version 13.3.0 so the compilation issue I got was coming from gcc version 14.

Copy link
Member

@RobLoach RobLoach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the testing 👍

@LibretroAdmin LibretroAdmin merged commit 4016b25 into libretro:master Aug 15, 2024
27 checks passed
@kwyxz kwyxz deleted the disable_menu branch August 16, 2024 21:50
Sunderland93 pushed a commit to Sunderland93/RetroArch that referenced this pull request Dec 26, 2024
* allow building with --disable-menu --disable-cheevos --disable-qt --disable-slang

* allow building with cheevos while disabling menus and qt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants