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

Building on a Windows running inside a VM on an ARM Mac #562

Open
simonhamp opened this issue Nov 25, 2024 · 1 comment
Open

Building on a Windows running inside a VM on an ARM Mac #562

simonhamp opened this issue Nov 25, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed kind/php-and-sapi Issues related to php source and SAPI os/windows Things only for Windows

Comments

@simonhamp
Copy link
Contributor

When attempting to build PHP 8.3 in this environment I'm running into the following error(s):

[11:25:40] [INFO] [EXEC] C:\spc-build\static-php-cli\php-sdk-binary-tools\phpsdk-vs17-x64.bat -t C:\spc-build\static-php-cli\source\590894066_wrapper.bat --task-args "-B build -A x64 -DCMAKE_TOOLCHAIN_FILE=C:\spc-build\static-php-cli\source\toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_TESTING=OFF -DENABLE_ZLIB_COMPRESSION=ON -DCMAKE_INSTALL_PREFIX=C:\spc-build\static-php-cli\buildroot "
cd /d "C:\spc-build\static-php-cli\source/libssh2" && C:\spc-build\static-php-cli\php-sdk-binary-tools\phpsdk-vs17-x64.bat -t C:\spc-build\static-php-cli\source\590894066_wrapper.bat --task-args "-B build -A x64 -DCMAKE_TOOLCHAIN_FILE=C:\spc-build\static-php-cli\source\toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_TESTING=OFF -DENABLE_ZLIB_COMPRESSION=ON -DCMAKE_INSTALL_PREFIX=C:\spc-build\static-php-cli\buildroot "
[11:25:40] [DEBU] [PASSTHRU] cd /d "C:\spc-build\static-php-cli\source/libssh2" && C:\spc-build\static-php-cli\php-sdk-binary-tools\phpsdk-vs17-x64.bat -t C:\spc-build\static-php-cli\source\590894066_wrapper.bat --task-args "-B build -A x64 -DCMAKE_TOOLCHAIN_FILE=C:\spc-build\static-php-cli\source\toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_TESTING=OFF -DENABLE_ZLIB_COMPRESSION=ON -DCMAKE_INSTALL_PREFIX=C:\spc-build\static-php-cli\buildroot "
[ERROR:vcvarsall.bat] Invalid argument found : x64_amd64
[ERROR:vcvarsall.bat] Error in script usage. The correct usage is:
Syntax:
    vcvarsall.bat [arch] [platform_type] [winsdk_version] [-vcvars_ver=vc_version] [-vcvars_spectre_libs=spectre_mode]
where :
    [arch]: x86 | amd64 | x86_amd64 | x86_arm | x86_arm64 | amd64_x86 | amd64_arm | amd64_arm64
    [platform_type]: {empty} | store | uwp
    [winsdk_version] : full Windows 10 SDK number (e.g. 10.0.10240.0) or "8.1" to use the Windows 8.1 SDK.
    [vc_version] : {none} for latest installed VC++ compiler toolset |
                   "14.0" for VC++ 2015 Compiler Toolset |
                   "14.xx" for the latest 14.xx.yyyyy toolset installed (e.g. "14.11") |
                   "14.xx.yyyyy" for a specific full version number (e.g. "14.11.25503")
    [spectre_mode] : {none} for libraries without spectre mitigations |
                     "spectre" for libraries with spectre mitigations

The store parameter sets environment variables to support Universal Windows Platform application
development and is an alias for 'uwp'.

For example:
    vcvarsall.bat x86_amd64
    vcvarsall.bat x86_amd64 10.0.10240.0
    vcvarsall.bat x86_arm uwp 10.0.10240.0
    vcvarsall.bat x86_arm onecore 10.0.10240.0 -vcvars_ver=14.0
    vcvarsall.bat x64 8.1
    vcvarsall.bat x64 store 8.1

Please make sure either Visual Studio or C++ Build SKU is installed.
link: missing operand after '/?'
Try 'link --help' for more information.
'cmake' is not recognized as an internal or external command,
operable program or batch file.
@crazywhalecc crazywhalecc added bug Something isn't working kind/php-and-sapi Issues related to php source and SAPI os/windows Things only for Windows labels Dec 1, 2024
@crazywhalecc
Copy link
Owner

I have never tested compiling on Windows on Arm64 (either host or VM), and I have not added any support for cross-compilation.

Maybe it is possible to compile an Arm version of static-php directly, but I am not sure whether the dependent libraries support this new architecture.

@crazywhalecc crazywhalecc self-assigned this Dec 5, 2024
@crazywhalecc crazywhalecc added help wanted Extra attention is needed and removed bug Something isn't working labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/php-and-sapi Issues related to php source and SAPI os/windows Things only for Windows
Projects
None yet
Development

No branches or pull requests

2 participants