[Lazarus] How to pass path of fpc to make command, and some thoughts on Lazarus/FPC Installation.
vfclists at gmail.com
Fri Sep 24 21:53:56 CEST 2010
On 24 September 2010 16:45, Sven Barth <pascaldragon at googlemail.com> wrote:
> Am 24.09.2010 17:25, schrieb Frank Church:
> 1. The fpc executable is installed in ~/LazarusInstalls/fpc240/bin/fpc
>> When I execute ~/LazarusInstalls/fpc240/bin/fpc, the first 3 lines of
>> output say:
>> Free Pascal Compiler version 2.2.4-3 [2009/06/03] for i386
>> Copyright (c) 1993-2008 by Florian Klaempfl
>> /usr/lib/fpc/2.2.4/ppc386 [options] <inputfile> [options]
>> Obviously fpc calls ppc386 that is in the path, perhaps there is no
>> fpc.cfg available.
> There might be a .fpc.cfg in ~/ from your 2.2.4, but the ppc386 might
> indeed be called by using $PATH. You can check that by overriding it
> temporaily by calling fpc in the following way (please adjust the paths if
> necessary, I constructed them out of memory):
> So how I can create an fpc.cfg and pass it the fpc I just compiled?
>> Couldn't the install script create a suitable fpc.cfg to match the
>> installation directory?
> There should be a makeskel or similar binary in fpc240/bin/fpc which you
> can call to create a config skeleton (you might call it with -h to see its
I think the command in question is 'samplecfg'. It also generates some
fp.xxx files under ~/.fp/. I hope they are for the command line version.
Could they possibly interfere with other versions of FreePascal I might be
> You might also copy your 2.2.4 config file and change all occurences of
> "/usr/lib/fpc/2.2.4" to "/home/???/LazarusInstalls/fpc240/lib/fpc/2.4.0".
>> 2. Onto Lazarus
>> cd ~/LazarusBuilds
>> svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus27446
>> cd lazarus27446
>> make obviously fails here because I don't know the option of passing my
>> shiny new fpc 2.4.0 to the make command.
>> Is there an option for that, and are there other options to ensure that
>> new compiler will only link
>> with files from its subdirectories?
>> There is also this hilarious bit in the README.txt that says.
>> You don't need ./configure, just do
>> $ make clean all
>> This will create the lazarus executable. Start it and enjoy.
>> What, doesn't even need FreePascal?
>> There may be some legacy reasons why Lazarus/FPC doesn't use the
>> ./configure approach, but at least a well documented bash script which
>> allows you to set some variables before compilation would be very helpful.
> There is no legacy reason besides FPC simply not using it cause FPC doesn't
> need it.
> You can pass the used compiler binary by adding
> "FPC=~/LazarusInstalls/fpc240/lib/fpc/2.4.0/ppc386" to the "make" command
> line (after "clean all"). Please note that you also need the ~/.fpc.cfg for
> this to work.
> Note: You should(!) be able to use a different config file than
> "~/.fpc.cfg" by passing "OPT=@/path/to/fpc.cfg" to the make command as well.
>> After all, the main idea of programming is never to use constants or
>> literals where well documented
>> variables will do
> Yes, but setting up different versions of FPC needs a bit of a creative
> thinking process and I've yet to think of an easier way than using a "switch
> script" ^^
I am working through you suggestions and I notice that the 2.4.0 specific
files seem to be in a directory lib/fpc/2.4.0 under
~/LazarusInstalls/fpc240, which contains a 'share' and a 'bin'
directory.'share' contains a 'doc/2.4.0' directory.
Does that mean that the I could also use make install
INSTALL_PREFIX='~/LazarusInstalls/fpc240' command to install all the fpc
versions into the same directory without their executable's clashing?
I take it that the 'bin' folder in the INSTALL_PREFIX contains utilities
which can be shared among the different installations, and that the 'share'
folder will also have different docs for the versions.
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus