question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build FFmpeg with LLVm 12

See original GitHub issue

Hello, I am using Clang 12 on my macOS:

clang --version
clang version 12.0.0
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

I need to use your project on FFmpeg so I used these commands:

brew install automake fdk-aac git lame libass libtool libvorbis libvpx  opus sdl shtool texi2html theora wget x264 x265 xvid nasm
export LLVM_COMPILER=clang
export LLVM_BITCODE_GENERATION_FLAGS='-g'
mkdir build
cd build
CC=wllvm CXX=wllvm++ /Users/macbook/Documents/github-repos/FFmpeg/configure  --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame  --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libopus --enable-libxvid --samples=fate-suite/

extract-bc ffmpeg

but it shows this:

ERROR:FFmpeg/build/ffmpeg contained no __WLLVM segment

Can you please help me? Thank you

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

3reactions
tylzh97commented, Aug 23, 2022

FFmpeg‘s configure file does not using system variable “CC”. If you want to using wllvm to build it , you shuold do someting like that: ./configure --disable-yasm --cc=wllvm and then you can extract it with extract-bc ffmpeg

full commands here:

cd ffmpeg
./configure --disable-yasm --cc=wllvm
make
extract-bc ffmpeg

and you can find ffmpeg.bc here!

0reactions
ianamasoncommented, Jul 10, 2021

So all I can suggest is to turn on logging and watch what is happening. These sorts of things are possible:

1 The build system is using lto and so the .o files are actually bitcode.

2 The build system has hard coded the compiler.

Some detective work is required. File an issue, solve it, then bask in the fame 😜

Read more comments on GitHub >

github_iconTop Results From Across the Web

CompilationGuide - FFmpeg Wiki
This page contains a list of resources which describe the necessary steps required for compiling FFmpeg from scratch or with the help of...
Read more >
How do you compile FFmpeg for Windows (x86 and x64 ...
I'm interested in detailed answers explaining how you get to compile FFmpeg Windows builds for x86 and x64 using GCC/Clang for Windows or...
Read more >
Build FFmpeg WebAssembly version (= ffmpeg.wasm): Part.2 ...
Let's pass these arguments to compile with emscripten in build.sh : For native build, please make sure llvm-ranlib , llvm-as and ...
Read more >
Timed FFmpeg Compilation - OpenBenchmarking.org
This test times how long it takes to build the FFmpeg multimedia ... pts/build-ffmpeg-1.0.2 [View Source] Fri, 11 Dec 2020 12:39:25 GMT
Read more >
Using FFmpeg with NVIDIA GPU Hardware Acceleration
More Information on building FFmpeg can be found at: ... to output11.mp4 at 480pand output12.mp4 at 240p using the GPU hardware encoder.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found