New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ffmpeg] Windows static build issues with psapi #23021
Comments
Your vcpkg maybe out-dated, can you please git pull and try again? Thanks. |
I updated it to the latest commit (b71b444) But I still get the exact same issue I also get the exact same issue on my local windows machine |
We haven't been able to repro this; if more information comes up, or this issue appears again, please reopen. |
@JackBoosY It's an issue with the find_package(ffmpeg MODULE REQUIRED) ...it fails with the error as reported by @Haeri above. As a workaround, I'm using find_path(FFMPEG_INCLUDE_DIR "libavformat/avformat.h" REQUIRED)
find_library(LIBAVFORMAT avformat REQUIRED)
find_library(LIBAVCODEC avcodec REQUIRED)
find_library(LIBAVUTIL avutil REQUIRED)
find_library(LIBSWRESAMPLE swresample REQUIRED) Then I can compile and link using This issue should be reopened and the |
In order to reproduce this issue you have to run cmake from non-developer terminal. It is strange though, because cmake still finds correct toolchain and proceeds to configure project to eventually fail. Developer prompt must be setting up some environment variable that helps |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
I also ran into this issue, after some digging I found that
To find a set of required system libraries. If you link dynamically we will find psapi in
note there that the dependency is "private" so it will not be added to the
these are now public so they are added to the
When you run cmake from a developer terminal this path get automatically picked up by cmake (somwhow, not sure exactly which env variable that it will read) and then every thing work. But if we run the cmake-gui directly we have not such luck and we can't find the needed libs. Ideally we should be able to give the |
I wonder if there should be a |
@LilyWangLL Consider to reopen this issue? |
Describe the bug
Windows static version of ffmpeg fails with the following message:
Environment
To Reproduce
Steps to reproduce the behavior:
cmake .. -DVCPKG_TARGET_TRIPLET="x64-windows-static" -DCMAKE_TOOLCHAIN_FILE="%root_path%\external\vcpkg\scripts\buildsystems\vcpkg.cmake" -DBUILD_SHARED_LIBS=OFF
to create my solution filesExpected behavior
The expected behavior would be for the cmake script to succeed in creating a solution file.
Failure logs
See the full logs here:
https://github.com/Haeri/ElementalDraw/runs/5132276972?check_suite_focus=true#step:4:407
Additional context
The non-static windows build works fine as well as macos.
The text was updated successfully, but these errors were encountered: