Error Compiling Latest VLC

*nix specific usage questions
Jdogzz
New Cone
New Cone
Posts: 4
Joined: 08 Jan 2013 03:01

Error Compiling Latest VLC

Postby Jdogzz » 08 Jan 2013 03:19

I spent today going through all of the documentation for compiling VLC from git, also being able to run it from the build directory without doing a 'make install,' and created a script that handles this for me:

Code: Select all

git clone git://git.videolan.org/vlc.git cd vlc; ./bootstrap cd contrib; cd native ../bootstrap make cd /home/jmgg/vlc-dev/vlc/extras git clone git://git.videolan.org/x264.git x264-trunk cd x264-trunk; ./configure --prefix=/usr --enable-pic; make cd /home/jmgg/vlc-dev/vlc/extras/ git clone git://git.videolan.org/ffmpeg.git ffmpeg cd ffmpeg ./configure --prefix=/usr --host-cflags="-fPIC" --enable-gpl --enable-pthreads --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-pic make cd /home/jmgg/vlc-dev/vlc/ { if [ -d /home/jmgg/vlc-dev/vlc/build/ ]; then echo "File found!" rm -r build fi } mkdir build && cd build && ../configure --prefix=/usr \ --host-cflags="-fPIC" \ --enable-static \ --enable-debug \ --enable-lirc \ --enable-shout --enable-taglib \ --enable-bluray \ --enable-vcdx \ --enable-realrtsp \ --enable-svg --enable-dvdread \ --enable-dc1394 \ --enable-theora --enable-faad \ --enable-twolame \ --enable-flac --enable-tremor \ --enable-dirac \ --enable-skins2 \ --enable-aa --enable-caca \ --enable-jack \ --enable-goom \ --enable-x264 --with-x264-tree=/home/jmgg/vlc-dev/vlc/extras/x264-trunk \ --disable-vcdx \ --enable-xvideo \ --enable-sdl \ --enable-avcodec \ --enable-avformat \ --enable-swscale \ --enable-mad \ --enable-dvbpsi \ --enable-a52 \ --enable-libmpeg2 \ --enable-dvdnav \ --enable-vorbis \ --enable-ogg \ --enable-mkv \ --enable-freetype \ --enable-fribidi \ --enable-speex \ --enable-alsa \ --with-pic make
The build goes through this successfully until partway through compiling VLC, where this error occurs:

Code: Select all

/home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1641:7: warning: 'gcry_ac_key_t' is deprecated [-Wdeprecated-declarations] /home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1642:7: warning: 'gcry_ac_io_t' is deprecated (declared at /home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1333) [-Wdeprecated-declarations] /home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1643:7: warning: 'gcry_ac_io_t' is deprecated (declared at /home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1333) [-Wdeprecated-declarations] /home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1649:1: warning: 'gcry_ac_id_t' is deprecated (declared at /home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1256) [-Wdeprecated-declarations] /home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1656:34: warning: 'gcry_ac_id_t' is deprecated (declared at /home/jmgg/vlc-dev/vlc/contrib/x86_64-slackware-linux/include/gcrypt.h:1256) [-Wdeprecated-declarations] CCLD libvlc_srtp.la CCLD librtp_plugin.la /usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: ./.libs/libvlc_srtp.a(libvlc_srtp_la-srtp.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC ./.libs/libvlc_srtp.a(libvlc_srtp_la-srtp.o): could not read symbols: Bad value collect2: error: ld returned 1 exit status make[6]: *** [librtp_plugin.la] Error 1 make[6]: Leaving directory `/home/jmgg/vlc-dev/vlc/build/modules/access/rtp' make[5]: *** [all] Error 2 make[5]: Leaving directory `/home/jmgg/vlc-dev/vlc/build/modules/access/rtp' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/jmgg/vlc-dev/vlc/build/modules/access' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/jmgg/vlc-dev/vlc/build/modules/access' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/jmgg/vlc-dev/vlc/build/modules' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jmgg/vlc-dev/vlc/build' make: *** [all] Error 2
I have done a search for other people that received a similar and they were all told to recompile whatever package that was giving the bad value with the '-fPIC' flag. However, the problems they had were all for other packages, while this error seems to be from within VLC:

Code: Select all

./.libs/libvlc_srtp.a(libvlc_srtp_la-srtp.o): could not read symbols: Bad value
So my questions at this point are twofold:

First, can anyone give me advice as to how I should fix this error?
Second, if there is something I can do to improve my script, either to make it cleaner or to improve the performance of VLC, I would appreciate advice on that as well.

Additional information: I'm running Slackware 14.0 64 bit.

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

Re: Error Compiling Latest VLC

Postby Rémi Denis-Courmont » 08 Jan 2013 09:40

You probably need to recompile libgcrypt with PIC.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Jdogzz
New Cone
New Cone
Posts: 4
Joined: 08 Jan 2013 03:01

Re: Error Compiling Latest VLC

Postby Jdogzz » 08 Jan 2013 18:30

I tried recompiling gcrypt with the --enable-pic option but that failed to change the error. However, I did remove the --prefix and --enable-static options from the VLC build which resulted in a successful compilation. Thank you for your help:)

Here is my revised script:

Code: Select all

git clone git://git.videolan.org/vlc.git cd vlc; ./bootstrap cd contrib; cd native ../bootstrap make cd /home/jmgg/vlc-dev/vlc/extras git clone git://git.videolan.org/x264.git x264-trunk cd x264-trunk; ./configure --prefix=/usr --enable-pic --enable-shared; make cd /home/jmgg/vlc-dev/vlc/extras/ git clone git://git.videolan.org/ffmpeg.git ffmpeg cd ffmpeg ./configure --prefix=/usr --host-cflags="-fPIC" --enable-gpl --enable-pthreads --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-pic make cd /home/jmgg/vlc-dev/vlc/ { if [ -d /home/jmgg/vlc-dev/vlc/build/ ]; then echo "File found!" rm -r build fi } mkdir build && cd build && ../configure --enable-debug \ --enable-lirc \ --enable-shout --enable-taglib \ --enable-bluray \ --enable-vcdx \ --enable-realrtsp \ --enable-svg --enable-dvdread \ --enable-dc1394 \ --enable-theora --enable-faad \ --enable-twolame \ --enable-flac --enable-tremor \ --enable-dirac \ --enable-skins2 \ --enable-aa --enable-caca \ --enable-jack \ --enable-goom \ --enable-x264 --with-x264-tree=/home/jmgg/vlc-dev/vlc/extras/x264-trunk \ --disable-vcdx \ --enable-xvideo \ --enable-sdl \ --enable-avcodec \ --enable-avformat \ --enable-swscale \ --enable-mad \ --enable-dvbpsi \ --enable-a52 \ --enable-libmpeg2 \ --enable-dvdnav \ --enable-vorbis \ --enable-ogg \ --enable-mkv \ --enable-freetype \ --enable-fribidi \ --enable-speex \ --enable-alsa \ --with-pic make
While my primary problem is solved, I am still open to any changes I can make to the script to improve it.


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

Who is online

Users browsing this forum: Google [Bot] and 9 guests