Skip to content

[ffmpeg] Fix libx264-164.dll file is not copied to bin directory after build#43901

Closed
JonLiu1993 wants to merge 9 commits intomicrosoft:masterfrom
JonLiu1993:dev/Jon/x264
Closed

[ffmpeg] Fix libx264-164.dll file is not copied to bin directory after build#43901
JonLiu1993 wants to merge 9 commits intomicrosoft:masterfrom
JonLiu1993:dev/Jon/x264

Conversation

@JonLiu1993
Copy link
Contributor

Fixes #43802

Fix libx264-164.dll is not copied to bin directory.

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@JonLiu1993 JonLiu1993 added category:port-bug The issue is with a library, which is something the port should already support info:internal labels Feb 18, 2025
Comment on lines -99 to -102
if("tool" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES x264 AUTO_CLEAN)
endif()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix error:

CMake Error at scripts/cmake/vcpkg_copy_tools.cmake:36 (message):
  Couldn't find tool "x264":

      "F:/Feature-test/vcpkg/packages/x264_x64-windows/bin/x264.exe" does not exist

Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this stumbles over vcpkg's questionable redirecting of --bindir to tools/<PORT>/[debug/]bin. Most autoconf packages put DLLs into bin regardless of that option, but I am not convinced that one should rely on this.

For this port, it might be an alternative to explicitly pass --bindir=[debug/]bin, and do the regular vcpkg_copy_tools afterwards.

if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
if (NOT VCPKG_BUILD_TYPE)
file(COPY "${CURRENT_PACKAGES_DIR}/tools/x264/bin/libx264-164.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@JonLiu1993 JonLiu1993 marked this pull request as ready for review February 20, 2025 03:01
@dg0yt
Copy link
Contributor

dg0yt commented Feb 20, 2025

#43901 (comment) is not resolved AFAICS.
Isn't the DLL linked to a particular (release vs. debug) CRT?

@JonLiu1993 JonLiu1993 marked this pull request as draft February 20, 2025 09:12
@ajtribick
Copy link
Contributor

ajtribick commented Mar 1, 2025

From what I can see, the issue is in 80d54ff and is in the x264 port, not ffmpeg
Building x264 0.164.3108[core,asm,gpl] puts libx264-164.dll in the bin directory
Building x264 0.164.3108#1[core,asm,gpl] does not

@JonLiu1993
Copy link
Contributor Author

Duplicate of #44100

@JonLiu1993 JonLiu1993 marked this as a duplicate of #44100 Mar 3, 2025
@JonLiu1993 JonLiu1993 closed this Mar 3, 2025
@JonLiu1993 JonLiu1993 deleted the dev/Jon/x264 branch March 3, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-bug The issue is with a library, which is something the port should already support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ffmpeg] libx264-164.dll file is not copied to bin directory after build

4 participants