it's so hard to compile vlc

*nix specific usage questions
mehdusa
New Cone
New Cone
Posts: 1
Joined: 23 Sep 2018 16:40

it's so hard to compile vlc

Postby mehdusa » 24 Sep 2018 01:44

hello everyone this is my first time here
i tried to compile vlc but i got some errors

Code: Select all

Linux archlinux 4.18.9-arch1-1-ARCH #1 SMP PREEMPT Wed Sep 19 21:19:17 UTC 2018 x86_64 GNU/Linux
i searched online but no solution

Code: Select all

codec/x264.c: In function ‘Open’: codec/x264.c:849:26: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’? const int mask = x264_bit_depth > 8 ? X264_CSP_HIGH_DEPTH : 0; ^~~~~~~~~~~~~~ x264_picture_t codec/x264.c:849:26: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [Makefile:22476: codec/libx264_plugin_la-x264.lo] Error 1 make[4]: Leaving directory '/home/mehdi/Downloads/vlc-3.0.4/modules' make[3]: *** [Makefile:26132: all-recursive] Error 1 make[3]: Leaving directory '/home/mehdi/Downloads/vlc-3.0.4/modules' make[2]: *** [Makefile:11236: all] Error 2 make[2]: Leaving directory '/home/mehdi/Downloads/vlc-3.0.4/modules' make[1]: *** [Makefile:1531: all-recursive] Error 1 make[1]: Leaving directory '/home/mehdi/Downloads/vlc-3.0.4' make: *** [Makefile:1416: all] Error 2
:? please help to resolve the problem :D

erythros
Blank Cone
Blank Cone
Posts: 19
Joined: 14 Nov 2007 14:16
VLC version: 3.0.4
Operating System: Linux
Contact:

Re: it's so hard to compile vlc

Postby erythros » 25 Sep 2018 21:07

If you are still having this issue:
  1. Where did you get your vlc source?
  2. What steps did take to compile?
    1. Provide each command line statement you made step by step to reach this point.
If you no longer have this issue, post your fix action.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: it's so hard to compile vlc

Postby unidan » 05 Oct 2018 22:11

Hi, as erythros said, it's difficult without information. But you can try the following after cleaning:

Code: Select all

cd vlc/ # Bootstrap VLC mkdir build-native cd build-native/ ../bootstrap # Build the tools you might not have (or not in the correct version) cd ../extras/tools/ make # Build the contribs in case you don't have every libraries on your system cd ../../contrib/ mkdir native/ cd native ../bootstrap make # Build VLC cd ../../build-native ../configure make

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: it's so hard to compile vlc

Postby InTheWings » 05 Oct 2018 22:33

build the CONTRIBS

and read instructions next time
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

ev01ve
New Cone
New Cone
Posts: 5
Joined: 13 Dec 2018 08:06

Re: it's so hard to compile vlc

Postby ev01ve » 13 Dec 2018 08:18

I agree that it's hard to compile...
Love the player and project! I'm new when it comes to compiling... But i have had no luck so far, just some progress. ;)
I also get to the same error when i tried compiling like the one who first posted. The exact same error.

Then i read here and tried that, and tried to use make, but i got:

CCLD libwebvtt_plugin.la
libtool: error: 'codec/webvtt/libwebvtt_plugin_la-CSSLexer.lo' is not a valid libtool object
make[4]: *** [Makefile:18860: libwebvtt_plugin.la] Error 1
make[4]: Leaving directory '/Downloads/vlc-3.0.4/build-native/modules'
make[3]: *** [Makefile:27359: all-recursive] Error 1
make[3]: Leaving directory '/Downloads/vlc-3.0.4/build-native/modules'
make[2]: *** [Makefile:12457: all] Error 2
make[2]: Leaving directory '/Downloads/vlc-3.0.4/build-native/modules'
make[1]: *** [Makefile:1533: all-recursive] Error 1
make[1]: Leaving directory '/Downloads/vlc-3.0.4/build-native'
make: *** [Makefile:1418: all] Error 2

What am i doing wrong? Thanks

edit: Does it have something to do with dolt compile? I read something about it in the code there, but i don't know what's the issue, i am no coder and a new linux user.
(I am not compiling it for "regular use", otherwise i would had installed VLC the normal way. But i need to learn to compile VLC for what i am trying to do. I appreciate some help compiling this project.)

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: it's so hard to compile vlc

Postby unidan » 13 Dec 2018 13:31

hi, Do you have flex / bison installed ?

ev01ve
New Cone
New Cone
Posts: 5
Joined: 13 Dec 2018 08:06

Re: it's so hard to compile vlc

Postby ev01ve » 13 Dec 2018 16:27

hi, Do you have flex / bison installed ?
Hi. Thanks for the answer. It looks like i have it installed in debian already.. When i use apt-get install flex (or bison) i already have the newest version it says. So yeah, it seems like it.
But i was thinking about the: libtool: error: 'codec/webvtt/libwebvtt_plugin_la-CSSLexer.lo' is not a valid libtool object

And in that file it says that another compiler like dolt compiler might have anything to do with it, but i'm not sure and far from sure. Just guessing. I might try to bootstrap it all again later on some other day and try to start from the beginning.
Are there any good tutorial or guide out there on how to compile in Debian? (I'm using a gcc wrapper atm, but it should work. I could try clang another time also i guess out of curiosity. I mostly want to be able to compile this correctly. That's why i am asking on here. Thanks for the help! ;)
p.s: If i try ./configure in the VLC folder i get the same error as the first post by the other user still when i try make. And when i try it in the build-native folder after i might have done everything correct with bootstrap i get the error i posted. Any good solution? I think i built the contribs, but i'm not sure if i managed that and if that might be the error. I'm new to this at the moment, but i think i managed the ./configure without errors, but MAKE did not work because i don't have the knowledge on compiling big projects like this yet.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: it's so hard to compile vlc

Postby unidan » 13 Dec 2018 16:59

You can try building the tools too.

Code: Select all

# cleanup everything (WARNING, it basically deletes everything not commited) git clean -fdx # build the needed tools cd extras/tools ./bootstrap && make # build the contribs cd ../../contribs && mkdir native && cd native ../bootstrap && make # build vlc cd ../../ && ./bootstrap && mkdir build-native && cd native && ../configure make
Feel free to add -jX options after make (where X is the number of process you want to spawn, making it your number of core is good) and add options to configure.

ev01ve
New Cone
New Cone
Posts: 5
Joined: 13 Dec 2018 08:06

Re: it's so hard to compile vlc

Postby ev01ve » 13 Dec 2018 17:10

You can try building the tools too.

Code: Select all

# cleanup everything (WARNING, it basically deletes everything not commited) git clean -fdx # build the needed tools cd extras/tools ./bootstrap && make # build the contribs cd ../../contribs && mkdir native && cd native ../bootstrap && make # build vlc cd ../../ && ./bootstrap && mkdir build-native && cd native && ../configure make
Feel free to add -jX options after make (where X is the number of process you want to spawn, making it your number of core is good) and add options to configure.
Thanks very much for the answer. I am going to try it out. ;)

edit:
I tried it and i got the same as when i first tried this earlier:

../../modules/codec/x264.c: In function ‘Open’:
../../modules/codec/x264.c:849:26: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’?
const int mask = x264_bit_depth > 8 ? X264_CSP_HIGH_DEPTH : 0;
^~~~~~~~~~~~~~
x264_picture_t
../../modules/codec/x264.c:849:26: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [Makefile:23703: codec/libx264_plugin_la-x264.lo] Error 1
make[4]: Leaving directory 'Downloads/vlc-3.0.4/build-native/modules'
make[3]: *** [Makefile:27359: all-recursive] Error 1
make[3]: Leaving directory 'Downloads/vlc-3.0.4/build-native/modules'
make[2]: *** [Makefile:12457: all] Error 2
make[2]: Leaving directory 'Downloads/vlc-3.0.4/build-native/modules'
make[1]: *** [Makefile:1533: all-recursive] Error 1
make[1]: Leaving directory 'Downloads/vlc-3.0.4/build-native'
make: *** [Makefile:1418: all] Error 2

Is there an easy fix for that without errors? When i don't get errors i can then try make install. Thanks
Also.. i tried deleting the earlier vlc folder and extracted it again on the drive and then i tried what you wrote. Not sure if the first option you used is important, but i skipped that one and deleted the folder instead.

../../../modules/codec/x264.c: In function ‘Open’:
../../../modules/codec/x264.c:849:26: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’?
const int mask = x264_bit_depth > 8 ? X264_CSP_HIGH_DEPTH : 0;
^~~~~~~~~~~~~~
x264_picture_t
../../../modules/codec/x264.c:849:26: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [Makefile:23703: codec/libx264_plugin_la-x264.lo] Error 1
make[4]: Leaving directory '/root/Downloads/vlc-3.0.4/contrib/native/modules'
make[3]: *** [Makefile:27359: all-recursive] Error 1
make[3]: Leaving directory '/root/Downloads/vlc-3.0.4/contrib/native/modules'
make[2]: *** [Makefile:12457: all] Error 2
make[2]: Leaving directory '/root/Downloads/vlc-3.0.4/contrib/native/modules'
make[1]: *** [Makefile:1533: all-recursive] Error 1
make[1]: Leaving directory '/root/Downloads/vlc-3.0.4/contrib/native'
make: *** [Makefile:1418: all] Error 2

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: it's so hard to compile vlc

Postby unidan » 14 Dec 2018 10:32

Hi, maybe the version trigger is invalid. Can you tell me which version of libx264 you have on your system?

To fix this; try to do "make .x264" in contrib/native and go back to the ../configure step.

Deleting the folder is fine, but I'm used to never deleting a git folder (as you might lose your commited data) ;)

ev01ve
New Cone
New Cone
Posts: 5
Joined: 13 Dec 2018 08:06

Re: it's so hard to compile vlc

Postby ev01ve » 14 Dec 2018 14:05

Hi, maybe the version trigger is invalid. Can you tell me which version of libx264 you have on your system?

To fix this; try to do "make .x264" in contrib/native and go back to the ../configure step.

Deleting the folder is fine, but I'm used to never deleting a git folder (as you might lose your commited data) ;)
I got:
ffmpeg -version
ffmpeg version 4.0.3-1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8 (Debian 8.2.0-9)
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100

---
I installed it again to be sure, but i did not have to i assume.

I edited your command from make .x264 to make . x264, but when i tried that in the native it says:
make: Nothing to be done for '.'.
make: *** No rule to make target 'x264'. Stop.

That's because i have these files and folders in native:
a52dec config.log faad2 lib Makefile schroedinger toolchain.cmake
asdcplib config.mak game-music-emu libgpg-error modules share upnp
bin config.status gcrypt libtiger musepack src
compat doc gmp libtool mysofa srt
compile doltcompile goom libvpx orc stamp-h1
config.h doltlibtool include m4 po test

I then tried going to: /vlc-3.0.4/contrib/native/modules/codec, and i used make . x264 but i got the same nothing to be done for. And i have these files:
/vlc-3.0.4/contrib/native/modules/codec
adpcm.lo cdg.lo g711.lo libfluidsynth_plugin_la-fluidsynth.lo liboggspots_plugin_la-oggspots.lo libtheora_plugin_la-theora.lo png.lo stl.lo textst.lo
aes3.lo cea708.lo gstreamer libkate_plugin_la-kate.lo libopus_plugin_la-opus_header.lo libvorbis_plugin_la-vorbis.lo rawvideo.lo subsdec.lo ttml
araw.lo cvdsub.lo jpeg.lo liblibass_plugin_la-libass.lo libopus_plugin_la-opus.lo libx265_plugin_la-x265.lo rtpvideo.lo substx3g.lo uleaddvaudio.lo
arib ddummy.lo liba52_plugin_la-a52.lo liblibmpeg2_plugin_la-libmpeg2.lo libschroedinger_plugin_la-schroedinger.lo libxwd_plugin_la-xwd.lo scte18.lo subsusf.lo webvtt
atsc_a65.lo dmo libdca_plugin_la-dca.lo liblibmpeg2_plugin_la-synchro.lo libsdl_image_plugin_la-sdl_image.lo libzvbi_plugin_la-zvbi.lo scte27.lo svcdsub.lo wmafixed
avcodec dvbsub.lo libfaad_plugin_la-faad.lo libmad_plugin_la-mad.lo libspeex_plugin_la-speex.lo lpcm.lo spdif.lo t140.lo
cc.lo edummy.lo libflac_plugin_la-flac.lo libmpg123_plugin_la-mpg123.lo libsvgdec_plugin_la-svg.lo omxil spudec telx.lo

I then tried going into /vlc-3.0.4/modules/codec ans used make . x264, but i got this message then:
make: Nothing to be done for '.'.
cc x264.c -o x264
x264.c:33:10: fatal error: vlc_common.h: No such file or directory
#include <vlc_common.h>
^~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: x264] Error 1


What do i try next? ;)

ev01ve
New Cone
New Cone
Posts: 5
Joined: 13 Dec 2018 08:06

Re: it's so hard to compile vlc

Postby ev01ve » 14 Dec 2018 14:58

Maybe a dumb question.. But did you mean cd build-native in this command instead of cd native?
cd ../../ && ./bootstrap && mkdir build-native && cd native && ../configure

I am going to try this in ubuntu on a normal OS. I am running a special version of linux now and that might be the issue. I will get back later on. Thanks for the help.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: it's so hard to compile vlc

Postby unidan » 17 Dec 2018 16:52

Yes sorry.

I'm using archlinux too and have no issues compiling VLC :)

teknopaul
New Cone
New Cone
Posts: 1
Joined: 12 Jun 2021 18:52

Re: it's so hard to compile vlc

Postby teknopaul » 12 Jun 2021 19:05

You can try building the tools too.

Code: Select all

# cleanup everything (WARNING, it basically deletes everything not commited) git clean -fdx # build the needed tools cd extras/tools ./bootstrap && make # build the contribs cd ../../contribs && mkdir native && cd native ../bootstrap && make # build vlc cd ../../ && ./bootstrap && mkdir build-native && cd native && ../configure make
Feel free to add -jX options after make (where X is the number of process you want to spawn, making it your number of core is good) and add options to configure.

Changing contribs to contrib and fixing some of the ../ this compiled stuff, but the bluray compilation did not work.

Where in this method can you do something akin to --disable-bluray I dont have a bluray device.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: it's so hard to compile vlc

Postby unidan » 27 Jul 2021 12:55

Code: Select all

# cleanup everything (WARNING, it basically deletes everything not commited) git clean -fdx # build the needed tools cd extras/tools ./bootstrap && make # build the contribs cd ../../contrib && mkdir native && cd native ../bootstrap --disable-bluray && make # build vlc cd ../../ && ./bootstrap && mkdir build-native && cd native && ../configure make
But bluray is not about drivers for bluray disks, it's about the bluray format, that you could have when running bluray .iso for instance. A wild guess for the bluray issue is that you don't have javac or ants, which are needed since bluray are running in a javaVM.


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

Who is online

Users browsing this forum: No registered users and 12 guests