Describe the bug
ffmpeg on Windows is currently exporting malformed .pc files.
Environment
To Reproduce
Steps to reproduce the behavior:
.pc filesExpected behavior
ffmpeg should install well formed .pc files.
Failure logs
See https://github.com/microsoft/vcpkg/pull/11273#issuecomment-653767811 .
Additional context
Originally discussed in https://github.com/microsoft/vcpkg/pull/11273#issuecomment-653767811, but I opened a separate issue for better visibility. This is a specific instance of the more general problem discussed in https://github.com/microsoft/vcpkg/issues/11103 .
do you think it is sufficient to add ole32 and user32 to the system libraries?
you can probably add all windows standard libraries as system libraries.
Thanks @Neumann-A ! The strange thing is that apparently the library are not listed as
-lole32, but just asole32.lib, see:Name: libavdevice Description: FFmpeg device handling library Version: 58.8.100 Requires: Requires.private: libavfilter >= 7.57.100, libswscale >= 5.5.100, libavformat >= 58.29.100, libavcodec >= 58.54.100, libswresample >= 3.5.100, libavresample >= 4.0.0, libavutil >= 56.31.100 Conflicts: Libs: -L${libdir} -lavdevice Libs.private: psapi.lib ole32.lib strmiids.lib uuid.lib oleaut32.lib shlwapi.lib gdi32.lib vfw32.lib Cflags: -I${includedir}do you think that is a case that is supported in pkg-config, or it is just that
ffmpegproduces malformed.pcfiles?
`I tried to add all the library names (such aspsapi.lib,strmiids.libto theIGNORE_FLAGSofvcpkg_fixup_pkgconfig), but this is not working as the content ofLibs.private` is considered as a unique string, in fact the error in https://github.com/microsoft/vcpkg/pull/11273#issuecomment-653769085 is
~
CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:150 (message):
Found ole32.lib user32.lib and no rule to analyse the flag! Please check
the *.pc file
~
and not for ole32.lib and user32.lib separately.
You probably need to wait for the PR using pkg-config for the checks.
The simple use of vcpkg_fixup_pkgconfig for ffmpeg:x64-osx is failing as well:
~
CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:130 (message):
Library iconv was not found! If it is a system library use the
SYSTEM_LIBRARIES parameter for the vcpkg_fixup_pkgconfig call! Otherwise,
corret the *.pc file
Call Stack (most recent call first):
scripts/cmake/vcpkg_fixup_pkgconfig.cmake:234 (vcpkg_fixup_pkgconfig_check_libraries)
ports/ffmpeg/portfile.cmake:293 (vcpkg_fixup_pkgconfig)
scripts/ports.cmake:76 (include)
~
See the CI for https://github.com/microsoft/vcpkg/pull/11273, in particular https://github.com/microsoft/vcpkg/pull/11273/checks?check_run_id=862778528 .
I don't think that is a failure of vcpkg_fixup_pkgconfig knowing that iconv is only build on windows and nowhere else
Related PR: https://github.com/microsoft/vcpkg/pull/13919 .