Feature Request: Support building FPC on MSYS2 on Windows (as mingw-w64-fpc) lazarus / 64-FPC development ---------------------------------------------------------------------- Adsun701 · 2017-11-09 13:30 Hi everyone, I contribute regularly to MSYS2, a Arch-Linux-like development environment on Windows that provides both POSIX-compatible utilities and native Windows toolchains via packages. I was wondering if FPC could be built with MSYS2's mingw-w64 toolchain; specifically I would like to create a mingw-w64-fpc PKGBUILD for MSYS2's MINGW-packages repository. I know that currently only binutils on cmd.exe is used to build FPC on Windows, but would it be possible to modify FPC's makefiles so it could compile on MSYS2? Thanks. Andrew Sun ---------------------------------------------------------------------- Ñuño_Martínez · 2017-11-09 16:56 I use MSYS on my old Windows XP for years and I can use FPC without any problem.  Just added the PATH (at your computer "Properties") and it work seamlessly. ---------------------------------------------------------------------- Adsun701 · 2017-11-09 17:39 That's actually a popular practice: Users sometimes use a separate gcc build from a download and add it to their path, rather than using the provided gcc package. I totally understand what you mean, but I want users to be able to use fpc on MSYS2 by using this command: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i pacman -S mingw-w64-x86_64-fpc And they don't need to use a separate installer. Andrew Sun ---------------------------------------------------------------------- marcov · 2017-11-09 18:42 The FPC makefiles seek their own utils, but you can often pass your own equivalents by passing environment variables (PWD=) I don't know about anybody working on building under unix emulations on Windows though. So it is hard to say what is needed, and if non trivial, who would do it. Note please don't submit modified makefiles. Changes should be made to makefile.fpc's and the main template utils/fpcm/fpcmake.ini ---------------------------------------------------------------------- Ñuño_Martínez · 2017-11-15 12:30 Quote from: marcov on November 09, 2017, 07:42:09 pmThe FPC makefiles seek their own utils, but you can often pass your own equivalents by passing environment variables (PWD=) Yep, that was an issue at the beginning but right now it is solved.  Just playing with Windows' PATH variable and a few FPC configuration tweaking and done.  Not too hard IIRC. ---------------------------------------------------------------------- Akira1364 · 2017-11-18 16:36 The Lazarus/FPC makefiles are already compatible with MinGW-W64 Make on Windows, just so you know... I've been using the builds of Make/Strip/Strings/e.t.c from the Nuwen MingW distribution instead of the FPC-provided ones for several years without any issues. Quote from: Adsun701 on November 09, 2017, 06:39:07 pmI totally understand what you mean, but I want users to be able to use fpc on MSYS2 by using this command: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i pacman -S mingw-w64-x86_64-fpc And they don't need to use a separate installer. Isn't that just a matter of bundling any version of FPC you want into whatever archive format Pacman expects, and uploading it to the package repository? ---------------------------------------------------------------------- Adsun701 · 2017-11-23 18:16 Quote from: Akira1364 on November 18, 2017, 05:36:07 pmThe Lazarus/FPC makefiles are already compatible with MinGW-W64 Make on Windows, just so you know... I've been using the builds of Make/Strip/Strings/e.t.c from the Nuwen MingW distribution instead of the FPC-provided ones for several years without any issues. Quote from: Adsun701 on November 09, 2017, 06:39:07 pmI totally understand what you mean, but I want users to be able to use fpc on MSYS2 by using this command: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i pacman -S mingw-w64-x86_64-fpc And they don't need to use a separate installer. Isn't that just a matter of bundling any version of FPC you want into whatever archive format Pacman expects, and uploading it to the package repository? The package would have to be compiled from source, and packaged into the archive via makepkg (specifically makepkg-mingw for mingw-w64-fpc), using only MSYS2 and their mingw-w64-binutils. It actually turns out that FPC requires mingw-w64-make (mingw32-make, not the MSYS2 version of make). I tested the build and it works now without modifications. Will plan to add the package to the official MSYS2 package repository. Andrew Sun ---------------------------------------------------------------------- Akira1364 · 2017-11-30 00:33 Quote from: Adsun701 on November 23, 2017, 07:16:32 pmIt actually turns out that FPC requires mingw-w64-make (mingw32-make, not the MSYS2 version of make). I tested the build and it works now without modifications. Will plan to add the package to the official MSYS2 package repository. Yeah, that's what I was saying.