Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922695 - >=net-misc/freerdp-3.1.0[sdl] requires media-libs/libsdl2[haptic,joistick,video,...]
Summary: >=net-misc/freerdp-3.1.0[sdl] requires media-libs/libsdl2[haptic,joistick,vid...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-22 12:06 UTC by Eugene Shalygin
Modified: 2024-01-23 19:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2024-01-22 12:06:53 UTC
The code in sdl-freerdp callas SDL_Init(SDL_INIT_EVERYTHING), which fails when some features were disabled by the SDL configuration. 

The following change to the freerdp code makes it work with just the required set of SDL features: 

diff --git a/client/SDL/sdl_freerdp.cpp b/client/SDL/sdl_freerdp.cpp
index ea5545c5f4d2..2389140687b4 100644
--- a/client/SDL/sdl_freerdp.cpp
+++ b/client/SDL/sdl_freerdp.cpp
@@ -816,8 +816,13 @@ static int sdl_run(SdlContext* sdl)
      return -1;
  }
 
- SDL_Init(SDL_INIT_EVERYTHING);
- TTF_Init();
+ if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS)) {
+   WLog_Print(sdl->log, WLOG_ERROR, "SDL_Init() failed: %s", SDL_GetError());
+ }
+
+ if (TTF_Init()) {
+   WLog_Print(sdl->log, WLOG_ERROR, "TTF_Init() failed: %s", TTF_GetError());
+ }
 #if SDL_VERSION_ATLEAST(2, 0, 16)
  SDL_SetHint(SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED, "0");
 #endif

Otherwise, libsdl2 useflags need to be tuned with accordance to SDL_INIT_EVERYTHING. FreeRDP developers are aware of the error (https://github.com/FreeRDP/FreeRDP/issues/9789).

Reproducible: Always
Comment 1 Larry the Git Cow gentoo-dev 2024-01-23 19:10:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4e107b5768e51677d7b5f85dd823b17a10c47db

commit a4e107b5768e51677d7b5f85dd823b17a10c47db
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2024-01-23 19:08:04 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-01-23 19:10:32 +0000

    net-misc/freerdp: adjust SDL dep to require all features
    
    Closes: https://bugs.gentoo.org/922695
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 net-misc/freerdp/{freerdp-3.1.0.ebuild => freerdp-3.1.0-r1.ebuild} | 2 +-
 net-misc/freerdp/freerdp-9999.ebuild                               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)