Recent

Author Topic: [SOLVED] Bootstrapping a new version of FPC (here 3.3.1) with all tools  (Read 2255 times)

AxBen

  • New Member
  • *
  • Posts: 17
Hi, I'm new to FPC and would like to compile a new version (fpc, fpcmake, ppdump, etc) from the sources (or not - see below) for Windows 64.

I see that updates are here (http://downloads.freepascal.org/fpc/snapshot/v33/x86_64-win64/README-fpc-3.3.1.x86_64-win64.built.on.x86_64-linux).
I can extract the above file over an existing FPC 3.2.2 installation, but some files are missing; however, using ppcrossx64, I'm able to compile my code - but this is most certainly not the preferred solution(?).

Will I need to compile (how?) the rest of the tools, or is there an analogous download for the "delta"?
« Last Edit: March 01, 2024, 08:52:24 am by AxBen »

Thaddy

  • Hero Member
  • *****
  • Posts: 16320
  • Censorship about opinions does not belong here.
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #1 on: February 27, 2024, 07:21:23 pm »
you will need 3.2.0 or 3.2.2 to bootstrap the main/trunk compiler.
AND YOU SHOULD NOT DO IT ANY DIFFERENT. Always use the previous compiler version to bootstrap a current one.

Best way for people who are new is to use fpcupdeluxe which is cross platform.

BTW: 3.2.2 is the current release compiler, so do not start with main/trunk. It is officially not stable.
3.2.3 is allowed  :D
« Last Edit: February 27, 2024, 07:25:17 pm by Thaddy »
There is nothing wrong with being blunt. At a minimum it is also honest.

TRon

  • Hero Member
  • *****
  • Posts: 3756
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #2 on: February 27, 2024, 07:36:06 pm »
Hello and welcome AxBen,

I can extract the above file over an existing FPC 3.2.2 installation, but some files are missing; however, using ppcrossx64, I'm able to compile my code - but this is most certainly not the preferred solution(?).
In that case you would have to tell more. ppcrossx64 is only used when you cross-compile.... why should you do/use that when you have FPC 64-bit installed ?

Quote
Will I need to compile (how?) the rest of the tools, or is there an analogous download for the "delta"?
See also buildfaq (though it is a bit outdated the main rules still apply).

You check out the latest sources either from gitlab or github (you can also download the archived version), extract that and use make to build the compiler.

As Thaddy mentioned you need a bootstrap compiler as well as the basic tools (make, binutils  etc) in order to be able to make the build.
I do not have to remember anything anymore thanks to total-recall.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11981
  • FPC developer.
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #3 on: February 27, 2024, 07:54:08 pm »
FPC currently only distributes the crosscompiler afaik.

AxBen

  • New Member
  • *
  • Posts: 17
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #4 on: February 27, 2024, 07:56:30 pm »
Thx for the answers so far; but... ;-)

@TRon
Quote
why should you do/use that when you have FPC 64-bit installed
Well, I'm under the impression that there's not native 64-bit fpc.exe for 3.2.2. The installer lets me install the 64-bit version but, as it turns out, there's just the cross-compiler that allows me to create 64-bit output (maybe I'm completely blind though...). fpc.exe is x86 and after the installation there's only a "bin\i386-win32" directory.

@Thaddy
Would you please tell me where I can find fpcupdeluxe (and a little bit more on the installation/update process itself)?

TRon

  • Hero Member
  • *****
  • Posts: 3756
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #5 on: February 27, 2024, 07:56:41 pm »
FPC currently only distributes the crosscompiler afaik.
Ah, that I did not know. That does explain the existence of the cross-compiler  :D
I do not have to remember anything anymore thanks to total-recall.

TRon

  • Hero Member
  • *****
  • Posts: 3756
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #6 on: February 27, 2024, 07:58:45 pm »
@TRon
Quote
why should you do/use that when you have FPC 64-bit installed
Well, I'm under the impression that there's not native 64-bit fpc.exe for 3.2.2. The installer lets me install the 64-bit version but, as it turns out, there's just the cross-compiler that allows me to create 64-bit output (maybe I'm completely blind though...). fpc.exe is x86 and after the installation there's only a "bin\i386-win32" directory.
Yes, sorry my bad  :-[

Marcov explained in his post that as far as he knows only the cross-compiler is distributed for windows.
I do not have to remember anything anymore thanks to total-recall.

cdbc

  • Hero Member
  • *****
  • Posts: 1753
    • http://www.cdbc.dk
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

TRon

  • Hero Member
  • *****
  • Posts: 3756
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #8 on: February 27, 2024, 08:14:02 pm »
A good suggestion cdbc... but what if TS wanted to try and do it manually to get himself acquainted with the build-process ?  ;)
I do not have to remember anything anymore thanks to total-recall.

cdbc

  • Hero Member
  • *****
  • Posts: 1753
    • http://www.cdbc.dk
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #9 on: February 27, 2024, 08:29:25 pm »
Hi
He asked for it
Quote
@Thaddy
Would you please tell me where I can find fpcupdeluxe (and a little bit more on the installation/update process itself)?
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

AxBen

  • New Member
  • *
  • Posts: 17
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #10 on: February 27, 2024, 08:47:42 pm »
@cdbc, TRon

I take it that fpcupdeluxe (as suggested by thaddy) is a tool external to the "normal" build chain.
Taking this into consideration, what would be the alternative to get to an "install-like" installation of 3.3.1?

What I did:

- Installed fpc-3.2.2.win32.and.win64.exe (selecting only the 64-bit compiler).
- Ran into problems with Unicode directory names (like "Außenästhet" or "Калимов") in conjunction with ParamStr().
- Decided to look for FPC 3.3.1 => found fpc-3.3.1.x86_64-win64.built.on.i386-win32.zip.
- Delta-copied it to the installation branch.
- I am able to cross-compile for x64 and see Unicode directory names now with ParamStr().
- However, there's a problem with FindFirst() (cmp. https://forum.lazarus.freepascal.org/index.php/topic,66405.0.html).
- Thought, my installation is "invalid"...

So, basically I would like to have a "clean" installation of 3.3.1 (or a recipe for it).

TRon

  • Hero Member
  • *****
  • Posts: 3756
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #11 on: February 27, 2024, 08:58:23 pm »
So, basically I would like to have a "clean" installation of 3.3.1 (or a recipe for it).
Assuming you wish to create the 64-bit compiler for your windows machine:
- download and install the fpc 3.2.2 distribution compiler (does not matter if it 32- or 64-bit)
- download the trunk sources from github/gitlab and extract them
- use make in the root of your extracted source-code archive to build the compiler, use the buildfaq mentioned earlier to get acquainted with the build options. In case you use the 32-bit compiler as bootstrap compile then you need to cross-compile and in case using the 64-bit compiler you are building a native compiler.
- install and configure the compiler to a suitable location (copying files will do but you can use the make install option

That should be about it. Also note all the wiki articles about building a compiler from source (there are literally too many to mention) this link is a good starting point.

Whenever there is something missing, make will tell you what is missing and in case of an error will tell you what the error is. Just post the (last part of the) output in such case (along with the build parameters). Again, be sure to read/understand the buildfaq  :)
« Last Edit: February 27, 2024, 09:04:36 pm by TRon »
I do not have to remember anything anymore thanks to total-recall.

TRon

  • Hero Member
  • *****
  • Posts: 3756
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #12 on: February 27, 2024, 09:09:57 pm »
He asked for it
Drats, you are correct... Too many posts in too less time got me mixing things  :-[ .... at least there is the comment in the brackets that I can hold on to  :)

regards
I do not have to remember anything anymore thanks to total-recall.

paweld

  • Hero Member
  • *****
  • Posts: 1278
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #13 on: February 28, 2024, 06:05:36 am »
Would you please tell me where I can find fpcupdeluxe (and a little bit more on the installation/update process itself)?
https://www.blaisepascalmagazine.eu/en/fpcupdeluxe-install-lazarus-stable-trunk-cross-compiling-raspberrypi-versions/
Best regards / Pozdrawiam
paweld

AxBen

  • New Member
  • *
  • Posts: 17
Re: Bootstrapping a new version of FPC (here 3.3.1) with all tools
« Reply #14 on: February 28, 2024, 08:09:41 am »
@TRon
Thx for the instructions. Will try my very best ;-)

 

TinyPortal © 2005-2018