Recent

Author Topic: Installing trunk or a very recent version  (Read 3846 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: Installing trunk or a very recent version
« Reply #15 on: March 07, 2023, 08:11:50 pm »
Same book, other operating system and what about Lazarus ? Do you install that there too ?
Imho, if the topic starter choose Forum/Installation/Linux, it is maybe about Linux and not Windows.
About Lazarus, I apologize, my posts are about fpc, I do only use Lazarus stable.

Completely off-topic of course, therefor apologies to topic starter. There is no intention to derail the thread.
Me too, sorry.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Installing trunk or a very recent version
« Reply #16 on: March 07, 2023, 08:37:20 pm »
Imho, if the topic starter choose Forum/Installation/Linux, it is maybe about Linux and not Windows.
To get back on topic, I just finished building Free Pascal 3.3.1 from Gitlab sources using the ppcx64 v3.2.2 compiler on a Linux x86_64 bit Debian (bookworm) based system.

Same should be possible to replicate on Windows.

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: Installing trunk or a very recent version
« Reply #17 on: March 07, 2023, 08:46:30 pm »
Same should be possible to replicate on Windows.

Here is the .bat file I use (but yes, using the fpc way, installed in "C:\FPC\x.x.x") :
Code: Pascal  [Select][+][-]
  1. make all FPC=C:\FPC\3.2.2\bin\i386-win32\ppc386.exe TARGET=i386-win32
  2. make FPC=C:\FPC\3.2.2\bin\i386-win32\ppc386.exe install INSTALL_PREFIX=C:\FPC\3.3.1

But maybe I did not get replicate on Windows, did you get the same error as OP installing on Debian ?
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Installing trunk or a very recent version
« Reply #18 on: March 07, 2023, 09:07:06 pm »
But maybe I did not get replicate on Windows, did you get the same error as OP installing on Debian ?
No, I did not get the same error as OP.

I was successful in building FPC trunk on Debian. In doing so I am unable to replicate OP's error.

My script also automatically compiles the infamous "hello world" example:
Code: [Select]
Free Pascal Compiler version 3.3.1 [2023/03/07] for x86_64
Copyright (c) 1993-2023 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling hello_world.pas
Linking hello_world.x86_64-linux
1 lines compiled, 0.0 sec, 141568 bytes code, 55936 bytes data

If I would translate your make command then it would probably look like:
Code: [Select]
make clean all install PP="/path/and/filename/to/v3.2.2/version/of/ppcx64" INSTALL_PREFIX="/path/to/where/to/install"
The clean is important, in order to make sure no remnants are left from an earlier compilation (but you can also achieve that by issuing the make command in a freshly created/cloned repository).
« Last Edit: March 07, 2023, 09:09:05 pm by TRon »

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: Installing trunk or a very recent version
« Reply #19 on: March 08, 2023, 09:41:59 am »
Hello.

3) Make this .sh script and save it in same directory as unzipped freepascal-main :

Code: Bash  [Select][+][-]
  1. #!/bin/sh
  2.  
  3. COMPILER=/path/of/fpc322/fpc       // with your path of fpc 3.2.2
  4.  
  5. make clean
  6. make all FPC=$COMPILER OPT="-Fl/usr/local/lib"
  7. make FPC=$COMPILER install INSTALL_PREFIX=/usr/


If you specify a compiler, the makefile adds ".exe" to the end:

Code: Text  [Select][+][-]
  1. frank@CarSys-WS-6021:~/projects/fpc/source$ make all FPC=/usr/bin/fpc
  2. Makefile:135: *** Compiler /usr/bin/fpc.exe not found.  Stop.
  3. frank@CarSys-WS-6021:~/projects/fpc/source$ make all FPC=/usr/bin
  4. Makefile:135: *** Compiler /usr/bin.exe not found.  Stop.
  5. frank@CarSys-WS-6021:~/projects/fpc/source$ make all FPC=/usr/bin/fpc.
  6. Makefile:135: *** Compiler /usr/bin/fpc..exe not found.  Stop.
Yes, I do run this in Linux (Ubuntu 22).


All the other suggestions are things I already posted not working.
« Last Edit: March 08, 2023, 09:18:31 pm by SymbolicFrank »

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: Installing trunk or a very recent version
« Reply #20 on: March 08, 2023, 09:49:10 am »
Hello.

3) Make this .sh script and save it in same directory as unzipped freepascal-main :

Code: Bash  [Select][+][-]
  1. #!/bin/sh
  2.  
  3. COMPILER=/path/of/fpc322/fpc       // with your path of fpc 3.2.2
  4.  
  5. make clean
  6. make all FPC=$COMPILER OPT="-Fl/usr/local/lib"
  7. make FPC=$COMPILER install INSTALL_PREFIX=/usr/

If you specify a compiler, the makefile adds ".exe" to the end:

Using the script too?

Very strange, I cannot reproduce it.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Installing trunk or a very recent version
« Reply #21 on: March 08, 2023, 09:09:28 pm »
As I wrote: use PP.

There is something very strange with OP's setup and you should avoid any ambiguity. Using the FPC executable instead of using the ppc compiler is able to mess with things (as OP has proven). Never does a FPC build add ".exe" in order to find an executable on Linux (unless somehow the makefiles are screwed up or some other configuration is influencing things).

But all the talk/postings is rather useless.

@ symbolic frank:
Show us how exactly you build things, including cloning of the github gitlab sources and downloading (or installing) the bootstrap compiler. It will be a guessing game otherwise. Oh, and show us the output of the build.
« Last Edit: March 08, 2023, 09:21:35 pm by TRon »

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: Installing trunk or a very recent version
« Reply #22 on: March 08, 2023, 09:21:51 pm »
As I wrote: use PP.

Thanks for the suggestion, but did you actually read the first post?

Quote
There is something very strange with OP's setup and you should avoid any ambiguity. Using the FPC executable instead of using the ppc compiler is able to mess with things (as OP has proven). Never does a FPC build add ".exe" in order to find an executable on Linux (unless somehow the makefiles are screwed up or some other configuration is influencing things).

But all the talk/postings is rather useless.

@ symbolic frank:
Show us how exactly you build things, including cloning of the github sources and downloading (or installing) the bootstrap compiler. It will be a guessing game otherwise. Oh, and show us the output of the build.

The next time I remove WSL2 / Ubuntu 22 / Docker Desktop and all the development environments I spend a week getting installed and start all over again, I will do that.

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Installing trunk or a very recent version
« Reply #23 on: March 08, 2023, 09:27:37 pm »
Thanks for the suggestion, but did you actually read the first post?
Yes i did and it does not tell us anything that is relevant.

Quote
The next time I remove WSL2 / Ubuntu 22 / Docker Desktop and all the development environments I spend a week getting installed and start all over again, I will do that.
There we go. It is not a ordinary Linux setup. Thus many influences that can mess things up but you neglected to inform about.

Still no answer on how you build things or a build log so again the posts you make are pointless wrt to try and help you further. Trying the FPC Deluxe route is not going to help you out either as DON Alfredo also has no clue about your setup (and for sure will not be able to fix that for you).

PS: did /you/ actually understood the output of your first post ?
Code: [Select]
frank@CarSys-WS-6021:~/projects/fpc/source$ make all
Makefile:3221: *** The only supported starting compiler version is 3.2.2. You are trying to build with 3.3.1..  Stop.
frank@CarSys-WS-6021:~/projects/fpc/source$ make all PP=/usr/bin/fpc
Makefile:135: *** Compiler /usr/bin/fpc.exe not found.  Stop.
What executable did you actually use for PP ? Again, use the ppcx64 executable instead. Just as your now revealed setup probably requires to be explicit for what platform you need to build.
« Last Edit: March 08, 2023, 09:51:56 pm by TRon »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Installing trunk or a very recent version
« Reply #24 on: March 08, 2023, 09:53:14 pm »
I don't know whether this is directly relevant but:

Code: [Select]
frank@CarSys-WS-6021:~/projects/fpc/source$ make all
Makefile:3221: *** The only supported starting compiler version is 3.2.2. You are trying to build with 3.3.1..  Stop.
frank@CarSys-WS-6021:~/projects/fpc/source$ make all PP=/usr/bin/fpc
Makefile:135: *** Compiler /usr/bin/fpc.exe not found.  Stop.

Depending on the version you're building, that message can be misleading. Looking at the makefile:

Code: Text  [Select][+][-]
  1. ifneq ($(FPC_VERSION),$(REQUIREDVERSION))
  2.   ifneq ($(FPC_VERSION),$(REQUIREDVERSION2))
  3.     ifndef OVERRIDEVERSIONCHECK
  4.         $(error The only supported starting compiler version is $(REQUIREDVERSION). You are trying to build with $(FPC_VERSION).)
  5.     else
  6.         @$(ECHO) You have overriden the starting compiler versioncheck while using starting compiler version $(FPC_VERSION). This situation is not supported and strange things and errors may happen. Remove OVERRIDEVERSIONCHECK=1 to fix this.
  7.     endif
  8.   endif
  9. endif
  10.  

So even if you're running $REQUIREDVERSION2, the message still refers to $REQUIREDVERSION.

I tried to raise this a few weeks ago, but was basically told to go and play somewhere else. Which is why I'm now a relatively infrequent visitor to the forum.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Installing trunk or a very recent version
« Reply #25 on: March 08, 2023, 10:52:17 pm »
The next time I remove WSL2 / Ubuntu 22 / Docker Desktop and all the development environments I spend a week getting installed and start all over again, I will do that.

For WSL special rules apply, you can't handle it just like an ordinary Linux. You need to adjust PATH so that it doesn't pick up Windows binaries. E.g. on my system the PATH by default looks like this:

Code: [Select]
[sven@Tayet ~]$ echo $PATH
~/fpc/3.2.2/bin:~/fpc/3.2.2/lib/fpc/3.2.2:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/lazarus/2.2/fpc/3.2.2/bin/x86_64-win64:/mnt/c/Program Files (x86)/Embarcadero/Studio/19.0/bin:/mnt/c/Users/Public/Documents/Embarcadero/Studio/19.0/Bpl:/mnt/c/Program Files (x86)/Embarcadero/Studio/19.0/bin64:/mnt/c/Users/Public/Documents/Embarcadero/Studio/19.0/Bpl/Win64:/mnt/c/Program Files (x86)/Intel/iCLS Client/:/mnt/c/Program Files/Intel/iCLS Client/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files/TortoiseSVN/bin:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/nodejs/:/mnt/c/FPC/3.2.2/bin/i386-Win32:/mnt/c/Users/Sven/AppData/Local/Programs/Python/Python37/Scripts/:/mnt/c/Users/Sven/AppData/Local/Programs/Python/Python37/:/mnt/c/Users/Sven/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/SDCC/bin:/mnt/c/Program Files/LLVM/bin:/mnt/c/Users/Sven/AppData/Roaming/npm:/mnt/c/Users/Sven/.dotnet/tools:/mnt/c/texlive/2022/bin/win32:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Especially the /mnt/c/lazarus/2.2/fpc/3.2.2/bin/x86_64-win64 part will lead to make.exe being picked up instead of Linux' make, thus I change the path to the following before executing make in WSL:

Code: [Select]
export PATH=~/fpc/3.2.2/bin:~/fpc/3.2.2/lib/fpc/3.2.2:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
You should adjust that to your own PATH of course.

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: Installing trunk or a very recent version
« Reply #26 on: March 08, 2023, 11:52:19 pm »
For WSL special rules apply, you can't handle it just like an ordinary Linux. You need to adjust PATH so that it doesn't pick up Windows binaries. E.g. on my system the PATH by default looks like this:
OK, thank you for that answer as that explains a few things.

Do you happen to know if it could be avoided to have to alter the path ? E.g. I was expecting that invoking the correct make executable (Linux version) would be enough for the makefile to pick up on the fact that the host is Linux (and not Windows). Unfortunately I do not have Windows and/or WSL to be able to verify myself.

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: Installing trunk or a very recent version
« Reply #27 on: March 09, 2023, 09:03:26 am »
For WSL special rules apply, you can't handle it just like an ordinary Linux. You need to adjust PATH so that it doesn't pick up Windows binaries.

Ah, that makes sense  :)

(Well, it doesn't, but that explains it ;) )

BrunoK

  • Sr. Member
  • ****
  • Posts: 452
  • Retired programmer
Re: Installing trunk or a very recent version
« Reply #28 on: March 09, 2023, 11:40:42 am »
Windows 10, FPC trunk cloned today.

Building i386 and x86_64 using 3.2.2 compiler, as expected -> NO PROBLEM

Rebuilding i386 and x86_64 using 3.3.1 compiler Without OVERRIDEVERSIONCHECK=1 at the end of the make clean all install ...,  as per initial post ->
Quote
Makefile:3221: *** The only supported starting compiler version is 3.2.2. You are trying to build with 3.3.1..  Stop.
WITH OVERRIDEVERSIONCHECK=1. In the message flow outputs warning ->
Quote
You have overriden the starting compiler versioncheck while using starting compiler version 3.3.1. This situation is not supported and strange things and errors may happen. Remove OVERRIDEVERSIONCHECK=1 to fix this.
Since at least FPC > 2.6.x, it has never caused trouble to rebuild the compiler, rtl, packages etc ... using a start compiler that is the same version as the new compiler, in the build cycle, the 3rd pass compiler actually compiles itself with itself.
Please correct me if I'm wrong.

I think the problem is that the starting compiler is not the one expected and that is probably caused by overuse of symlink in linux (This being my excessive, partial and personal point of view of course ;-) )

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: Installing trunk or a very recent version
« Reply #29 on: March 09, 2023, 12:12:17 pm »
A brief summary:
- do not use trunk, apart from testing
- do use the latest available stable release.

This has always been the case.
Do not digress.
No "yes, but.. "
No "if, but.."

There are far too many people trying to use trunk that have not the faintest clue what a trunk versions means and that is frankly bloody irritating.
« Last Edit: March 09, 2023, 12:15:53 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018