Skip to content

[libvpx] Fix libvpx compilation (install process)#17287

Merged
strega-nil merged 9 commits intomicrosoft:masterfrom
talregev:patch-2
Apr 19, 2021
Merged

[libvpx] Fix libvpx compilation (install process)#17287
strega-nil merged 9 commits intomicrosoft:masterfrom
talregev:patch-2

Conversation

@talregev
Copy link
Copy Markdown
Contributor

Fix libvpx compilation (install process)
compile on windows (x86, x64)
Fix Cannot find pdb (line 104 in profile).

@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Apr 15, 2021
@JackBoosY
Copy link
Copy Markdown
Contributor

-- Installing: D:/packages/libvpx_x64-windows/lib/vpxmd.lib
CMake Error at ports/libvpx/portfile.cmake:104 (file):
  file INSTALL cannot find
  "D:/buildtrees/libvpx/x64-windows/x64/Release/vpxmd.pdb": File exists.
Call Stack (most recent call first):
  scripts/ports.cmake:142 (include)

Can you double confirm your changes?

@talregev
Copy link
Copy Markdown
Contributor Author

talregev commented Apr 15, 2021

-- Installing: D:/packages/libvpx_x64-windows/lib/vpxmd.lib
CMake Error at ports/libvpx/portfile.cmake:104 (file):
  file INSTALL cannot find
  "D:/buildtrees/libvpx/x64-windows/x64/Release/vpxmd.pdb": File exists.
Call Stack (most recent call first):
  scripts/ports.cmake:142 (include)

Can you double confirm your changes?

Is it from your pc?
On one of the computer libvpx compile without the change. I compile only the libvpx
Other computer I need to do the change. I compile libvpx as part of ffmpeg[all-gpl]
Maybe if I compile libvpx part of other libs, it happen?
Can you investigate it more?

Both computers running windows 10.

@talregev talregev marked this pull request as draft April 15, 2021 05:17
@talregev talregev changed the title Fix libvpx compilation (install process) [WIP][Help needed] Fix libvpx compilation (install process) Apr 15, 2021
@JackBoosY
Copy link
Copy Markdown
Contributor

JackBoosY commented Apr 15, 2021

@talregev From our pipeline test, Windows10 with Visual Studio 2019.
I'll take a look at this.

@JackBoosY
Copy link
Copy Markdown
Contributor

@talregev What triplet do you use?

@talregev
Copy link
Copy Markdown
Contributor Author

both x86-windows x64-windows

@mcmtroffaes
Copy link
Copy Markdown
Contributor

I haven't seen this happen on my CI (with x64-windows, x64-windows-static, and x64-windows-static-md); installation and compilation works fine. For the record, logs are here (for an ffmpeg master build, but otherwise the portfiles are the same, and in particular its the same for libvpx):

https://ci.appveyor.com/project/mcmtroffaes/ffmpeg-msvc-build/build/job/3yn0l4c3ge9fwkiy (x64-windows)
https://ci.appveyor.com/project/mcmtroffaes/ffmpeg-msvc-build/build/job/stavyb3m9i23my7w (x64-windows-static)
https://ci.appveyor.com/project/mcmtroffaes/ffmpeg-msvc-build/build/job/yr0nuflv8k8e4j0a (x64-windows-static-md)

This seems vaguely related to #12706 where the names were fixed to ensure the pdb files were found when compiling other apps against ffmpeg: the pdb files cannot be renamed after install.

@talregev
Copy link
Copy Markdown
Contributor Author

talregev commented Apr 16, 2021

This seems vaguely related to #12706 where the names were fixed to ensure the pdb files were found when compiling other apps against ffmpeg: the pdb files cannot be renamed after install.

I think it a good lead and I would start from there. Did you / ci try to compile vcpkg ffmpeg[all-gpl]?
I think when it compile ffmep with all the options, it also compile an apps that using ffmpeg, and maybe that why it rename the pdb. if it that the case, my suggestion is that the pdb always need to be rename

@JackBoosY
Copy link
Copy Markdown
Contributor

JackBoosY commented Apr 16, 2021

I think CRT linkage affected it.
Can you please provide vpx.vcxproj in VCPKG_ROOT/buildtrees/libvpx/x86-windows ?
And please provide the configure log.

@mcmtroffaes
Copy link
Copy Markdown
Contributor

Did you try / ci compile vcpkg ffmpeg[all-gpl]?

That's a good suggestion. I just tested vcpkg ffmpeg[core,ffmpeg,libvpx] on x64-windows and I can confirm that this works as expected at least on my local setup, with the ffmpeg binary able to encode with the libvpx-vp9 codec. Note that building ffmpeg (with whichever feature set) will not change the libvpx build on vcpkg: the ffmpeg build process does not influence the build process of its dependencies (such as libvpx).

@talregev
Copy link
Copy Markdown
Contributor Author

talregev commented Apr 16, 2021

@JackBoosY
I reproduce the problem with small example.
vcpkg install ffmpeg[core,ffmpeg,vpx]:x64-windows
vpx.vcxproj and logs.zip

@talregev
Copy link
Copy Markdown
Contributor Author

Maybe the problem is from the things I install on visual studio. like mfc and clang support?

@talregev
Copy link
Copy Markdown
Contributor Author

@JackBoosY any news?
Do you need more information?

@JackBoosY
Copy link
Copy Markdown
Contributor

@talregev Nope.

@JackBoosY
Copy link
Copy Markdown
Contributor

@talregev Can you test whether my changes is correct?

@JackBoosY JackBoosY changed the title [WIP][Help needed] Fix libvpx compilation (install process) [libvpx] Fix libvpx compilation (install process) Apr 19, 2021
@JackBoosY JackBoosY marked this pull request as ready for review April 19, 2021 07:14
@mcmtroffaes
Copy link
Copy Markdown
Contributor

Thanks @JackBoosY! For the record, I've just tested this pr by compiling an application against ffmpeg[core,avcodec,vpx] on the x64-windows and x64-windows-static triplets, and I can confirm that it works like charm, besides also cleaning things up for libvpx detection on ffmpeg. Fingers crossed it also fixes @talregev 's issue.

@strega-nil
Copy link
Copy Markdown
Contributor

LGTM! Thanks @talregev

@strega-nil strega-nil merged commit 3ec41f5 into microsoft:master Apr 19, 2021
@BillyONeal
Copy link
Copy Markdown
Member

Unfortunately it doesn't look like this fixed it, in #17331 with this change applied we still see:

CMake Error at ports/libvpx/portfile.cmake:104 (file):
  file INSTALL cannot find
  "D:/buildtrees/libvpx/arm-uwp/ARM/Release/vpx/vpx.pdb": File exists.

@BillyONeal
Copy link
Copy Markdown
Member

I think I have a fix, will put into the VM update PR

@Hoikas
Copy link
Copy Markdown
Contributor

Hoikas commented Apr 20, 2021

A user of my project is reporting this same failure even after this PR.

Edit: a manual cherry-pick of 91542464a564bfad42fcf2fa2fbafa3cab929a54 seems to have fixed it

@mcmtroffaes
Copy link
Copy Markdown
Contributor

I've started hitting this now as well on appveyor CI (not locally); 9154246 also fixed it for me. Perhaps something to do with the version of Visual Studio.

@Hoikas
Copy link
Copy Markdown
Contributor

Hoikas commented Apr 24, 2021

This issue is now being tripped on GitHub Actions CI. Is there any chance the fix can be fast-tracked @BillyONeal?

@BillyONeal
Copy link
Copy Markdown
Member

This issue is now being tripped on GitHub Actions CI. Is there any chance the fix can be fast-tracked @BillyONeal?

The VM update just landed, try again?

@Hoikas
Copy link
Copy Markdown
Contributor

Hoikas commented Apr 26, 2021

That seems to have fixed it, thanks!

@JackBoosY
Copy link
Copy Markdown
Contributor

@Hoikas @mcmtroffaes Fixed.

@mcmtroffaes
Copy link
Copy Markdown
Contributor

Yup, happy to confirm the fix in master now. Thanks a bunch!

@talregev talregev deleted the patch-2 branch March 26, 2022 19: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.

6 participants