After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765702 - build: errors when compiling without X11
build: errors when compiling without X11
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal minor
: 1.8.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-28 01:25 UTC by Li Jing
Modified: 2016-05-03 10:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: display: guard possible unused variables (928 bytes, patch)
2016-04-29 11:01 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
plugin: fix macro processor check (931 bytes, patch)
2016-04-29 11:13 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Li Jing 2016-04-28 01:25:42 UTC
I just want to only use drm, and no render is needed.
So ./configure --enable-glx=no --enable-drm=yes --enable-x11=no --enable-wayland=no --enable-egl=no, and there's no gstreamer-gl installed in the system either.

And will meet an compile error.

Also can check “tests/test-display.c”,  for the “display2, width, height, par_n, par_d” defined in main(), if we only have macro USE_DRM defined, these 5 parameters will never be used.
And the compiler will return a warning/error which stopped the build process.
Comment 1 Víctor Manuel Jáquez Leal 2016-04-28 09:40:16 UTC
Hi. 

Could you paste the compilation error?

It is not clear to me if the "unused variables" warning is the only one or if there are more.
Comment 2 Víctor Manuel Jáquez Leal 2016-04-28 09:41:39 UTC
And, another question, which version of gstreamer-vaapi are you trying to compile?
Comment 3 Li Jing 2016-04-29 02:33:43 UTC
I'm using the master branch, last commit is:
----------------
commit 018ea8b2fc193f64bcaf8f2a58e67d6a806dfce9
Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date:   Wed Apr 27 17:10:26 2016 +0300
----------------------

Steps:

1. ./configure --enable-x11=no --enable-egl=no --enable-glx=no --enable-wayland=no
2. make -j8. 
And you should have:
---------------------------------------------
test-display.c: In function 'main':
test-display.c:273:33: error: unused variable 'par_d' [-Werror=unused-variable]
     guint width, height, par_n, par_d;
                                 ^
test-display.c:273:26: error: unused variable 'par_n' [-Werror=unused-variable]
     guint width, height, par_n, par_d;
                          ^
test-display.c:273:18: error: unused variable 'height' [-Werror=unused-variable]
     guint width, height, par_n, par_d;
                  ^
test-display.c:273:11: error: unused variable 'width' [-Werror=unused-variable]
     guint width, height, par_n, par_d;
           ^
test-display.c:272:32: error: unused variable 'display2' [-Werror=unused-variable]
     GstVaapiDisplay *display, *display2;
                                ^
cc1: all warnings being treated as errors
------------------------------------------------------------

btw: if you don't have gl installed in the system(no gstreamer-gl too), even though I set enable-glx=no and enable-egl=no, it will still try to include a header file from gstreamer-gl
Comment 4 Víctor Manuel Jáquez Leal 2016-04-29 10:41:55 UTC
It seems you're not only disabling GLX and EGL, but X11 too: display2, width, height, par_n and par_d are used if X11 is enabled.
Comment 5 Víctor Manuel Jáquez Leal 2016-04-29 10:52:40 UTC
This fix would need to inforce the gstreamer code-style to all the tests directory.
Comment 6 Víctor Manuel Jáquez Leal 2016-04-29 11:01:25 UTC
Created attachment 327004 [details] [review]
tests: display: guard possible unused variables
Comment 7 Víctor Manuel Jáquez Leal 2016-04-29 11:13:20 UTC
Created attachment 327005 [details] [review]
plugin: fix macro processor check

Instead of #ifdef it should be used #if becasuse USE_GST_GL_HELPERS is always
defined in config.h, but it would be 0 or 1 depending on the configure output.
Comment 8 Víctor Manuel Jáquez Leal 2016-04-29 11:14:09 UTC
Li, please let me know if those patches work for you.
Comment 9 Li Jing 2016-05-03 05:18:09 UTC
hi Victor
It works for me now, thanks
Comment 10 Víctor Manuel Jáquez Leal 2016-05-03 10:12:00 UTC
Attachment 327004 [details] pushed as 3fcfd40 - tests: display: guard possible unused variables
Attachment 327005 [details] pushed as 4f30d28 - plugin: fix macro processor check