awslabs / aws-crt-php

Apache License 2.0
322 stars 13 forks source link

PECL builds for Windows fail #33

Closed cmb69 closed 1 year ago

cmb69 commented 3 years ago

Describe the bug

Although PECL/awscrt 1.0.0 has a config.w32 (and as such Windows seems to be supported), the PECL builds failed. This is because the aws-crt-ffi submodule is not contained in the package.

As I understand it, aws-crt-ffi is a library, and usually dependency libraries of PECL packages are prebuilt and rolled out to the Windows PECL build machine, and then configured in config.w32. Alternatively, the sources of the aws-crt-ffi submodule could be contained in (or downloaded via) the PECL package.

TingDaoK commented 1 year ago

Hi, I am currently working on the PECL build. I don't really understand why the windows build failed.

Do you know how PECL builds the package for windows?

For the issue you mentioned, I don't think that's the cause if PECL pick up the tar gz file we provided here. If you download the zip file, you will see that we have the source code of aws-crt-ffi included in the zip file. But, TBH, I know very little about PECL, and I think they are really poor documented, so, if you know better, please let me know, thank you!

TingDaoK commented 1 year ago

Oh, I believe that's probably too old and we already fixed it.

Our later release actually have more logs from PECL, https://windows.php.net/downloads/pecl/releases/awscrt/1.0.9/logs/

However, the issue from log doesn't seem to related to us at all...

-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/php-snap-build/php-src/php81/x64/php-src/ext/awscrt/build/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/Bin/MSBuild.exe cmTC_d439c.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.

      Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30138 for x64
      Copyright (C) Microsoft Corporation.  All rights reserved.
      testCCompiler.c
      cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_d439c.dir\Debug\\" /Fd"cmTC_d439c.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\php-snap-build\php-src\php81\x64\php-src\ext\awscrt\build\CMakeFiles\CMakeTmp\testCCompiler.c"
    LINK : fatal error LNK1181: cannot open input file 'C:\php-snap-build\obj\8.1-ts-windows-vs16-x64\Release_TS\Zend\jump_x86_64_ms_pe_masm.obj' [C:\php-snap-build\php-src\php81\x64\php-src\ext\awscrt\build\CMakeFiles\CMakeTmp\cmTC_d439c.vcxproj]

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)
TingDaoK commented 1 year ago

this is too old and I think we have fixed the issue? Let us know if it's still not working with the latest version

TingDaoK commented 1 year ago

closing due to inactivity