Opened 2 years ago

Closed 2 years ago

#9498 closed defect (invalid)

Cannot build ffmpeg shared libraries under Windows with dash enabled (missing libxml2)

Reported by: Thomas Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hello,

I can't build ffmpeg shared libraries under Windows with the mpeg dash demuxer enabled.

The problem is always that libxml2 is missing.

I always get the error : " ERROR: libxml-2.0 not found using pkg-config"

Here is what I have done:

I installed msys2
I run cmd from Visual Studio 2015 (Tools > Command prompt) and I run msys2 from there:

C:\msys64>C:\msys64\msys2_shell.cmd -msys

Then, in msys2, I install this:

pacman -S make
pacman -S diffutils
pacman -S yasm
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-i686-gcc
pacman -S pkg-config
pacman -S mingw-w64-x64-libxml2
pacman -S mingw-w64-x86_64-libxml2
export PATH=$PATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin"
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig:/mingw64/lib/pkgconfig/

I go to ffmpeg's folder and I run:

./configure --target-os=win64 --arch=x86_64 --toolchain=msvc --enable-shared --enable-demuxer=dash --enable-libxml2

And I face this error:

ERROR: libxml-2.0 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

And yet, I have libxml-2.0.pc in C:\msys64\mingw64\lib\pkgconfig

I don't know if it can help but "pkg-config --libs libxml2" returns:

Package libxml2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml2' found

And "pkg-config --libs libxml-2.0" returns:

-L/mingw64/lib -lxml2 -lz -llzma -liconv -lws2_32

Could someone please save me with a solution?

Thanks in advance

Change History (1)

comment:1 by Marton Balint, 2 years ago

Resolution: invalid
Status: newclosed

You should ask for help for build issues at ​ffmpeg-user@ffmpeg.org or try various methods listed at ​https://trac.ffmpeg.org/wiki/CompilationGuide

Note: See TracTickets for help on using tickets.