We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4405 - SDL2 compilation fails with --enable-video-directfb
Summary: SDL2 compilation fails with --enable-video-directfb
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.9
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-01 02:35 UTC by Gilberto
Modified: 2018-12-03 06:32 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gilberto 2018-12-01 02:35:12 UTC
Different errors from already reported bugs. Configured with --enable-video-directfb flag produces the following errors when running make:

/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c: In function 'DirectFB_CreateRenderer':
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:372:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'SetTextureAlphaMod'
     renderer->SetTextureAlphaMod = DirectFB_SetTextureAlphaMod;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:373:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'SetTextureColorMod'
     renderer->SetTextureColorMod = DirectFB_SetTextureColorMod;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:374:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'SetTextureBlendMode'; did you mean 'SupportsBlendMode'?
     renderer->SetTextureBlendMode = DirectFB_SetTextureBlendMode;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:377:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'RenderClear'; did you mean 'RenderPresent'?
     renderer->RenderClear = DirectFB_RenderClear;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:379:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'RenderDrawPoints'; did you mean 'QueueDrawPoints'?
     renderer->RenderDrawPoints = DirectFB_RenderDrawPoints;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:380:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'RenderDrawLines'; did you mean 'QueueDrawLines'?
     renderer->RenderDrawLines = DirectFB_RenderDrawLines;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:382:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'RenderFillRects'; did you mean 'QueueFillRects'?
     renderer->RenderFillRects = DirectFB_RenderFillRects;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:384:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'RenderCopy'; did you mean 'QueueCopy'?
     renderer->RenderCopy = DirectFB_RenderCopy;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:393:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'UpdateViewport'; did you mean 'UpdateTexture'?
     renderer->UpdateViewport = DirectFB_UpdateViewport;
             ^~
/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_render.c:394:13: error: 'SDL_Renderer {aka struct SDL_Renderer}' has no member named 'UpdateClipRect'
     renderer->UpdateClipRect = DirectFB_UpdateClipRect;
Comment 1 Gilberto 2018-12-01 02:37:11 UTC
Additional information (not sure if this is helpful): Latest change set is 12435:261716de5769
Comment 2 Ryan C. Gordon 2018-12-01 18:10:46 UTC
Ugh, I didn't realize there was a render backend in the video directory. I wonder how that happened.  :/

I'll take a look, and maybe also move it to the right place.

--ryan.
Comment 3 Ryan C. Gordon 2018-12-02 07:37:48 UTC
This is patched to compile again in https://hg.libsdl.org/SDL/rev/695bf801d4ba, but I don't know if it actually works. testsprite2 gets about 600 fps on this laptop with the directfb renderer now, but I don't get a window or anything; presumably it's on another virtual terminal writing to /dev/fb0 or something.

Please reopen this bug if you run into trouble with it.

--ryan.
Comment 4 Gilberto 2018-12-02 17:17:39 UTC
Hello again,

I got the following error:

/home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_video.c:327:7: error: 'DSPF_ABGR' undeclared here (not in a function)
     { DSPF_ABGR, SDL_PIXELFORMAT_ABGR8888 },            /* 32 bit ABGR (4  byte, alpha 8@24, blue 8@16, green 8@8, red 8@0) */

However, after commenting it out (I'm not aware of the implications of doing so), compilation ended with a single warning. I was able to make install, same for the tests and I successfully executed ./testdraw2 from tty1.

Thanks a lot Ryan.
Comment 5 Ozkan Sezer 2018-12-03 06:32:05 UTC
(In reply to Gilberto from comment #4)
> Hello again,
> 
> I got the following error:
> 
> /home/home_user/repos/SDL/src/video/directfb/SDL_DirectFB_video.c:327:7:
> error: 'DSPF_ABGR' undeclared here (not in a function)
>      { DSPF_ABGR, SDL_PIXELFORMAT_ABGR8888 },            /* 32 bit ABGR (4 
> byte, alpha 8@24, blue 8@16, green 8@8, red 8@0) */

AFAIK, DSPF_ABGR is added in directfb-1.5.0: make sure that you are
building against directfb >= 1.5.0 ??