Recent

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

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1315
Installing trunk or a very recent version
« on: March 07, 2023, 03:38:58 pm »
I made some extensions that are in trunk, but not in the latest .deb I could find (for Ubuntu 22 x86_64). So: clone and build. Which I cannot get to work. Fpcupdeluxe to the rescue, but it crashes.

My current problem:

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.

Under Windows, it's PP. Yes, /usr/bin/fpc is the right one:

Code: [Select]
frank@CarSys-WS-6021:/usr/bin$ ./fpc
Free Pascal Compiler version 3.2.2+dfsg-9ubuntu1 [2022/04/11] for x86_64

« Last Edit: March 07, 2023, 04:58:44 pm by SymbolicFrank »

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Installing trunk or a very recent version
« Reply #1 on: March 07, 2023, 04:12:26 pm »
What output gives:
Code: Pascal  [Select][+][-]
  1. fpc -iV
Of course, you need 3.2.2 to compile 3.3.1
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Thaddy

  • Hero Member
  • *****
  • Posts: 19143
  • Glad to be alive.
Re: Installing trunk or a very recent version
« Reply #2 on: March 07, 2023, 04:29:09 pm »
Did you add --Backports?
« Last Edit: March 07, 2023, 04:31:10 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1315
Re: Installing trunk or a very recent version
« Reply #3 on: March 07, 2023, 04:52:23 pm »
What output gives:
Code: Pascal  [Select][+][-]
  1. fpc -iV
Of course, you need 3.2.2 to compile 3.3.1

Code: [Select]
frank@CarSys-WS-6021:~/projects/fpc/source$ fpc -iV
3.2.2
« Last Edit: March 07, 2023, 04:54:19 pm by SymbolicFrank »

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1315
Re: Installing trunk or a very recent version
« Reply #4 on: March 07, 2023, 04:53:59 pm »
Did you add --Backports?

Code: [Select]
frank@CarSys-WS-6021:~/projects/fpc/source$ make all --Backports
make: unrecognized option '--Backports'

BrunoK

  • Hero Member
  • *****
  • Posts: 766
  • Retired programmer
Re: Installing trunk or a very recent version
« Reply #5 on: March 07, 2023, 04:58:32 pm »
Maybe try adding
Quote
OVERRIDEVERSIONCHECK=1
to the make command and look if the compiler build can fully cycle to a valid state.

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1315
Re: Installing trunk or a very recent version
« Reply #6 on: March 07, 2023, 05:01:33 pm »
Maybe try adding
Quote
OVERRIDEVERSIONCHECK=1
to the make command and look if the compiler build can fully cycle to a valid state.

Code: [Select]
Error: Incompatible type for arg no. 2: Got "AnsiString", expected "PChar"
classes.pp(91) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted


I made the first post a bit more clear. I did read the wiki, but that assumes it simply works.

BrunoK

  • Hero Member
  • *****
  • Posts: 766
  • Retired programmer
Re: Installing trunk or a very recent version
« Reply #7 on: March 07, 2023, 05:27:19 pm »
My WINDOWS make command for FPC makecycle is :
Quote
%make%  clean all install %FPMAKEOPT% OS_TARGET=%TargetOs% CPU_TARGET=%TargetCpu% INSTALL_PREFIX=%FPC_INST_DIR% PP=%FPC_EXE%  OPT="-O1 -OoREGVAR" DATA2INC=%myFPC%\utils\data2inc.exe OVERRIDEVERSIONCHECK=1
between %xxxx% are preset environment values.

I haven't worked with linux for a long time but if I remember well, the batch file was very similar.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Installing trunk or a very recent version
« Reply #8 on: March 07, 2023, 06:41:43 pm »
My current problem:

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.

Under Windows, it's PP. Yes, /usr/bin/fpc is the right one:
The error indicates that somehow on your system it finds another installed version of Free Pascal and uses that to build the sources form trunk. That is if you are sure that the one in /usr/bin/fpc is the right version (3.2.2)

Add the make option PP=/path/and/name/to/ppc or fpc

(I would opt for using the ppc executable as you seem to have multiple installations lingering on your system and using the fpc executable might be able to locate the wrong ppc compiler).

edit: using the version check override is not recommended unless knowing what you are doing.
« Last Edit: March 07, 2023, 06:51:50 pm by TRon »
Today is tomorrow's yesterday.

Fred vS

  • Hero Member
  • *****
  • Posts: 3919
    • StrumPract is the musicians best friend
Re: Installing trunk or a very recent version
« Reply #9 on: March 07, 2023, 07:00:32 pm »
Hello.

Here are the steps I use and never got problems:

1) Download fpc trunk/main from there: https://gitlab.com/freepascal.org/fpc/source/-/archive/main/source-main.zip

2) Unzip it somewhere, for example /home/You/Downloads/freepascal-main/.

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/

[EDIT] You may remove the last line and choose the install directory you want after compilation is OK.
            In that case the script dont need sudo right.

4) In terminal go in unzipped freepascal-main directory and run the script with sudo right.
« Last Edit: March 07, 2023, 08:55:31 pm by Fred vS »
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: 4377
Re: Installing trunk or a very recent version
« Reply #10 on: March 07, 2023, 07:12:53 pm »
Here are the steps I use and never got problems:
relying on FPC executable seem to be the exact issue that TS is encountering. so TS needs to use PP instead.

Quote
4) In terminal go in unzipped freepascal-main directory and run the script with sudo right.
Just a personal opinion but requiring sudo rights (for such a moving target) is /so/ wrong.
Today is tomorrow's yesterday.

Fred vS

  • Hero Member
  • *****
  • Posts: 3919
    • StrumPract is the musicians best friend
Re: Installing trunk or a very recent version
« Reply #11 on: March 07, 2023, 07:18:50 pm »
Just a personal opinion but requiring sudo rights (for such a moving target) is /so/ wrong.

You need sudo right to install fpc in /usr/

Code: Bash  [Select][+][-]
  1. make FPC=$COMPILER install INSTALL_PREFIX=/usr/

 :-X
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: 4377
Re: Installing trunk or a very recent version
« Reply #12 on: March 07, 2023, 07:23:36 pm »
You need sudo right to install fpc in /usr/
Yes, I understand that  :)

The direct question that would logically follow to that answer is: why on earth would you install (trunk in this particular case but I never do) Free Pascal into /usr ? There isn't a single good reason for it in my book.
Today is tomorrow's yesterday.

Fred vS

  • Hero Member
  • *****
  • Posts: 3919
    • StrumPract is the musicians best friend
Re: Installing trunk or a very recent version
« Reply #13 on: March 07, 2023, 07:32:27 pm »
The direct question that would logically follow to that answer is: why on earth would you install (trunk in this particular case but I never do) Free Pascal into /usr ? There isn't a single good reason for it in my book.
Maybe in your book.
In https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard, /usr is the common directory to install programs and their libraries, for read-only user data.

But yes, maybe for trunk it is not the best choice (but I do).
« Last Edit: March 07, 2023, 08:02:45 pm by Fred vS »
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: 4377
Re: Installing trunk or a very recent version
« Reply #14 on: March 07, 2023, 08:02:38 pm »
Maybe in your book.
In https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard, /usr is the common directory to install programs and libraries, for read-only user data.
:)

Same book, other operating system and what about Lazarus ? Do you install that there too ?

It is inconsistent to say the least not to mention that on Linux you do not always have the luxury to have write access to /usr

Quote
But yes, maybe for trunk it is not the best choice.
Since things are inconsistent amongst platforms and programs you have to be a bit more inventive and not let yourself be boxed in with some imaginary rules that seems to exist with the purpose of pestering developers/people.

It is a bad idea to use /usr for moving targets such as trunk.

As a consequence and (for me) to be consistent all my FPC and Lazarus installations are completely stand-alone and do not rely on anything other then 2 environment variables and a script. No paths, system directories, OS deemed correct location(s) or otherwise is required.

The FPC developers did such a good job of getting rid of all such dependencies that it is almost unbearable to see people struggle with installing in program files, requiring sudo rights to be able to install their fresh compiler and/or run Lazarus etc. The only thing I used to recommend is for users that are new to FPC / Lazarus is to use their package manager to install but, some distributions made such a mess of things that I can't even recommend that anymore (and people requiring multiple installations should really stay away from using a package manager unless they can bent it to their will).

Completely off-topic of course, therefor apologies to topic starter. There is no intention to derail the thread.
Today is tomorrow's yesterday.

 

TinyPortal © 2005-2018