Skip to content

[libopusenc] fix macOS and Linux build#15671

Merged
ras0219-msft merged 1 commit intomicrosoft:masterfrom
Be-ing:libopusenc_unix
Jan 20, 2021
Merged

[libopusenc] fix macOS and Linux build#15671
ras0219-msft merged 1 commit intomicrosoft:masterfrom
Be-ing:libopusenc_unix

Conversation

@Be-ing
Copy link
Copy Markdown
Contributor

@Be-ing Be-ing commented Jan 15, 2021

Describe the pull request

  • What does your PR fix? Fixes build errors on compilers other than MSVC

  • Which triplets are supported/not supported? Have you updated the CI baseline?
    all but UWP

  • Does your PR follow the maintainer guide?
    AFAIK yes

@Be-ing Be-ing mentioned this pull request Jan 15, 2021
2 tasks
@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jan 15, 2021

I don't understand this error nor why it is only occurring on x86-windows:

Found the following errors:
Error: While reading versions for port libopusenc from file: C:\a\1\s\port_versions\l-\libopusenc.json
       Version `0.2.1#1` was not found in versions file.
       Run:

           vcpkg x-add-version libopusenc

       to add the new port version.

To attempt to resolve all erros at once, run:

    vcpkg x-add-version --all

@Be-ing Be-ing mentioned this pull request Jan 15, 2021
2 tasks
@JackBoosY JackBoosY added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jan 18, 2021
@NancyLi1013
Copy link
Copy Markdown
Contributor

Hi @Be-ing

You need to merge master and run the command vcpkg x-add-version libopusenc to solve the error.

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jan 18, 2021

vcpkg x-add-version libopusenc fixed it but vcpkg x-add-version --all did not.

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jan 18, 2021

x86-windows still failed. I don't know what's going on.

@NancyLi1013
Copy link
Copy Markdown
Contributor

It seems that you missed port_versions/baseline.json since this file also contains changes.

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jan 19, 2021

port_versions/l-/libopusenc.json was changed when I ran vcpkg x-add-version libopusenc and I committed that and force pushed. port_versions/baseline.json was not changed, nor was it changed by vcpkg x-add-version --all

@NancyLi1013
Copy link
Copy Markdown
Contributor

I run vcpkg x-add-version libopusenc, port_versions/baseline.json is changed. But I have no permission to submit this change.

Please check it again.

vcpkg x-add-version --all is for all ports. In this PR, you just need to run vcpkg x-add-version libopusenc .

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jan 19, 2021

After I run vcpkg x-add-version libopusenc, git status shows no files changed.

@NancyLi1013
Copy link
Copy Markdown
Contributor

you can remove this content in port_versions/l-/libopusenc.json, then run vcpkg x-add-version libopusenc.

  "versions": [
    {
      "git-tree": "132909a5cb3c33e038cf9728427910fce455591d",
      "version-string": "0.2.1",
      "port-version": 1
    },

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jan 19, 2021

That just added the same content back to port_versions/l-/libopusenc.json

@NancyLi1013
Copy link
Copy Markdown
Contributor

Could you please check port_version/baseline.json and if there are changes in this file?

it should be this in your PR:

"libopusenc": {
     "baseline": "0.2.1",
     "port-version": 1
   },

In vcpkg mater branch, it should be this:

  "libopusenc": {
      "baseline": "0.2.1",
      "port-version": 0
    },

https://github.com/microsoft/vcpkg/blob/master/port_versions/baseline.json#L3175-L3178

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jan 19, 2021

I manually edited port_versions/baseline.json and CI is passing now.

@ras0219-msft
Copy link
Copy Markdown
Contributor

Thanks a bunch for the fix and sorry for the PR trouble!

@ras0219-msft ras0219-msft merged commit f1b73fb into microsoft:master Jan 20, 2021
Jimmy-Hu added a commit to Jimmy-Hu/vcpkg that referenced this pull request Jan 20, 2021
[libopusenc] fix macOS and Linux build (microsoft#15671)
@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jan 20, 2021

I suspect the issue was caused by this package not previously having any port-version specified. I suggest looking into it further to make x-add-version more robust, but I don't really understand what that is for and how it works so I don't know what else to do.

@Be-ing Be-ing deleted the libopusenc_unix branch January 20, 2021 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants