Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-11

Using latest FPC devel version with Lazarus

16 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Juha Manninen

I am experimenting more...
How to set Lazarus to use the svn devel version of FPC compiler?

I copied FPC from svn and built it with "make all". Programmer's guide doesn't really tell to run "make all" but that created compilers ppc1, ppc2, ppc3 and ppc386 anyway.

"fpc/" is the dir where I downloaded the svn version. I tried to set in Lazarus:
Compiler path: fpc/compiler/ppc386
FPC source directory: fpc/

It gives an error:

The project uses target OS=linux and CPU=i386.
The system.ppu for this target was not found in the FPC binary directories. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories.

Is it documented somewhere how to configure this?

Juha Manninen

Reply by email

Mattias Gärtner
to Juha Manninen

Zitat von Juha Manninen :

Show quoted text 21 lines
I am experimenting more... How to set Lazarus to use the svn devel version of FPC compiler? I copied FPC from svn and built it with "make all". Programmer's guide doesn't really tell to run "make all" but that created compilers ppc1, ppc2, ppc3 and ppc386 anyway. "fpc/" is the dir where I downloaded the svn version. I tried to set in Lazarus: Compiler path: fpc/compiler/ppc386 FPC source directory: fpc/ It gives an error: The project uses target OS=linux and CPU=i386. The system.ppu for this target was not found in the FPC binary directories. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories. Is it documented somewhere how to configure this?

You have to install fpc.
There are many ways to install fpc.

Normally it is easier to build a debian or rpm package and install that. this way all files are installed at the normal places, so everyone can help you and you can uninstall/upgrade easily. There are scripts to create debian/ubuntu/fedora/redhat packages for this in lazarus/tools/install.

If you feel venturous you can install fpc manually:

Building:
make clean all
Installing:
sudo make install INSTALL_PREFIX=/usr

This will put all files into the right directories. Maybe you have to use samplecfg to create a /etc/fpc.cfg.
Beware: if you are doing something wrong, you might install files at the wrong places and you will get strange errors.

Mattias

Reply by email

Juha Manninen
to Mattias Gärtner
Mattias G?rtner wrote 20 lines
You have to install fpc. There are many ways to install fpc. Normally it is easier to build a debian or rpm package and install that. this way all files are installed at the normal places, so everyone can help you and you can uninstall/upgrade easily. There are scripts to create debian/ubuntu/fedora/redhat packages for this in lazarus/tools/install. If you feel venturous you can install fpc manually: Building: make clean all Installing: sudo make install INSTALL_PREFIX=/usr This will put all files into the right directories. Maybe you have to use samplecfg to create a /etc/fpc.cfg. Beware: if you are doing something wrong, you might install files at the wrong places and you will get strange errors.

Ok, there is no real easy way then.
I think I leave this experiment for later times. Lazarus was easy to build and run and I thought FPC would be also.

Thanks for your help.

Juha

Reply by email

Reimar Grabowski
to Juha Manninen
> There are scripts to create debian/ubuntu/fedora/redhat packages for > this in lazarus/tools/install. Ok, there is no real easy way then.

How can it get any easier than that?

R.

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

cobines
to Juha Manninen: I am experimenting more... How to set Lazarus to use the svn devel version of FPC…

2009/11/17 Juha Manninen :

Show quoted text 6 lines
It gives an error: The project uses target OS=linux and CPU=i386. The system.ppu for this target was not found in the FPC binary directories. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories.

You have to edit /etc/fpc.cfg or ~/.fpc.cfg and add the paths to the new units. Lines beginning with -Fu must point to your svn version of fpc. I'm not sure, but maybe also you have to remove/comment the old -Fu paths, so they don't conflict.

For example add this:

-Fu/myfpcsvn/packages/*/units/$fpctarget
-Fu/myfpcsvn/rtl/units/$fpctarget

cobines

Reply by email

Juha Manninen
to Reimar Grabowski: On Tue, 17 Nov 2009 15:17:52 +0200 How can it get any easier than that? R. A: Because it…
Reimar Grabowski wrote 9 lines
On Tue, 17 Nov 2009 15:17:52 +0200 Juha Manninen wrote: > > There are scripts to create debian/ubuntu/fedora/redhat packages for > > this in lazarus/tools/install. > > Ok, there is no real easy way then. How can it get any easier than that?

Well, still easier would be to just configure Lazarus to use the new FPC compiler and its source directory straight from the svn tree. Making .rpm package feels little useless because all the needed files are already in my computer and then I would install the package into this same computer.

An extra complication is that this is not debian/ubuntu/fedora/redhat but this is OpenSuse. Fedora packages would most likely work but I can't be sure.

Anyway, it is not a big problem. I will look at the FPC devel version later. I believe I could install the latest FPC with some effort but Lazarus compiles fine with the older ones.

OpenSuse advertised their build servers which should make it easier to build and deliver packages for every Suse user. I don't know how it works but someone could put there also the devel versions of FPC and Lazarus. Release versions are available already.

Juha Manninen

Reply by email

Vincent Snijders
to cobines: 2009/11/17 Juha Manninen : You have to edit /etc/fpc.cfg or ~/.fpc.cfg and add the paths…
cobines wrote 9 lines
You have to edit /etc/fpc.cfg or ~/.fpc.cfg and add the paths to the new units. Lines beginning with -Fu must point to your svn version of fpc. I'm not sure, but maybe also you have to remove/comment the old -Fu paths, so they don't conflict. For example add this: -Fu/myfpcsvn/packages/*/units/$fpctarget -Fu/myfpcsvn/rtl/units/$fpctarget

I would not recommend this, but just issue that one make install command. Then one dirtree is for sources and one for compiled units, not one mixed fpc source tree. I would reduce the confusion and prevent actually adding paths to fpc units *sources*, which would cause a recompile of those units.

I usually do make install INSTALL_PREFIX=~/fpc.

Vincent

Reply by email

Mattias Gaertner
to Juha Manninen: Well, still easier would be to just configure Lazarus to use the new FPC compiler and its…
Show quoted text 13 lines
On tiistai, 17. marraskuuta 2009 16:52:34 Reimar Grabowski wrote: > On Tue, 17 Nov 2009 15:17:52 +0200 > > Juha Manninen wrote: > > > There are scripts to create debian/ubuntu/fedora/redhat packages for > > > this in lazarus/tools/install. > > > > Ok, there is no real easy way then. > > How can it get any easier than that? Well, still easier would be to just configure Lazarus to use the new FPC compiler and its source directory straight from the svn tree.

The FPC sources are a big collection supporting more than 20 targets. Only the 'install' knows what files belong to the current target and this changes constantly. Lazarus would need to emulate the install process to find out which sources are the right one. Of course you can write some rules to support a common subset of sources for some common targets.
If someone wants to write and maintain that, it can be added.

Show quoted text 6 lines
Making .rpm package feels little useless because all the needed files are already in my computer and then I would install the package into this same computer. An extra complication is that this is not debian/ubuntu/fedora/redhat but this is OpenSuse. Fedora packages would most likely work but I can't be sure.

OpenSuse packages work the same. Only the gtk packages have different names. But I don't have an OpenSuSE to test, so I don't maintain the script for this.

Anyway, it is not a big problem. I will look at the FPC devel version later. I believe I could install the latest FPC with some effort but Lazarus compiles fine with the older ones.

Yes. You can use the last released, the current release candidate or the current developer version of fpc.

OpenSuse advertised their build servers which should make it easier to build and deliver packages for every Suse user. I don't know how it works but someone could put there also the devel versions of FPC and Lazarus. Release versions are available already.

If someone finds out, and it is easy enough I can adapt the script to support OpenSuSE.

Mattias

Reply by email

Juha Manninen
to Mattias Gärtner: Zitat von Juha Manninen : You have to install fpc. There are many ways to install fpc.…
Mattias G?rtner wrote 8 lines
You have to install fpc. There are many ways to install fpc. Normally it is easier to build a debian or rpm package and install that. this way all files are installed at the normal places, so everyone can help you and you can uninstall/upgrade easily. There are scripts to create debian/ubuntu/fedora/redhat packages for this in lazarus/tools/install.

I started to learn about RPM packages after all.
I didn't know how make them but learned some basics, too. It actually makes sense to install programs through RPM even locally because then they can be easily uninstalled.

So, I followed README.txt in lazarus/tools/install. It says:

 $ cd <lazarus_directory>/tools/install
 $ ./create_fpc_rpm.sh nodocs /path/to/your/fpc/sources/fpc

It worked and compiled the whole FPC and created packages. However, it also created an src package (fpc-src-2.5.1-091119.i586.rpm). Does it mean that the next command is not needed:

 $ ./create_fpc-src_rpm.sh /path/to/your/fpc/sources/fpc

How can I test installing it to a temporary place? It would be easier to spot any errors.

Juha Manninen

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 22 lines
On tiistai, 17. marraskuuta 2009 14:48:34 Mattias G?rtner wrote: > You have to install fpc. > There are many ways to install fpc. > > Normally it is easier to build a debian or rpm package and install > that. this way all files are installed at the normal places, so > everyone can help you and you can uninstall/upgrade easily. > There are scripts to create debian/ubuntu/fedora/redhat packages for > this in lazarus/tools/install. I started to learn about RPM packages after all. I didn't know how make them but learned some basics, too. It actually makes sense to install programs through RPM even locally because then they can be easily uninstalled. So, I followed README.txt in lazarus/tools/install. It says: $ cd <lazarus_directory>/tools/install $ ./create_fpc_rpm.sh nodocs /path/to/your/fpc/sources/fpc It worked and compiled the whole FPC and created packages. However, it also created an src package (fpc-src-2.5.1-091119.i586.rpm).

That's only needed if you want to recompile the rpm, for example to pass some extra flags or for security reasons.

Does it mean that the next command is not needed: $ ./create_fpc-src_rpm.sh /path/to/your/fpc/sources/fpc

This is creating a rpm to install the fpc sources. If you use the fpc svn then you don't need this.

How can I test installing it to a temporary place? It would be easier to spot any errors.

The rpm can be easily uninstalled. No need to install it in a temporary place.

Mattias

Reply by email

Juha Manninen
to Mattias Gaertner
Mattias Gaertner wrote 17 lines
On Thu, 19 Nov 2009 14:34:29 +0200 Juha Manninen wrote: > $ cd <lazarus_directory>/tools/install > $ ./create_fpc_rpm.sh nodocs /path/to/your/fpc/sources/fpc > > It worked and compiled the whole FPC and created packages. > However, it also created an src package (fpc-src-2.5.1-091119.i586.rpm). That's only needed if you want to recompile the rpm, for example to pass some extra flags or for security reasons. > Does it mean that the next command is not needed: > > $ ./create_fpc-src_rpm.sh /path/to/your/fpc/sources/fpc This is creating a rpm to install the fpc sources. If you use the fpc svn then you don't need this.

Lazarus needs the sources, doesn't it?
Actually configuring Lazarus to use the svn FPC was the only problem now. I was able to install new FPC and make it work (without using RPM). I did: make install INSTALL_PREFIX=~/fpc
and then edited paths in ~/.fpc.cfg
and added path to .bashrc.
After that "fpc" gave the right version info (2.5.1).

However I wasn't able to configure Lazarus "FPC source". It complained that the directory doesn't look right or something, and then other errors. It should be documented in wiki, like "How to use Lazarus with FPC svn sources" or something if it really can be done.

I wrote earlier that I will not test this devel FPC now but I couldn't resist the temptation... :-)

Juha

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 29 lines
On lauantai, 21. marraskuuta 2009 01:43:48 Mattias Gaertner wrote: > On Thu, 19 Nov 2009 14:34:29 +0200 > Juha Manninen wrote: > > $ cd <lazarus_directory>/tools/install > > $ ./create_fpc_rpm.sh nodocs /path/to/your/fpc/sources/fpc > > > > It worked and compiled the whole FPC and created packages. > > However, it also created an src package (fpc-src-2.5.1-091119.i586.rpm). > > That's only needed if you want to recompile the rpm, for example to > pass some extra flags or for security reasons. > > > Does it mean that the next command is not needed: > > > > $ ./create_fpc-src_rpm.sh /path/to/your/fpc/sources/fpc > > This is creating a rpm to install the fpc sources. > If you use the fpc svn then you don't need this. Lazarus needs the sources, doesn't it? Actually configuring Lazarus to use the svn FPC was the only problem now. I was able to install new FPC and make it work (without using RPM). I did: make install INSTALL_PREFIX=~/fpc and then edited paths in ~/.fpc.cfg and added path to .bashrc. After that "fpc" gave the right version info (2.5.1). However I wasn't able to configure Lazarus "FPC source". It complained that the directory doesn't look right or something,

Maybe you should read the message more carefully. It explains what directories the IDE expects. Probably you have given the ~/fpc instead of your fpc svn directory.

and then other errors. It should be documented in wiki, like "How to use Lazarus with FPC svn sources" or something if it really can be done.

I started some notes:

http://wiki.lazarus.freepascal.org/Getting_Lazarus#Installing_the_compiler

I wrote earlier that I will not test this devel FPC now but I couldn't resist the temptation... :-)

Mattias

Reply by email

Juha Manninen
to Mattias Gaertner
Mattias Gaertner wrote 7 lines
Juha Manninen wrote: > However I wasn't able to configure Lazarus "FPC source". It complained > that the directory doesn't look right or something, Maybe you should read the message more carefully. It explains what directories the IDE expects. Probably you have given the ~/fpc instead of your fpc svn directory.
now I am confused. Earlier in this same thread you wrote 10 lines
> Well, still easier would be to just configure Lazarus to use the new FPC > compiler and its source directory straight from the svn tree. The FPC sources are a big collection supporting more than 20 targets. Only the 'install' knows what files belong to the current target and this changes constantly. Lazarus would need to emulate the install process to find out which sources are the right one. Of course you can write some rules to support a common subset of sources for some common targets. If someone wants to write and maintain that, it can be added.

I understood I can't use the svn tree for Lazarus FPC sources.

Now, say I have dir "fpc_svn" containing the svn tree and then I have dir "fpc" where it is installed with "make install".
Which directory should I select in Lazarus as "FPC source directory"?

Juha Manninen

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 23 lines
On lauantai, 21. marraskuuta 2009 13:24:32 Mattias Gaertner wrote: > Juha Manninen wrote: > > However I wasn't able to configure Lazarus "FPC source". It complained > > that the directory doesn't look right or something, > > Maybe you should read the message more carefully. It explains what > directories the IDE expects. Probably you have given the ~/fpc instead > of your fpc svn directory. Uhh, now I am confused. Earlier in this same thread you wrote: > > Well, still easier would be to just configure Lazarus to use the new FPC > > compiler and its source directory straight from the svn tree. > > The FPC sources are a big collection supporting more than 20 targets. > Only the 'install' knows what files belong to the current target and > this changes constantly. Lazarus would need to emulate the install > process to find out which sources are the right one. > Of course you can write some rules to support a common subset of > sources for some common targets. > If someone wants to write and maintain that, it can be added. I understood I can't use the svn tree for Lazarus FPC sources.

Sorry.

You wrote 10 lines
I copied FPC from svn and built it with "make all". I tried to set in Lazarus: FPC source directory: fpc/[...] It gives an error: The project uses target OS=linux and CPU=i386. The system.ppu for this target was not found in the FPC binary directories. Is it documented somewhere how to configure this?

And I answered the above.
I meant: If you only do 'make all' in a fpc svn, it is not enough for lazarus. You have to do 'make install' or use packages. Lazarus can use the fpc svn directory as source directory, but the ppu files, the fpc.cfg, the compiler, the fpc utilities, the help, ... must be installed as normal.

Now, say I have dir "fpc_svn" containing the svn tree and then I have dir "fpc" where it is installed with "make install". Which directory should I select in Lazarus as "FPC source directory"?

The "fpc_svn" is the the fpc source directory. It contains for example a directory 'compiler'.

Mattias

Reply by email

Juha Manninen
to Mattias Gaertner
Mattias Gaertner wrote
The "fpc_svn" is the the fpc source directory. It contains for example a directory 'compiler'.

I made it! Lazarus accepted the source path. I tried this path also before but then FPC binaries were not properly installed and it was not accepted.

Then I "make clean all" for Lazarus and it started to work. Nice! Later I rebuilt it with optimization and QT bindings. The new -O2 optimized and stripped binary is slightly smalled than before: 10,3 MB versus the old 10,6 MB.

There was only one hump on the way. Earlier I had VirtualTreeView installed but it doesn't compile with latest FPC (I will look at that later). After "make clean all" the component is apparently gone but still Lazarus/FPC complained about it. It offered to "remove it from build list" and after that Lazarus built fine.
Where is that build list stored?

Thanks Mattias for help.

Regards,
Juha Manninen

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 17 lines
On lauantai, 21. marraskuuta 2009 23:19:38 Mattias Gaertner wrote: > The "fpc_svn" is the the fpc source directory. It contains for > example a directory 'compiler'. I made it! Lazarus accepted the source path. I tried this path also before but then FPC binaries were not properly installed and it was not accepted. Then I "make clean all" for Lazarus and it started to work. Nice! Later I rebuilt it with optimization and QT bindings. The new -O2 optimized and stripped binary is slightly smalled than before: 10,3 MB versus the old 10,6 MB. There was only one hump on the way. Earlier I had VirtualTreeView installed but it doesn't compile with latest FPC (I will look at that later). After "make clean all" the component is apparently gone but still Lazarus/FPC complained about it. It offered to "remove it from build list" and after that Lazarus built fine.

A "make clean all" builds a minimal IDE without extra packages. Just start the IDE and rebuild the IDE. It will build an IDE with your packages.

Where is that build list stored?

Do you mean the list or all the files that are needed to be updated, when you change this list?
All files are stored in ~/.lazarus/

Mattias

Reply by email