I have fpc 1.0.10 installed on FreeBSD 4.8 and I downloaded lazarus latest source,…
Show quoted text 7 lines
This should work ordinarily. It could be you have an old unitfile (.ppu) lying around somewhere.
I'll try to duplicate it at home later.

Mailing lists / lazarus / 2003-07
14 messages · 3 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I have fpc 1.0.10 installed on FreeBSD 4.8 and I downloaded lazarus latest source,…
This should work ordinarily. It could be you have an old unitfile (.ppu) lying around somewhere.
I'll try to duplicate it at home later.
On Thu, 31 Jul 2003 10:15:32 +0200 Thanks. I did all this and now it finds the units such…
What if you don't supply the FPC rtl source paths, just .o and .ppu?
I have fpc 1.0.10 installed on FreeBSD 4.8 and I downloaded lazarus latest source,…
Thanks. I did all this and now it finds the units such as buttons and c lasses, but now it can not find the SysUtils unit. I know that sysutils is in /usr/local/lib/fpc-1.0.10/freebsd/units/rtl and the .pp file is in /usr/local/share/src/fpc-1.0.10/rtl/unix and there is a sysuntils.inc in /usr/local/share/src/fpc-1.0.10/rtl/objpas.
I tried placing the paths to /usr/local/lib/fpc-1.0.10/freebsd/units/rtl and /usr/local/share/src/fpc-1.0.10/rtl/unix in the compile options other units and other sources respectively, but still I get the error.
The complete error is
/usr/local/share/src/fpc-1.0.10/fcl/freebsd/classes.pp(27,3) Error: unit not found sysutils.
Any suggestions?
TIA
I have fpc 1.0.10 installed on FreeBSD 4.8 and I downloaded lazarus latest source, compiled it and installed it. When I place a button on a form and click the button to access the OnClick event, I get the error that it can not find the buttons unit. This happens with all components. I have the paths to the units in the lazarus environment setting but it does not seem to find them. Is there somewhere else I should be placing them or some config file that the path should be in?
Quick test:
Do a right click on the unit to get the popupmenu. Click "Unit Info". There you can see the unit path. The path should include the lcl directory. For example:
/home/user/lazarus/lcl/units;/home/user/lazarus/lcl/units/gtk;/home/user/la zarus/packager/units
If not, make sure that the
Environment -> Environment Options -> Files ->
-> Lazarus Directory
-> Compiler Path
-> FPC source directory
paths are set.
The Lazarus Directory normally ends on /x/x/lazarus/. The Compiler Path normally ends on /x/x/ppc386.
The FPC source directory normally ends on /x/x/fpc/.
You can test your compiler path and FPC Source Directory by searching for the file classes.pp: Open a unit, go to the uses section, position the cursor over the "Classes" identifier and do a find declaration (in the popupmenu or Search->Find declaration at cursor).
Then test your Lazarus Directory by searching for controls.pp.
Note:
The IDE will find controls.ppu in /x/lazarus/lcl/units/ and then it searches controls.pp in /x/lazarus/lcl/.
Mattias
On Thu, 31 Jul 2003 10:15:32 +0200 Thanks. I did all this and now it finds the units such…
> Thanks. I did all this and now it finds the units such as buttons and c > lasses, but now it can not find the SysUtils unit. I know that sysutils > is in /usr/local/lib/fpc-1.0.10/freebsd/units/rtl
The IDE automatically finds this out, by asking the the compiler for its unitpaths. So, you don't need to specify this path.
and the .pp file is in > /usr/local/share/src/fpc-1.0.10/rtl/unix
This directory can not be determined automatically. So, you should set Environment -> Environment Options -> Files -> FPC Source Directory to
/usr/local/share/src/fpc-1.0.10/
and there is a sysuntils.inc in > /usr/local/share/src/fpc-1.0.10/rtl/objpas.
The IDE has a built in database for include paths in the FPC source directory. So, you don't need this.
> I tried placing the paths to /usr/local/lib/fpc-1.0.10/freebsd/units/rtl > and /usr/local/share/src/fpc-1.0.10/rtl/unix in the compile options > other units and other sources respectively, but still I get the error.
This is because the units of the FCL (classes.pp) also uses the SysUtils. The compiler options are only valid for the project directory. The FPC sources consists of many packages and libraries with dependencies, that can't be described with a few search paths.
Just set the FPC Source directory in the environment options and the IDE will scan the directory and auto create the needed settings. You can see the result in Environment -> CodeTools Defines Editor.
Note:
The IDE uses a platform independent mechanism to setup the FPC source directory. But there are some exceptions which need some tricks (e.g. syswin32 and syslinux). I only tested it under linux and a little bit under win32. So, maybe some units or include files will not be found under BSD. Please report them.
Mattias
A big thank you to Marco and Mattias, for all the help in getting Lazarus working on my…
Yes.
Good idea.
Where do you think, the button should be added? To the compiler options dialog, the project menu or the help menu? And what name? Maybe "Test compiler settings".
Mattias
Ok, I found the problem I think. It's looking for SysUtils (and others) under…
A big thank you to Marco and Mattias, for all the help in getting Lazarus working on my system.
It seems if the problem was two fold. One when I compile Lazarus originally I add this line to fpc.cfg
-Fl/lib;/usr/lib;/usr/local/lib;/usr/local/lib/lcl/units/freebsd
This I believe cause the problems that Marco. The setjumph.inc file was missing from my system, so I updated the Lazarus source per Mattias instructions.
When I recompiled Lazarus I removed the /usr/local/lib/lcl/units/freebsd from the line above and everything went great! I created a small test app and all seems well!! Now on to development with Lazarus on FreeBSD!!
THANKS AGAIN!!!
To the Lazarus developpers;I've been thinking about how to detect this problem with lazarus, for the future (since it is one of those few gotcha's that can leave a FPC/Lazarus developpers totally flabbergasted)
I assume Lazarus already parses FPC compiler output? If so, can it also handle -va mode?
If so, we could have an option(button) in the path menu to do a testcompile run.
- generate a file that only links to the rtl to /tmp/test.pp
- compile and parse it, checking for inc files with asterisks, and "recompiling" msgs.
same for addition of fcl, gtk, lcl units etc.
Something like this could make it easier to diagnose unitpath and linkerpath errors.
On Thu, 7 Aug 2003 04:25:10 +0200 (CEST) Yes. Good idea. Where do you think, the button…
For now. But I'm sure eventually there will be added some more checks. I think, the function should check many common mistakes.
Mattias
On Thu, 7 Aug 2003 04:25:10 +0200 (CEST) Yes. Good idea. Where do you think, the button…
"Compiler Options"->"paths" tab I think.
Name maybe should be more explicit, like "Test compiler paths", since we specifically focus on that part.
Ok, I found the problem I think. It's looking for SysUtils (and others) under…
I added the fpc bsd specials.
Please restore the fpc source directory to its original state, update lazarus from cvs. To force the fpc cache of lazarus, change the FPC source directory in the environment options to some bogus directory, click ok, then change it back and click ok.
Mattias
Ok, I found the problem I think. It's looking for SysUtils (and others) under…
You are on the wrong track:
1 FPC stores compiled versions of all its sources, somewhere in /usr/local/lib/fpc/1.0.10/units/freebsd and deeper. 2 For some reason the compiler doesn't want to use these. 3 Therefore it starts to recompile the RTL, FCL etc, but that fails (which is normal, since the RTL can't be compiled this way, only via makefiles)
Your problem is not 3, but 2. Why does it want to recompile?
Some common reasons:
- an includefile somewhere in the include path has the same name as an includefile in the rtl, but a newer date (compiler thinks the RTL is out of date ->recompiles)
- There is a stray unit file (.ppu) somewhere, and it date doesn't match the other units found.
- The RTL include directory /usr/local/lib/fpc/1.0.10/units/freebsd is wrong or contains garbadge.
So a cleanup of your source directories is in order.
The easiest way to find the problem, is try to compile parts of lazarus manually, with -va as extra parameter. Then check the generated output (lots of it, pipe!) to find a place where it says "recompiling unit", and work upwards from there to find the reason.
If an includefile changed, that file is marked with an asterisk (*)
Ok, I found the problem I think. It's looking for SysUtils (and others) under
/usr/local/share/src/fpc-1.0.10/rtl/freebsd. Well that's not where they are.
Some of these units where in /usr/local/share/src/fpc-1.0.10/rtl/unix, /usr/local/share/src/fpc-1.0.10/rtl/inc and
/usr/local/share/src/fpc-1.0.10/fcl/unix. I copied these file to /usr/local/share/src/fpc-1.0.10/rtl/freebsd and everything seemed to go fine
until it wanted a file called setjumph.inc, it seems that file does not exists on my system. I can not find it anywhere. It is needed for systemh.inc
So now I am stuck here :(