Recent

Author Topic: howto rebuild FPC RTL for lazarus ?  (Read 1353 times)

alexraynepe196

  • New Member
  • *
  • Posts: 21
howto rebuild FPC RTL for lazarus ?
« on: November 23, 2021, 08:47:27 pm »
hallow!
installed lazarus 2.0.10 with fpc 3.2.0 on win8.
due some changes, i infered into system units, standart fpcpackage paszlib need to rebuild. How to make it right?

simple `make build install` in source/packages/paszlib not enough:
>>Makefile:135: *** Compiler .exe not found.  Stop

« Last Edit: November 25, 2021, 06:58:03 pm by alexraynepe196 »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9680
  • FPC developer.
Re: howto rebuild paszlib package
« Reply #1 on: November 23, 2021, 09:00:39 pm »
Rebuild first FPC, and then Lazarus.

Not only packages, but any packages depending on it (like image support) must be recompiled, and the easiest way is to simply recompile all.

alexraynepe196

  • New Member
  • *
  • Posts: 21
Re: howto rebuild paszlib package
« Reply #2 on: November 23, 2021, 09:09:24 pm »
Have lazarus any script for such rebuild? or need to do it manual?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9680
  • FPC developer.
Re: howto rebuild paszlib package
« Reply #3 on: November 23, 2021, 09:15:55 pm »
Afaik mostly manual.

alexraynepe196

  • New Member
  • *
  • Posts: 21
Re: howto rebuild paszlib package
« Reply #4 on: November 23, 2021, 09:29:56 pm »
i run build for RTL
`c:\lazarus\fpc\3.2.0\source\rtl>make debug FPC=c:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpc.exe INSTALL_UNITDIR=c:\lazarus\fpc\3.2.0\units`

it build weel, but outpts ppu into `c:\lazarus\fpc\3.2.0\source\rtl\units\$TARGET`

same command for packages:
`c:\lazarus\fpc\3.2.0\source\packages>make debug FPC=c:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpc.exe INSTALL_UNITDIR=c:\lazarus\fpc\3.2.0\units`

builds output into units/$TARGET of each package folder.

how to force make outputs to demanded `c:\lazarus\fpc\3.2.0\units` - that is FPC installation have?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9680
  • FPC developer.
Re: howto rebuild paszlib package
« Reply #5 on: November 23, 2021, 09:48:26 pm »
Compile everything (using make all on the source/ level), and use INSTALL_PREFIX

PascalDragon

  • Hero Member
  • *****
  • Posts: 3490
  • Compiler Developer
Re: howto rebuild paszlib package
« Reply #6 on: November 24, 2021, 01:57:22 pm »
Compile everything (using make all on the source/ level), and use INSTALL_PREFIX

Lazarus does not provide the full sources on Windows only rtl and packages (no other directories or files).

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9680
  • FPC developer.
Re: howto rebuild paszlib package
« Reply #7 on: November 24, 2021, 03:05:05 pm »
Then I'll leave it for a lazarus developer to answer :-)

Bart

  • Hero Member
  • *****
  • Posts: 4502
    • Bart en Mariska's Webstek
Re: howto rebuild paszlib package
« Reply #8 on: November 24, 2021, 06:53:31 pm »
Here's a Lazaus user:
I always download the (full) sources for fpc separately.
I never rebuild a separate fpc package though, I just rebuild fpc entirely.
Hardly ever fails (and if it does, it's 99% chance it's my fault).

Bart

alexraynepe196

  • New Member
  • *
  • Posts: 21
Re: howto rebuild paszlib package
« Reply #9 on: November 25, 2021, 09:07:18 am »
Compile everything (using make all on the source/ level), and use INSTALL_PREFIX
`c:\lazarus\fpc\3.2.0\source\rtl>make all FPC=c:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpc.exe INSTALL_PREFIX=c:\lazarus\fpc\3.2.0`
builds well, but it also outputs to source\rtl\unis\$TARGET, instead place it to INSTALL_PREFIX\units\$TARGET\rtl

How to force `make` place builded objects into FPC native units\ dir?

i try make install , and fails:

```
c:\lazarus\fpc\3.2.0\source\rtl>make install FPC=c:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpc.exe INSTALL_PREFIX=c:\lazarus\fpc\3.2.0 COPYTREE=echo
make -C win64 all
make[1]: Entering directory '/cygdrive/c/lazarus/fpc/3.2.0/source/rtl/win64'
make[1]: Leaving directory '/cygdrive/c/lazarus/fpc/3.2.0/source/rtl/win64'
__missing_command_FPCMAKE -p -Tx86_64-win64 Makefile.fpc
make: __missing_command_FPCMAKE: Command not found
make: *** [Makefile:1464: fpc_install] Error 127
```
« Last Edit: November 25, 2021, 09:13:58 am by alexraynepe196 »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9680
  • FPC developer.
Re: howto rebuild FPC RTL
« Reply #10 on: November 25, 2021, 09:34:31 am »
Combine make all and install.  INSTALL_PREFIX is a parameter to install, not all.

make all install FPC=c:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpc.exe INSTALL_PREFIX=c:\lazarus\fpc\3.2.0`

Local generation of units in source\ can't be avoided, it is install that copies them from there to the INSTALL_PREFIX location

alexraynepe196

  • New Member
  • *
  • Posts: 21
Re: howto rebuild FPC RTL
« Reply #11 on: November 25, 2021, 04:38:46 pm »
Combine make all and install.  INSTALL_PREFIX is a parameter to install, not all.

make all install FPC=c:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpc.exe INSTALL_PREFIX=c:\lazarus\fpc\3.2.0`

Local generation of units in source\ can't be avoided, it is install that copies them from there to the INSTALL_PREFIX location

this not pass, it makes same as i showed before - outputs to source\rtl\unis\$TARGET, and after build completes with same fail:
Code: GNU make  [Select][+][-]
  1. ...
  2. lnfodwrf.pp(991,3) Note: Local variable "isdwarf64" is assigned but never used
  3. 1417 lines compiled, 0.1 sec
  4. 1 warning(s) issued
  5. 2 note(s) issued
  6. make[1]: Leaving directory '/cygdrive/c/lazarus/fpc/3.2.0/source/rtl/win64'
  7. __missing_command_FPCMAKE -p -Tx86_64-win64 Makefile.fpc
  8. make: __missing_command_FPCMAKE: Command not found
  9. make: *** [Makefile:1464: fpc_install] Error 127
  10.  

something need for founds `__missing_command_FPCMAKE`

« Last Edit: November 25, 2021, 04:41:04 pm by alexraynepe196 »

alexraynepe196

  • New Member
  • *
  • Posts: 21
Re: howto rebuild FPC RTL
« Reply #12 on: November 25, 2021, 06:57:34 pm »
well, i pass instalation by explicit specify FPCMAKE:
Code: Pascal  [Select][+][-]
  1. c:\lazarus\fpc\3.2.0\source\rtl>make install FPC=c:\lazarus\fpc\3.2.0\bin\x86_64-win64\ppcx64.exe INSTALL_PREFIX=c:\lazarus\fpc\3.2.0 FPCMAKE=c:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpcmake.exe CPU_TARGET=x86_64
  2.  

now it compile and installs ok.

But a got another problem: lazarus won`t use it. It fails with:
Code: Pascal  [Select][+][-]
  1. Verbose: Free Pascal Compiler version 3.2.0 [2020/07/07] for x86_64
  2. Verbose: Copyright (c) 1993-2020 by Florian Klaempfl and others
  3. Verbose: Target OS: Win64 for x64
  4. Verbose: Compiling fcllaz.pas
  5. Verbose: PPU Loading C:\lazarus\fpc\3.2.0\units\x86_64-win64\rtl\system.ppu
  6. Verbose: PPU is compiled for another processor
  7. Fatal: Невозможно найти system, используемый в fcllaz. Убедитесь, что все файлы PPU пакета находятся в его каталоге вывода. PPU в неверном каталоге=C:\lazarus\fpc\3.2.0\units\x86_64-win64\rtl\system.ppu..
  8. Verbose: Compilation aborted
  9. Verbose: C:\lazarus\fpc\3.2.0\bin\x86_64-win64\ppcx64.exe returned an error exitcode
  10.  

what target lazarus wants, since it virsion reports x86_64-win64-win32/win64?

« Last Edit: November 25, 2021, 07:00:22 pm by alexraynepe196 »

avra

  • Hero Member
  • *****
  • Posts: 2261
    • Additional info
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

alexraynepe196

  • New Member
  • *
  • Posts: 21
Re: howto rebuild FPC RTL
« Reply #14 on: November 25, 2021, 11:07:58 pm »

But a got another problem: lazarus won`t use it. It fails with:
Code: Pascal  [Select][+][-]
  1. Verbose: Free Pascal Compiler version 3.2.0 [2020/07/07] for x86_64
  2. Verbose: Copyright (c) 1993-2020 by Florian Klaempfl and others
  3. Verbose: Target OS: Win64 for x64
  4. Verbose: Compiling fcllaz.pas
  5. Verbose: PPU Loading C:\lazarus\fpc\3.2.0\units\x86_64-win64\rtl\system.ppu
  6. Verbose: PPU is compiled for another processor
  7. Fatal: Невозможно найти system, используемый в fcllaz. Убедитесь, что все файлы PPU пакета находятся в его каталоге вывода. PPU в неверном каталоге=C:\lazarus\fpc\3.2.0\units\x86_64-win64\rtl\system.ppu..
  8. Verbose: Compilation aborted
  9. Verbose: C:\lazarus\fpc\3.2.0\bin\x86_64-win64\ppcx64.exe returned an error exitcode
  10.  

what target lazarus wants, since it virsion reports x86_64-win64-win32/win64?

looks that this problem caused some how by installer script - it copies compiled objects to units/$TARGET/rtl,  but try to open that files - windows reports that it busy by other aplication.

So, looks can close topic

 

TinyPortal © 2005-2018