1

I'm building the ffmpeg source on Windows 10 in an attempt to customize and incorporate this open-source package as part of a larger package. Because ffmpeg is a Linux-centric code base, I'm using the MSYS2 platform to build my Windows executables. For these executables, I need the ability to step through the code, therefore I need a version of ffmpeg that includes symbols. By convention, the ffmpeg project builds two versions of each executable, ffmpeg and ffmpeg_g. The latter (ffmpeg_g) retains symbols while the former is stripped. I chose the vcpkg toolset as the most straightforward way to download necessary packages and build the required executables in Windows format. Unfortuately, the vcpkg build process creates two identical executables for ffmpeg and ffmpeg_g, neither of which contain symbols.

This is my process: Install msys2-x86_64-20210725.exe

Clone the git repository for vcpkg on my system:

git clone https://github.com/microsoft/vcpkg
cd vcpkg

Now I used vcpkg to install and build the source code (version X) at vcpkg\install according to the instructions at: https://trac.ffmpeg.org/wiki/CompilationGuide/vcpkg

I then call vcpkg with the following parameters.

./vcpkg install ffmpeg[core,avcodec,avdevice,avfilter,avformat,ffmpeg,ffplay,ffprobe,nvcodec,opencl,postproc,sdl2,swscale,nonfree]:x64-windows --recurse

It successfully builds ffmpeg.exe and related executables, as well as the necessary DLLs. This excerpt from the build log shows the following:

   Creating library libavdevice/avdevice.lib and object libavdevice/avdevice.exp
LD  ffmpeg_g.exe
LD  ffplay_g.exe
LD  ffprobe_g.exe
CP  ffmpeg.exe
CP  ffplay.exe
CP  ffprobe.exe
STRIP   ffmpeg.exe
skipping strip ffmpeg.exe
STRIP   ffprobe.exe
skipping strip ffprobe.exe
STRIP   ffplay.exe
skipping strip ffplay.exe

This implies not only that the script does not strip the "_g" files but that symbol stripping is disabled somehow. Yet when I go into the the folder vcpkg\buildtrees\ffmpeg\x64-windows-dbg and enter "ls ffmpeg*.exe" it tells me that both ffmpeg and ffmpeg_g executables are the same size. Sure enough, when I enter the command "gdb ffmpeg_g.exe" it gives me the warning:

Reading symbols from ffmpeg_g.exe...
(No debugging symbols found in ffmpeg_g.exe)

I was under the impression that symbols should be generated and retained by default, but apparently, that's not the case. Is there some compiler or linker option I can pass to vcpkg so I can create an executable containing symbols? Or am I doing something else wrong?

Vaughn T
  • 21
  • 3

0 Answers0