Skip to content
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

Could not find PowerShell Core (Linux -> Windows cross compile) #16236

Closed
autoantwort opened this issue Feb 15, 2021 · 8 comments · Fixed by #16347
Closed

Could not find PowerShell Core (Linux -> Windows cross compile) #16236

autoantwort opened this issue Feb 15, 2021 · 8 comments · Fixed by #16347
Assignees
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@autoantwort
Copy link
Contributor

Describe the bug
I got the message:

CMake Error at scripts/cmake/vcpkg_copy_tool_dependencies.cmake:26 (message):
  Could not find PowerShell Core; please open an issue to report this.

Environment

  • OS: Linux (Docker Container with mxe)
  • Compiler: x86_64-w64-mingw32.shared.posix-gcc (GCC) 8.4.0

To Reproduce
Steps to reproduce the behavior:

  1. Use the mxe environment
  2. ./vcpkg install aubio --triplet=x64-linux-windows-static
  3. See error

Expected behavior
Do error

Failure logs
See here for additional logs (on the right you can browse through all files).

cat x64-linux-windows-static.cmake

# from https://stackoverflow.com/questions/58777810/how-to-integrate-vcpkg-in-linux-with-cross-build-toolchain-as-well-as-sysroot

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME MinGW)

set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE /usr/src/mxe/usr/x86_64-w64-mingw32.shared.posix/share/cmake/mxe-conf.cmake)

Additional context
Used vcpkg + #16051

@JackBoosY JackBoosY added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Feb 18, 2021
@longnguyen2004
Copy link
Contributor

Can you try installing pwsh on your Docker container before running vcpkg?
(see this link for more info)

@autoantwort
Copy link
Contributor Author

That worked 👍

@longnguyen2004
Copy link
Contributor

Probably needs some documentation update then. Do you know who to cc?

@autoantwort
Copy link
Contributor Author

I have created a PR

@longnguyen2004
Copy link
Contributor

Thanks for the PR!
It's nice seeing others help to maintain the mingw ports, seeing sfhacker everywhere is frustrating...

@JackBoosY
Copy link
Contributor

@longnguyen2004 Just ignore him.

@kxgy
Copy link

kxgy commented Feb 15, 2022

cmake -DMINGW:BOOL="TRUE" ...

@WentsingNee
Copy link
Contributor

cmake -DMINGW:BOOL="TRUE" ...

It works for me! Thank U

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants