Statically Building VLC Relocation Error

*nix specific usage questions
jidaprano
New Cone
New Cone
Posts: 2
Joined: 12 Sep 2023 23:51

Statically Building VLC Relocation Error

Postby jidaprano » 12 Sep 2023 23:57

Hello,
I am attempting to statically build VLC on Ubuntu MATE 22.04.
I clone the git repo, bootstrap, configure using:
./configure --enable-static
and then build using make. The build goes for a few minutes, then errors with:

Code: Select all

/usr/bin/ld: ./.libs/libvlc_adaptive.a(libvlc_adaptive_la-QualityLevel.o): warning: relocation against `_ZTVSt9basic_iosIcSt11char_traitsIcEE@@GLIBCXX_3.4' in read-only section `.text.unlikely' /usr/bin/ld: ./.libs/libvlc_adaptive.a(libvlc_adaptive_la-Segment.o): relocation R_X86_64_PC32 against symbol `_ZSt7nothrow@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value
I'm very inexperienced in this field; how would I go about recompiling with -fPIC? I tried editing the generated Makefile and adding -fPIC to the CFLAGS but that didn't work and I'm not sure what else to do since there is no CMakeLists.txt file.
Thanks in advance for any guidance.

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

Re: Statically Building VLC Relocation Error

Postby Rémi Denis-Courmont » 14 Sep 2023 09:10

Don't --enable -static.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

jidaprano
New Cone
New Cone
Posts: 2
Joined: 12 Sep 2023 23:51

Re: Statically Building VLC Relocation Error

Postby jidaprano » 15 Sep 2023 00:54

Don't --enable -static.
But won’t the build not be static then?


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

Who is online

Users browsing this forum: No registered users and 38 guests