Retroarch: Configure script: --disable-rgui broken

Created on 5 Jan 2019  Â·  11Comments  Â·  Source: libretro/RetroArch

When passing --disable-rgui to the configure script, compilation fails on driver.c:

CC driver.c
driver.c: In function ‘driver_adjust_system_rates’:
driver.c:249:7: warning: implicit declaration of function ‘command_event’; did you mean ‘roundevenl’? [-Wimplicit-function-declaration]
command_event(CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE, NULL);
^~~~~
roundevenl
driver.c:249:21: error: ‘CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE’ undeclared (first use in this function)
command_event(CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE, NULL);
^~~~~~~~~
driver.c:249:21: note: each undeclared identifier is reported only once for each function it appears in
driver.c: In function ‘driver_update_system_av_info’:
driver.c:297:18: error: ‘CMD_EVENT_REINIT’ undeclared (first use in this function); did you mean ‘HID_SET_REPORT’?
command_event(CMD_EVENT_REINIT, NULL);
^~~~
HID_SET_REPORT
driver.c:306:21: error: ‘CMD_EVENT_RECORD_DEINIT’ undeclared (first use in this function)
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
^~~~~~~
driver.c:307:21: error: ‘CMD_EVENT_RECORD_INIT’ undeclared (first use in this function)
command_event(CMD_EVENT_RECORD_INIT, NULL);
^~~~~
make: * [Makefile:200: obj-unix/release/driver.o] Error 1

This issue is being posted in response to an earlier IRC discussion about compiling an extremely lean build of RetroArch. If more details are necessary, please inform me.

minor qb

Most helpful comment

I'll patch it up.

All 11 comments

@rdanbrook I think this has been broken a long time and that a lot of RA depends on rgui...

@orbea In that case, perhaps the option needs to be removed or re-engineered. What I am trying to accomplish is the leanest possible build. Ideally, a build that is purely CLI. That may or may not fit into the project goal; if not then this option should probably be removed.

I think it should be fixed, but easier said than done...

I know twinaphex is interested in getting it working again, and the codebase is littered with conditionals for it, so it'd probably be more trouble to remove it than to fix it lol

@rdanbrook I got it to work here, see PR https://github.com/libretro/RetroArch/pull/7902.

It was easier than expected...

Immediately was broken again...

retroarch.c: In function ‘runloop_check_state’:
retroarch.c:2911:7: error: ‘seq’ undeclared (first use in this function)
       seq = 0;
       ^~~
retroarch.c:2911:7: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:200: obj-unix/release/retroarch.o] Error 1
make: *** Waiting for unfinished jobs....

I'll patch it up.

First bad commit.

bbfbefa9dd7d2175abc2c5d50874b0f578132d0a is the first bad commit
commit bbfbefa9dd7d2175abc2c5d50874b0f578132d0a
Author: Brad Parker <[email protected]>
Date:   Sat Jan 5 18:33:29 2019 -0500

    easter egg

:100644 100644 4ec5d8990fc1871b1beaf0e4ee546c269e2c19c2 16e902f2591e704f607f15606158a25f0ac8f24c M  Makefile.common
:100644 100644 98ec4f48ca4f4690e147ec9bc91354c33f39ff48 bba02947fa76e4b50ff59384970dcc113adeb5b5 M  Makefile.griffin
:100644 100644 e8933de6bdb88cc7f492998ec552ac08770b9b4a 40b2d8b16ed346c6072ceca472db32ea06169df9 M  core_type.h
:040000 040000 92ce5da905fec5e3ea99584eb3faf3b36636eedc 4972cac83e26e001be86884fe71d5499a43150d3 M  cores
:100644 100644 cbe706c79a345b1da51e80d0c8eabb69de9e4c16 c7c3ce52c9468bd945ab37c59cb5652bcf8ddd90 M  dynamic.c
:040000 040000 33af4d5d1c2e0f5f86e50d97bf3541affefe9653 0fb6c2039e89ccd41251654240d300ccd6982675 M  griffin
:040000 040000 47158115198de571b24f21e0c1dd85bac673358d 062b220368ca0a7c205cdfa1a07d6b0e1df79b4d M  menu
:100644 100644 a9e7e7e5b2ac0f23e9c7fefdb04ee4fad778fb53 2a629e0a096d59413d3966dce679f685dd86b840 M  msg_hash.c
:100644 100644 8d52407ba183c14b0a41b0ce6193c068874d71dc bdd5a4a8b0bc60a7c8db1825880906427e9a0741 M  msg_hash.h
:100644 100644 67a71840c2b3019212d9e7efe55cf5a23e29ddf4 cb41f93438b81d3dd62bed5038b02207eb9a1e68 M  paths.c
:100644 100644 fd8e0659efb4a60267c3f4993a1da35c335dd704 15c49fa51195df60edb9f6b8d205b4daadb0d059 M  paths.h
:040000 040000 ea2bdb7d747817e3e99d45ecb97a4e444a5ae93d 761711a39318dce56f99a65ab885e9ba7f2e9def M  qb
:100644 100644 6892dfbfd3a9a7b520f6faae664583c235ad4693 73593f4e4aa1051dcb8b92d9565881db743b3ee1 M  retroarch.c

bbfbefa9dd7d2175abc2c5d50874b0f578132d0a

Pushed a buildfix - let me know if things are alright again on your end -

https://github.com/libretro/RetroArch/commit/2686cf1498fa653424e7b049ba481b64c28d8c1f

Yes, thanks! Its fixed here, just one minor thing left.

retroarch.c: In function ‘runloop_check_state’:
retroarch.c:2593:20: warning: variable ‘seq’ set but not used [-Wunused-but-set-variable]
    static uint64_t seq              = 0;
                    ^~~

That variable is only used with HAVE_MENU.

This would fix the warning and build failure.

diff --git a/retroarch.c b/retroarch.c
index b723647ee6..85008892c8 100644
--- a/retroarch.c
+++ b/retroarch.c
@@ -2590,10 +2590,10 @@ static enum runloop_state runloop_check_state(
    bool focused                     = true;
    bool pause_nonactive             = settings->bools.pause_nonactive;
    bool fs_toggle_triggered         = false;
-   static uint64_t seq              = 0;
 #ifdef HAVE_MENU
    bool menu_driver_binding_state   = menu_driver_is_binding_state();
    bool menu_is_alive               = menu_driver_is_alive();
+   static uint64_t seq              = 0;
 #endif

 #ifdef HAVE_LIBNX
@@ -2807,6 +2807,7 @@ static enum runloop_state runloop_check_state(
          action                    = (enum menu_action)menu_event(&current_input, &trigger_input);
          focused                   = pause_nonactive ? is_focused : true;
          focused                   = focused && !ui_companion_is_on_foreground();
+         seq                       = 0;

          iter.action               = action;

@@ -2907,12 +2908,8 @@ static enum runloop_state runloop_check_state(
    }
    else
 #endif
-   {
-      seq = 0;
-
       if (runloop_idle)
          return RUNLOOP_STATE_SLEEP;
-   }

    /* Check game focus toggle */
    {

However I am not sure what this easter egg does so I haven't tested it beyond building.

@twinaphex and / or @bparker06 How does it look to you?

Was this page helpful?
0 / 5 - 0 ratings