October 3rd, 2016: Unable to compile vlc-git

*nix specific usage questions
andrew46
Blank Cone
Blank Cone
Posts: 60
Joined: 01 Jun 2009 11:36
Operating System: Linux

October 3rd, 2016: Unable to compile vlc-git

Postby andrew46 » 03 Oct 2016 08:13

I have been unable to compile vlc git against FFmpeg 3.1.3 with the following error message:

Code: Select all

CCLD libmad_plugin.la CCLD libugly_resampler_plugin.la CCLD libspeex_resampler_plugin.la /home/andrew/vlc_build/vlcdeps/usr/lib/libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_free': /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:861: undefined reference to `XCloseDisplay' /home/andrew/vlc_build/vlcdeps/usr/lib/libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_create': /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:891: undefined reference to `XOpenDisplay' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:896: undefined reference to `vaGetDisplay' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:903: undefined reference to `XDisplayName' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:893: undefined reference to `XDisplayName' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:917: undefined reference to `vaGetDisplayDRM' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:891: undefined reference to `XOpenDisplay' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:893: undefined reference to `XDisplayName' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vaapi.c:898: undefined reference to `XDisplayName' /home/andrew/vlc_build/vlcdeps/usr/lib/libavutil.a(hwcontext_vdpau.o): In function `vdpau_device_create': /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vdpau.c:431: undefined reference to `XOpenDisplay' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vdpau.c:437: undefined reference to `XDisplayString' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vdpau.c:439: undefined reference to `XDefaultScreen' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vdpau.c:439: undefined reference to `vdp_device_create_x11' /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vdpau.c:433: undefined reference to `XDisplayName' /home/andrew/vlc_build/vlcdeps/usr/lib/libavutil.a(hwcontext_vdpau.o): In function `vdpau_device_free': /home/andrew/vlc_build/ffmpeg-3.1.3/libavutil/hwcontext_vdpau.c:410: undefined reference to `XCloseDisplay' collect2: error: ld returned 1 exit status Makefile:10286: recipe for target 'libavio_plugin.la' failed make[4]: *** [libavio_plugin.la] Error 1 make[4]: *** Waiting for unfinished jobs.... make[4]: Leaving directory '/home/andrew/vlc_build/vlc/modules' Makefile:18719: recipe for target 'all-recursive' failed make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory '/home/andrew/vlc_build/vlc/modules' Makefile:8352: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/home/andrew/vlc_build/vlc/modules' Makefile:2283: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/andrew/vlc_build/vlc' Makefile:2168: recipe for target 'all' failed make: *** [all] Error 2 andrew@athens:~/vlc_build/vlc$
Same issue with FFmpeg directly from git. Thanks for looking at this issue...

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: October 3rd, 2016: Unable to compile vlc-git

Postby Rémi Denis-Courmont » 03 Oct 2016 17:51

This looks like a bug in your FFmpeg build(s).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andrew46
Blank Cone
Blank Cone
Posts: 60
Joined: 01 Jun 2009 11:36
Operating System: Linux

Re: October 3rd, 2016: Unable to compile vlc-git

Postby andrew46 » 06 Oct 2016 03:27

Thanks for looking at this issue Rémi. I have tried a few different versions of FFmpeg, different ./configure options etc with no success. It is odd as I have been successfully compiling the development version of vlc under Ubuntu for many years with no great issue.

Anyway I shall persevere, curious to know if anybody else is having this issue?

User avatar
nonzyro
Blank Cone
Blank Cone
Posts: 23
Joined: 27 Sep 2016 13:34
VLC version: 2.2.4
Operating System: Debian Linux
Contact:

Re: October 3rd, 2016: Unable to compile vlc-git

Postby nonzyro » 06 Oct 2016 19:11

I'm no expert, but...
undefined reference to `XCloseDisplay'
I would imagine that this is an #ifdef or #ifndef related problem, which would lead me to think, "Configuration problems."

Postulation:
The point of failure seems to point to Video Acceleration settings - as suggested by the first error in the Video Accel API function vaapi_device_free().
Now the output says XCloseDisplay() is "undefined". Well, most likely case is the header file is missing, or rather not #include 'd? Why? #if ... #include ... #elif ... #include...#endif ???
Perhaps there's a flag not set correctly??? This is a common cause of things not being "defined" because #ifdef/#ifndef will start a chain of missing header files.
It could be another configuration, but I'm sure whatever it it, this is video accel related.

Sorry I can't help much more, I'm just a hobbyist, but maybe that'll point you in the right direction.
64bit: Debian 8 / VLC 2.2.4 / 4GB RAM / i5 430M / 512MB VRAM / Radeon HD5470

One time Randy's mom grew her nails really long and then she got an iPhone, but she couldn't use it so she had to have her nails cut but they had to use a chainsaw and they accidentally cut off her fingers and they sowed them back on backwards by accident and now her hands look weird and that's my 400 character limit

andrew46
Blank Cone
Blank Cone
Posts: 60
Joined: 01 Jun 2009 11:36
Operating System: Linux

Re: October 3rd, 2016: Unable to compile vlc-git

Postby andrew46 » 08 Oct 2016 02:37

So I have read up on the FFmpeg build from contrib and modified my build options for FFmpeg. The whole build is based on this guide, which will explain some of the variables used:

http://www.andrews-corner.org/linux/ubuntu/vlc.html

And the whole FFmpeg section is now:

Code: Select all

sudo apt-get -y install libmp3lame-dev zlib1g-dev libgsm1-dev libopenjpeg-dev && \ cd $HOME/vlc_build && \ wget https://www.ffmpeg.org/releases/ffmpeg-3.1.3.tar.bz2 && \ tar xvf ffmpeg-3.1.3.tar.bz2 && cd ffmpeg-3.1.3 && \ if [ "$(uname -m)" = "x86_64" ]; then ARCHOPTS="--enable-pic" else ARCHOPTS="" fi && \ CPPFLAGS="-I$HOME/vlc_build/vlcdeps/usr/include" \ LDFLAGS="-L$HOME/vlc_build/vlcdeps/usr/lib" \ PKG_CONFIG_PATH="$HOME/vlc_build/vlcdeps/usr/lib/pkgconfig" \ ./configure --prefix=$HOME/vlc_build/vlcdeps/usr \ $ARCHOPTS \ --disable-doc \ --disable-encoder=vorbis \ --disable-decoder=opus \ --enable-libgsm \ --enable-libopenjpeg \ --disable-debug \ --disable-avdevice \ --disable-devices \ --disable-avfilter \ --disable-filters \ --disable-protocol=concat \ --disable-bsfs \ --disable-bzlib \ --disable-avresample \ --disable-swresample \ --disable-iconv \ --enable-libfdk-aac \ --enable-libx265 \ --enable-libmp3lame \ --enable-libvpx \ --disable-decoder=libvpx_vp8 \ --disable-decoder=libvpx_vp9 \ --target-os=linux \ --enable-static \ --disable-shared \ --enable-gpl \ --enable-nonfree && \ make -j 8 && make install-libs install-headers && make distclean
So now with a few small exceptions mimics the contrib build method but the same error message persists and vlc compile fail. Running this under Xenial Xerus from Ubuntu....

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: October 3rd, 2016: Unable to compile vlc-git

Postby Rémi Denis-Courmont » 08 Oct 2016 18:54

Still it seems that your libavutil pkg-config file is wrong, which would be a bug the FFmpeg build system.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andrew46
Blank Cone
Blank Cone
Posts: 60
Joined: 01 Jun 2009 11:36
Operating System: Linux

Re: October 3rd, 2016: Unable to compile vlc-git

Postby andrew46 » 09 Oct 2016 03:13

Thanks Rémi for pointing me in the right direction. For the moment I have added the extra links manually to libavutil.pc and this allows for a successful compile of the latest git. I will dig a little deeper into FFmpeg itself for the root cause of the problem...


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 5 guests