Recent

Author Topic: How to recompile one FPC package?  (Read 8860 times)

eny

  • Hero Member
  • *****
  • Posts: 1634
How to recompile one FPC package?
« on: September 03, 2015, 12:19:14 pm »
I need to debug the fcl-web package and want to recompile it.
What is the way to do this?

Source is in <lazarus>\fpc\2.6.4\source\packages\fcl-web\src\base
And target is in: <lazarus>\fpc\2.6.4\units\i386-win32\fcl-web
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to recompile one FPC package?
« Reply #1 on: September 03, 2015, 01:10:45 pm »
Code: [Select]
# let's assume
# srcdir = <lazarus>\fpc\2.6.4\source\packages\fcl-web\src\base
# destdir = <lazarus>\fpc\2.6.4
# \units\i386-win32\fcl-web will be added automatically by the make script
cd srcdir
make clean all install INSTALL_PREFIX=<lazarus>\fpc\2.6.4

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: How to recompile one FPC package?
« Reply #2 on: September 03, 2015, 02:42:32 pm »
Aha, executing make from the 'base' dir did the trick.
Thx a million.
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: How to recompile one FPC package?
« Reply #3 on: November 20, 2015, 10:53:28 am »
I tried to find out how to recompile a fcl package, and all I found is this topic.
I want to recompile ibase package, but I don't know how.

By following this I tried from <fpc-source-dir>/packages/ibase directory:
Code: [Select]
z@z-VBMintMate ~/programi/fpc-3.0.0rc2-source/packages/ibase $ make clean all install INSTALL_PREFIX=~/programi/fpc-3.0.0rc2/
make: -iVSPTPSOTO: Command not found
make: Nothing to be done for `clean'.
fpmake.pp -n   
make: fpmake.pp: Command not found
make: *** [fpmake] Error 127

Please, help.

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: How to recompile one FPC package?
« Reply #4 on: November 20, 2015, 11:28:22 am »
You need to call make in your root of package directory, not in subdirectory.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: How to recompile one FPC package?
« Reply #5 on: November 20, 2015, 01:39:40 pm »
This line:

Quote
make: -iVSPTPSOTO: Command not found

queries the binary FPC for various options. If you see this it means the binary "fpc" is not found in the path. Does "fpc" do something on the cmdline?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to recompile one FPC package?
« Reply #6 on: November 20, 2015, 01:42:23 pm »
You need to call make in your root of package directory, not in subdirectory.
TBH, you can actually build specific package by executing make inside the package directory. Zoran's problem is due to fpc being not found by make, probably just a PATH problem.

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: How to recompile one FPC package?
« Reply #7 on: November 20, 2015, 03:24:22 pm »
Thank you all.
It is true that path to fpc is not included in PATH variable, that is because I have two fpc versions and to avoid mistakes with wrong fpc version, I didn't put any of them to path.

Now, to solve the path problem, I created a script compile.sh in ibase dir, which contains this:
Code: [Select]
#!/bin/sh
PATH=$HOME/programi/fpc-3.0.0rc2/bin:$PATH
make clean all install INSTALL_PREFIX=home/programi/fpc-3.0.0rc2/

And this is what I get now:
Code: [Select]
z@z-VBMintMate ~/programi/fpc-3.0.0rc2-source/packages/ibase $ sh compile.sh
make: Nothing to be done for `clean'.
/home/z/programi/fpc-3.0.0rc2/bin/ppcx64 fpmake.pp -n -Fu../../rtl -Fu../../packages/paszlib -Fu../../packages/fcl-process -Fu../../packages/hash -Fu../../packages/libtar -Fu../../packages/fpmkunit 
Fatal: Can't find unit system used by fpmake
Fatal: Compilation aborted
make: *** [fpmake] Error 1
%)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: How to recompile one FPC package?
« Reply #8 on: November 20, 2015, 03:59:35 pm »
Thank you all.
It is true that path to fpc is not included in PATH variable, that is because I have two fpc versions and to avoid mistakes with wrong fpc version, I didn't put any of them to path.


(or add FPC=/path/to/my/current/fpc to the make  cmdline)

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: How to recompile one FPC package?
« Reply #9 on: November 20, 2015, 04:42:44 pm »
(or add FPC=/path/to/my/current/fpc to the make  cmdline)

Code: [Select]
z@z-VBMintMate ~/programi/fpc-3.0.0rc2-source/packages/ibase $ make clean all install FPC=/home/z/programi/fpc-3.0.0rc2/bin/fpc INSTALL_PREFIX=/home/z/programi/fpc-3.0.0rc2/
make: Nothing to be done for `clean'.
/home/z/programi/fpc-3.0.0rc2/bin/fpc fpmake.pp -n -Fu../../rtl -Fu../../packages/paszlib -Fu../../packages/fcl-process -Fu../../packages/hash -Fu../../packages/libtar -Fu../../packages/fpmkunit 
Fatal: Can't find unit system used by fpmake
Fatal: Compilation aborted
Error: /home/z/programi/fpc-3.0.0rc2/bin/ppcx64 returned an error exitcode
make: *** [fpmake] Error 1

 :(

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: How to recompile one FPC package?
« Reply #10 on: November 20, 2015, 07:05:18 pm »
Do you have fpc.cfg generated for each FPC you have?

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: How to recompile one FPC package?
« Reply #11 on: November 20, 2015, 07:44:09 pm »
Do you have fpc.cfg generated for each FPC you have?

Yes, I do. See, here is the topic where I solved where to put it, so that these two do not conflict: http://forum.lazarus.freepascal.org/index.php/topic,30259.0.html
Now I have Lazarus 1.4.5-fixes compiled with stable fpc 2.6.4 and Lazarus trunk compiled with fpc 3.0.0rc2.

 

TinyPortal © 2005-2018