<br><br><div class="gmail_quote">On 24 September 2010 16:45, Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com">pascaldragon@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Am 24.09.2010 17:25, schrieb Frank Church:<div class="im"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
1. The fpc executable is installed in ~/LazarusInstalls/fpc240/bin/fpc<br>
When I execute ~/LazarusInstalls/fpc240/bin/fpc, the first 3 lines of<br>
output say:<br>
<br>
Free Pascal Compiler version 2.2.4-3 [2009/06/03] for i386<br>
Copyright (c) 1993-2008 by Florian Klaempfl<br>
/usr/lib/fpc/2.2.4/ppc386 [options] <inputfile> [options]<br>
<br>
Obviously fpc calls ppc386 that is in the path, perhaps there is no<br>
fpc.cfg available.<br>
<br>
</blockquote>
<br></div>
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):<br>

<br>
PATH=~/LazarusInstalls/fpc240/lib/fpc/2.4.0 ~/LazarusInstalls/fpc240/bin/fpc<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
So how I can create an fpc.cfg and pass it the fpc I just compiled?<br>
Couldn't the install script create a suitable fpc.cfg to match the<br>
installation directory?<br>
</blockquote>
<br></div>
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 help).<br>
<br></blockquote><div><br>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 using?<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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".<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
2. Onto Lazarus<br>
<br>
cd ~/LazarusBuilds<br>
svn checkout <a href="http://svn.freepascal.org/svn/lazarus/trunk" target="_blank">http://svn.freepascal.org/svn/lazarus/trunk</a> lazarus27446<br>
cd lazarus27446<br>
<br>
make obviously fails here because I don't know the option of passing my<br>
shiny new fpc 2.4.0 to the make command.<br>
<br>
Is there an option for that, and are there other options to ensure that<br>
new compiler will only link<br>
with files from its subdirectories?<br>
<br>
There is also this hilarious bit in the README.txt that says.<br>
<br>
==================<br>
Compilation:<br>
You don't need ./configure, just do<br>
<br>
   []$ make clean all<br>
<br>
This will create the lazarus executable. Start it and enjoy.<br>
===================<br>
<br>
What, doesn't even need FreePascal?<br>
<br>
There may be some legacy reasons why Lazarus/FPC doesn't use the<br>
./configure approach, but at least a well documented bash script which<br>
allows you to set some variables before compilation would be very helpful.<br>
</blockquote>
<br></div>
There is no legacy reason besides FPC simply not using it cause FPC doesn't need it.<br>
<br>
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.<br>

<br>
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.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
After all, the main idea of programming is never to use constants or<br>
literals where well documented<br>
variables will do<br>
</blockquote>
<br></div>
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" ^^<br>
<br></blockquote><div><br>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.<br>
<br>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?<br><br>
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.<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Regards,<br>
Sven<br><font color="#888888">
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>