Skip to content

[hidapi] Update to 0.12.0#25008

Merged
ras0219-msft merged 10 commits intomicrosoft:masterfrom
JoergAtGithub:update_hidapi_0.12.0
Jun 2, 2022
Merged

[hidapi] Update to 0.12.0#25008
ras0219-msft merged 10 commits intomicrosoft:masterfrom
JoergAtGithub:update_hidapi_0.12.0

Conversation

@JoergAtGithub
Copy link
Copy Markdown
Contributor

@JoergAtGithub JoergAtGithub commented May 30, 2022

https://github.com/libusb/hidapi/releases/tag/hidapi-0.12.0

Describe the pull request

  • What does your PR fix?

Updates the existing hidapi port to the latest release 0.12.0

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

Unchanged

Yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

Yes

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

This hidapi release adds two additional header files, which need to be included if platform specific functions are used:

  • hidapi\mac\hidapi_darwin.h for Mac
  • hidapi\windows\hidapi_winapi.h for Windows

I needed to change the replace command from #22320 to make the static builds pass.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for hidapi have changed but the version was not updated
version: 0.12.0
old SHA: 14038e8a0a4a688aaf75ce4fa6adaed1f22dd611
new SHA: 8006591b6ce4924aebf2fdf8c46065ceaccad830
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@JoergAtGithub JoergAtGithub force-pushed the update_hidapi_0.12.0 branch from add6eec to 943d81c Compare May 30, 2022 17:47
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for hidapi have changed but the version was not updated
version: 0.12.0
old SHA: 14038e8a0a4a688aaf75ce4fa6adaed1f22dd611
new SHA: 0c4bc45706d99498950491091ba8a5e8ccdd3964
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for hidapi have changed but the version was not updated
version: 0.12.0
old SHA: 0c4bc45706d99498950491091ba8a5e8ccdd3964
new SHA: 90f0de6432aa87318c7d8aeb6ff373264c3c95a1
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for hidapi have changed but the version was not updated
version: 0.12.0
old SHA: 0c4bc45706d99498950491091ba8a5e8ccdd3964
new SHA: 8006591b6ce4924aebf2fdf8c46065ceaccad830
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for hidapi have changed but the version was not updated
version: 0.12.0
old SHA: 8006591b6ce4924aebf2fdf8c46065ceaccad830
new SHA: 3bb72bc98d3527c69ef2a7aea83bd1d98ae44bb9
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for hidapi have changed but the version was not updated
version: 0.12.0
old SHA: 3bb72bc98d3527c69ef2a7aea83bd1d98ae44bb9
new SHA: a95202186af8b0dd8cacf0fc234037cc04eba2d7
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: unable to parse versions file /home/runner/work/vcpkg/vcpkg/versions/h-/hidapi.json
Error: failed to parse versions file for `hidapi`: :4:1: error: Unexpected character; expected property name
    on expression: <<<<<<< HEAD
                   ^

@JoergAtGithub JoergAtGithub force-pushed the update_hidapi_0.12.0 branch from d17e170 to 540fa1c Compare May 30, 2022 18:43
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for hidapi have changed but the version was not updated
version: 0.12.0
old SHA: 3bb72bc98d3527c69ef2a7aea83bd1d98ae44bb9
new SHA: a95202186af8b0dd8cacf0fc234037cc04eba2d7
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@JoergAtGithub
Copy link
Copy Markdown
Contributor Author

What can I do to fix this error:

2022-05-30T18:45:45.7766136Z Detecting compiler hash for triplet x64-windows...
2022-05-30T18:45:50.7405975Z error: curl has reported unexpected results to vcpkg and vcpkg cannot continue.
2022-05-30T18:45:50.7412069Z Please review the following text for sensitive information and open an issue on the Microsoft/vcpkg GitHub to help fix this problem!
2022-05-30T18:45:50.7446916Z cmd: curl --head --location -w "8a1db05f-a65d-419b-aa72-037fb4d0672e %{http_code}\n" "https://vcpkgbinarycacheeastasia.blob.core.windows.net/cache/78d192f64ebdc6cc2773530f0eb64619bbcbbe4caba654887d5cea376782e0c5.zip?*** SECRET ***" "https://vcpkgbinarycacheeastasia.blob.core.windows.net/cache/04427ad5c721aee8feb97bf5bb953b0d4a2327b0cb51e157b215304fb630c7cd.zip?*** 

@JoergAtGithub JoergAtGithub marked this pull request as ready for review May 30, 2022 18:54
@FrankXie05 FrankXie05 self-assigned this May 31, 2022
@FrankXie05 FrankXie05 added the category:port-update The issue is with a library, which is requesting update new revision label May 31, 2022
@FrankXie05
Copy link
Copy Markdown
Contributor

FrankXie05 commented May 31, 2022

Seems to be an issue with CI, we are currently refining the CI build. 🤔
BTW,why remove it, it solves a fatal bug. Is it an upstream update? @JoergAtGithub

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/hidapi/hidapi.cmake" "\"/hidapi\"" "\"\${_IMPORT_PREFIX}/include\"")

@FrankXie05
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@FrankXie05 FrankXie05 changed the title Update hidapi to 0.12.0 [hidapi] Update to 0.12.0 May 31, 2022
@JoergAtGithub
Copy link
Copy Markdown
Contributor Author

Seems to be an issue with CI, we are currently refining the CI build. thinking BTW,why remove it, it solves a fatal bug. Is it an upstream update? @JoergAtGithub

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/hidapi/hidapi.cmake" "\"/hidapi\"" "\"\${_IMPORT_PREFIX}/include\"")

I removed this line, because CI builds failed with:

2022-05-30T18:26:27.0951263Z -- Fixing pkgconfig file: D:/packages/hidapi_x64-windows/debug/lib/pkgconfig/hidapi.pc
2022-05-30T18:26:27.1562365Z CMake Error at scripts/cmake/vcpkg_replace_string.cmake:12 (file):
2022-05-30T18:26:27.1567792Z   file failed to open for reading (No such file or directory):
2022-05-30T18:26:27.1570795Z 
2022-05-30T18:26:27.1576914Z     D:/packages/hidapi_x64-windows/share/hidapi/hidapi.cmake
2022-05-30T18:26:27.1582833Z Call Stack (most recent call first):
2022-05-30T18:26:27.1588858Z   ports/hidapi/portfile.cmake:19 (vcpkg_replace_string)
2022-05-30T18:26:27.1594715Z   scripts/ports.cmake:146 (include)
2022-05-30T18:26:27.1597535Z 
2022-05-30T18:26:27.1600442Z 
2022-05-30T18:26:27.1746540Z error: building hidapi:x64-windows failed with: BUILD_FAILED
2022-05-30T18:26:27.1752674Z Elapsed time to handle hidapi:x64-windows: 2.501 s

e.g.: https://dev.azure.com/vcpkg/c1ee48cb-0df2-4ab3-8384-b1df5a79fe53/_apis/build/builds/72935/logs/82

@FrankXie05
Copy link
Copy Markdown
Contributor

@JoergAtGithub
Maybe it's just a CI bug😣. But this fatal bug still exists, and it is obviously undeletable until the problem is completely solved。
image

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Jun 1, 2022

The install.log from the original failed build lists:

-- Installing: D:/packages/hidapi_x64-windows-static/debug/lib/cmake/hidapi/libhidapi.cmake
-- Installing: D:/packages/hidapi_x64-windows-static/debug/lib/cmake/hidapi/libhidapi-debug.cmake
-- Installing: D:/packages/hidapi_x64-windows-static/debug/lib/cmake/hidapi/libhidapi-version.cmake
-- Installing: D:/packages/hidapi_x64-windows-static/debug/lib/cmake/hidapi/hidapi-config.cmake

So me the file to be fixed is now named libhidapi.cmake instead of hidapi.cmake?

@FrankXie05
Copy link
Copy Markdown
Contributor

@dg0yt Yes it should be changed.

Comment on lines -19 to -20
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/hidapi/hidapi.cmake" "\"/hidapi\"" "\"\${_IMPORT_PREFIX}/include\"")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be modified to the following

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/hidapi/libhidapi.cmake" "\"/hidapi\"" "\"\${_IMPORT_PREFIX}/include\"")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done! Now CI passed immediately.

@FrankXie05 FrankXie05 added info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. and removed requires:author-response labels Jun 2, 2022
Copy link
Copy Markdown
Contributor

@ras0219-msft ras0219-msft left a comment

Choose a reason for hiding this comment

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

LGTM, thanks everyone!

@ras0219-msft ras0219-msft merged commit d9e6139 into microsoft:master Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-update The issue is with a library, which is requesting update new revision info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants