msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.31k stars 1.23k forks source link

Bootstrapping Free Pascal issues #4761

Open NebuHiiEjamu opened 5 years ago

NebuHiiEjamu commented 5 years ago

I'm trying to make a Free Pascal compiler package for MSYS2/MinGW-w64, however I've run into several issues since bootstrapping a non-GCC buildable compiler on MSYS2 is a royal pain.

I first tried making an fpc-bootstrap package which downloads a Win32 binary installer and uses Innoextract to unpack it. While the prebuilt compiler works with makepkg, everything is a mess and I think it would be easier to manually bootstrap it from a non-MSYS2 toolchain and then make a package using the resulting cross compiler. I'm not sure how mingw-w64-gcc itself was bootstrapped, but I reckon it was in a similar fashion.

Regardless of the presence of an FPC bootstrap package, if a full (non-bootstrap) binary package is made available to MSYS2's repos, it would be virtually unneeded anyway, even if someone wanted to re-bootstrap.

What should I do?

mati865 commented 5 years ago

IIRC mingw-w64-gcc was cross compiled from MSYS2-packages/mingw-w64-cross-gcc.

NebuHiiEjamu commented 5 years ago

Hmm... well I have a big "chicken or the egg" problem with this.

revelator commented 5 years ago

Hmm i have succesfully built the entire freepascall source with Mys2/MinGW32-64. Libraries and some other tools would need some reordering though if we intend to make it a pkgbuild, since by default the compiler installs into a subdir of bin dependant on what compiler was used to build it win32/amd64.

Biswa96 commented 3 years ago

innoextract package has been updated and it seems to work now. Try the 1.9-2 version.