* * *

Author Topic: Feature Request: Support building FPC on MSYS2 on Windows (as mingw-w64-fpc)  (Read 2456 times)

Adsun701

  • Newbie
  • Posts: 3
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

  • Hero Member
  • *****
  • Posts: 808
    • Burdjia
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.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Adsun701

  • Newbie
  • Posts: 3
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]
  1. pacman -S mingw-w64-x86_64-fpc

And they don't need to use a separate installer.

Andrew Sun

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6534
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

  • Hero Member
  • *****
  • Posts: 808
    • Burdjia
The 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.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Akira1364

  • Sr. Member
  • ****
  • Posts: 362
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.

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]
  1. 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?
« Last Edit: November 19, 2017, 12:34:07 am by Akira1364 »

Adsun701

  • Newbie
  • Posts: 3
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.

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]
  1. 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

  • Sr. Member
  • ****
  • Posts: 362
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.

Yeah, that's what I was saying.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus