TLDR (core questions):
- what are the minimum necessary components to install in visual studio community 2017 to compile a php 7.4 extension?
- how to compile the extension https://github.com/openvenues/php-postal for php 7.4 on windows for an old window7 pc?
- do i need windows7 sdk to be able to run the extension on an old windows7 computer?
- is it possible to compile a windows extension (dll) on a linux computer? docker? (i am really looking for an alternative where i don't have to download so big apps only to get a cli compiler.)
- after installing visual studio 2017 in a minimum variant i only have
Developer Command Prompt for VS 2017and noVS2015 x64 Native Tools Command Promptas stated in https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
i ask the question here because the visual studio downloader is terrible slow (so no easy download install/uninstall test), the requirement for registration everywhere (including phone number) to access resources and downloads, the unavailablilty of resources for older operation systems or program versions and the undetailed manuals i found.
long story:
with trying to compile php-postal https://github.com/openvenues/php-postal as windows php extension i took a quite time consuming journey with no end in sight, maybe someone can help. my plan would be to make a merge request to update the build manual with my findings.
i followed the manual from the php wiki https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
which tells me that it's not supported to compile php 7.4 with visual studio 2019.
Visual C++ 14.0 (Visual Studio 2015) for PHP 7.0 or PHP 7.1.
Visual C++ 15.0 (Visual Studio 2017) for PHP 7.2, PHP 7.3 or PHP 7.4.
Visual C++ 16.0 (Visual Studio 2019) for master.
having a closer look on the supported versions link https://wiki.php.net/internals/windows/compiler
Visual C++ 14.00 (2015)
Visual C++ 14.10 (2017)
Visual C++ 14.20 (2019)
tells me, that it should work with visual studio 2019, so i tried to install visual studio 2019 but it really has quite a lot of components. which one to install? i tried to pick the components which sound most plausible and tried to keep to an absolute minimum.
then i head over to https://github.com/Microsoft/php-sdk-binary-tools to download the php-sdk
i tried to run it with my picked components and failed, then i wanted to switch to visual studio 2017 to be as close as possible to the manual. next problem was, that microsoft requires me to create an account to download the older visual studio version. sidestory then they locked my old account, because i tried to login having uMatrix and uBlock on, which i disabled part for part only to get to an account locked page. where is my wget https://microsoft.com/vs/vccompiler2015.zip which works even if the version is not supported any more.
the DX (developer experience) is really awful. to unlock they want my phone number. why?! then i noticed that i can install visual studio 2017 with the webinstaller from visual studio 2019. so no account needed any more. should i mention that before i was able to uninstall visual studio 2019 i had to update it. the 70mb file to download took me 4hours (3 times the download was stopped and then i waited for 2hours then it worked. slow but it worked. in the time i download a 70mb file from microsoft to uninstall an application i download a 30gb game from steam and also have some levels finished)
after the deinstallation of vs 2019 i installed vs 2017 with the following components:
C# and Visual Basic Roslyn compilers
MSBuild
Static analysis tools
.NET Framework 4.6.1 SDK
.NET Framework 4.6.1 targeting pack
Text Template Transformation
Visual Studio C++ core features
Visual C++ 2017 Redistributable Update
Visual C++ core desktop features
VC++ 2017 version 15.9 v14.16 latest v141 tools
C++/CLI support
VC++ 2017 version 15.4 v14.11 toolset
on https://github.com/Microsoft/php-sdk-binary-tools there the following requirements are listed:
Visual C++ 2017 or Visual C++ 2019 must be installed prior SDK usage. Required components
C++ dev
Windows SDK
.NET dev
- what is "C++ dev" is it "VC++ 2017 version 15.9 v14.16"? something else?
- which .net dev is required? why i need .net for a c php extension?
- what about the windows sdk?
vs 2017 installer shows only the following sdks:
Windows 10 SDK (10.0.17763.0)
Windows 8.1 SDK
so windows7 support is over and so microsoft decided to remove all diver and all stuff? sadly the extension must run on an old windows7 pc, so can i compile such an extension on the old windows 7 pc itself? is it possible to compile it on my windows 10 workstation without having a windows 7 sdk?
full list of visual studio 2017 components from the 2019 web installer:
.NET
.NET Core runtime
.NET Framework 3.5 development tools
.NET Framework 4 targeting pack
.NET Framework 4.5 targeting pack
.NET Framework 4.5.1 targeting pack
.NET Framework 4.5.2 targeting pack
.NET Framework 4.6 targeting pack
.NET Framework 4.6.1 SDK
.NET Framework 4.6.1 targeting pack
.NET Framework 4.7 SDK
.NET Framework 4.7 targeting pack
.NET Framework 4.7.1 SDK
.NET Framework 4.7.1 targeting pack
.NET Framework 4.7.2 SDK
.NET Framework 4.7.2 targeting pack
.NET Native
.NET Portable Library targeting pack
Advanced ASP.NET features
Cloud, database, and server
Azure Authoring Tools
Azure Cloud Services build tools
Azure Cloud Services core tools
Azure Compute Emulator
Azure Data Lake and Stream Analytics Tools
Azure development prerequisites
Azure libraries for .NET
Azure Mobile Apps SDK
Azure Resource Manager core tools
Azure Storage AzCopy
Azure Storage Emulator
Cloud Explorer
CLR data types for SQL Server
Connectivity and publishing tools
Container development tools
Container development tools - Build Tools
Data sources and service references
Data sources for SQL Server support
IIS Express
Microsoft Azure WebJobs Tools
Redgate SQL Search
Service Fabric Tools
SQL ADAL runtime
SQL Server Command Line Utilities
SQL Server Data Tools
SQL Server Express 2016 LocalDB
SQL Server Native Client
Web Deploy
Code tools
Class Designer
ClickOnce Publishing
Dependency Validation
Developer Analytics tools
DGML editor
Git for Windows
GitHub extension for Visual Studio
Help Viewer
LINQ to SQL tools
NuGet package manager
NuGet targets and build tasks
PreEmptive Protection - Dotfuscator
Static analysis tools
Text Template Transformation
Compilers, build tools, and runtimes
.NET Compiler Platform SDK
C# and Visual Basic Roslyn compilers
C++ Universal Windows Platform tools for ARM64
C++/CLI support
Clang/C2 (experimental)
IncrediBuild - Build Acceleration
Modules for Standard Library (experimental)
MSBuild
Python 2 32-bit (2.7.14)
Python 2 64-bit (2.7.14)
Python 3 32-bit (3.6.6)
Python 3 64-bit (3.6.6)
Runtime for components based on Node.js v6.4.0 (x86)
Runtime for components based on Node.js v7.4.0 (x86)
Runtime support for R development tools
VC++ 2015.3 v14.00 (v140) toolset for desktop
VC++ 2017 version 15.4 v14.11 toolset
VC++ 2017 version 15.5 v14.12 toolset
VC++ 2017 version 15.6 v14.13 toolset
VC++ 2017 version 15.7 v14.14 toolset
VC++ 2017 version 15.8 v14.15 toolset
VC++ 2017 version 15.9 v14.16 latest v141 tools
VC++ 2017 version 15.9 v14.16 Libs for Spectre (ARM)
VC++ 2017 version 15.9 v14.16 Libs for Spectre (ARM64)
VC++ 2017 version 15.9 v14.16 Libs for Spectre (x86 and x64)
Visual C++ 2017 Redistributable Update
Visual C++ compilers and libraries for ARM
Visual C++ compilers and libraries for ARM64
Visual C++ runtime for UWP
Visual C++ tools for CMake
Windows Universal CRT SDK
Windows XP support for C++
Debugging and testing
.NET profiling tools
C++ profiling tools
JavaScript diagnostics
Just-In-Time debugger
Test Adapter for Boost.Test
Test Adapter for Google Test
Testing tools core features
WebSocket4Net
Development activities
ASP.NET and web development tools
C# and Visual Basic
C++ Android development tools
C++ iOS development tools
Cookiecutter template support
Embedded and IoT Development
F# desktop language support
F# language support
F# language support for web projects
JavaScript and TypeScript language support
JavaScript ProjectSystem and Shared Tooling
Microsoft R Client (3.3.2)
Mobile development with JavaScript core features
Node.js development support
Node.js MSBuild support
Office Developer Tools for Visual Studio
Python IoT support
Python language support
Python web support
R language support
Razor Language Services
Visual C++ for Linux Development
Visual C++ tools for CMake and Linux
Visual Studio C++ core features
Visual Studio Tools for Office (VSTO)
Windows Communication Foundation
Windows Workflow Foundation
Xamarin
Xamarin Remoted Simulator
Xamarin Workbooks
Emulators
Google Android Emulator (API Level 23) (global install)
Google Android Emulator (API Level 23) (local install)
Google Android Emulator (API Level 25)
Google Android Emulator (API Level 27)
Intel Hardware Accelerated Execution Manager (HAXM) (global install)
Intel Hardware Accelerated Execution Manager (HAXM) (local install)
Games and Graphics
Cocos
Graphics debugger and GPU profiler for DirectX
Image and 3D model editors
Unity 2018.3 64-bit Editor
Unreal Engine installer
Visual Studio Android support for Unreal Engine
Visual Studio Tools for Unity
SDKs, libraries, and frameworks
Anaconda2 32-bit (5.2.0)
Anaconda2 64-bit (5.2.0)
Anaconda3 32-bit (5.2.0)
Anaconda3 64-bit (5.2.0)
Android NDK (R11C)
Android NDK (R11C) (32bit)
Android NDK (R12B)
Android NDK (R12B) (32bit)
Android NDK (R13B)
Android NDK (R13B) (32bit)
Android NDK (R15C)
Android NDK (R15C) (32bit)
Android SDK setup (API level 19) (local install for Mobile development with JavaScript / C++)
Android SDK setup (API level 21) (local install for Mobile development with JavaScript / C++)
Android SDK setup (API level 22) (local install for Mobile development with JavaScript / C++)
Android SDK setup (API level 23) (global install)
Android SDK setup (API level 23) (local install for Mobile development with JavaScript / C++)
Android SDK setup (API level 25)
Android SDK setup (API level 25) (local install for Mobile development with JavaScript / C++)
Android SDK setup (API level 27)
Apache Ant (1.9.3)
Blend for Visual Studio SDK for .NET
Cordova 6.3.1 toolset
Entity Framework 6 tools
Graphics Tools Windows 8.1 SDK
Microsoft distribution OpenJDK
Modeling SDK
TypeScript 2.0 SDK
TypeScript 2.1 SDK
TypeScript 2.2 SDK
TypeScript 2.3 SDK
TypeScript 2.5 SDK
TypeScript 2.6 SDK
TypeScript 2.7 SDK
TypeScript 2.8 SDK
TypeScript 2.9 SDK
TypeScript 3.0 SDK
TypeScript 3.1 SDK
USB Device Connectivity
Visual C++ ATL (x86/x64) with Spectre Mitigations
Visual C++ ATL for ARM
Visual C++ ATL for ARM with Spectre Mitigations
Visual C++ ATL for ARM64
Visual C++ ATL for ARM64 with Spectre Mitigations
Visual C++ ATL for x86 and x64
Visual C++ MFC for ARM
Visual C++ MFC for ARM with Spectre Mitigations
Visual C++ MFC for ARM64
Visual C++ MFC for x86 and x64
Visual C++ MFC for x86/x64 with Spectre Mitigations
Visual C++ MFC support for ARM64 with Spectre Mitigations
Visual Studio SDK
Windows 10 SDK (10.0.10240.0)
Windows 10 SDK (10.0.10586.0)
Windows 10 SDK (10.0.14393.0)
Windows 10 SDK (10.0.15063.0) for Desktop C++ [x86 and x64]
Windows 10 SDK (10.0.15063.0) for UWP: C#, VB, JS
Windows 10 SDK (10.0.15063.0) for UWP: C++
Windows 10 SDK (10.0.16299.0) for Desktop C++ [ARM and ARM64]
Windows 10 SDK (10.0.16299.0) for Desktop C++ [x86 and x64]
Windows 10 SDK (10.0.16299.0) for UWP: C#, VB, JS
Windows 10 SDK (10.0.16299.0) for UWP: C++
Windows 10 SDK (10.0.17134.0)
Windows 10 SDK (10.0.17763.0)
Windows 8.1 SDK
Windows Universal C Runtime