Error in IBX IBDatabase in uses statement lazarus / 16-Databases ---------------------------------------------------------------------- iru · 2023-06-11 03:10 Environment: Linux Mint 21. Laz 2.2.6. Firebird 3.0. IBX 2.5.0.9999. All clean fresh installs.... Gentlefolk, When I attempt to compile my small application I get an error on any 'IBDatabase' in a unit/form 'uses' statement. The error is as follows: unitglobal.pas(17,30) Fatal: Cannot find IBDataBase used by UnitGlobal. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/home/iru/.lazarus/onlinepackagemanager/packages/ib x/runtime/nongui/lib/x86_64-linux/IBDatabase.ppu. Clean up package "ibnongui".. There is IBDatabase.ppu and IBDatabase.o in /onlinepackagemanager/pack ages/ibx/runtime/nongui/lib/x86_64-linux/..... I have tried lots of things.... Any suggestions/ideas/etc??? Ian ---------------------------------------------------------------------- eljo · 2023-06-11 04:42 It sounds like a package is missing from the required list of your project. ---------------------------------------------------------------------- iru · 2023-06-11 08:42 eljo, thanks for the response I checked the required packages, added a couple more from the IB packages, no success. I copied the IBX example packages to a directory where I could load a project. Loaded the 'local db' employee example- compiled clean and executed correctly. So what is the difference between my application and the IBX example??? The IBX example uses the following path to access IBDatabase -- .    ./.lazarus/onlinepackagemanager/packages/ibx/runtime/nongui    contains IBDatabase.pas My application uses the following path --    ../.lazarus/onlinepackagemanager/packages/ibx/runtime/nongui/lib/x8 6_64-linux     contains IBDatabase.o and IBDatabase.ppu Why the different paths????? I search on (slowly)..... Ian. ---------------------------------------------------------------------- eljo · 2023-06-11 22:00 It sounds like the difference between 64bit and 32bit compilation try a clean and build and see what happens. ---------------------------------------------------------------------- iru · 2023-06-12 00:12 eljo, I tried a clean build but got the following: error:    Unable to delete file "/usr/share/lazarus/2.2.6/components/freetype /lib/x86_64-linux/easylazfreetype.o". Ckecking ownership and permissions on /usr I have:    drwxr-xr-x  14 root root       4096 Jul 27  2022 usr I am not user root so no delete... I looks to me that I have some sort of issues with ownership and permissions (from how I loaded LAZ, etc...). But why does my LAZ app fail unable to access IBDataset while the IBX supplied example work???? I think I may take a step back and start again.... Ian. ---------------------------------------------------------------------- iru · 2023-06-12 21:27 I have done the following: Built a new Linux Mint 21 system (TimeShift is wonderful). From the distributions package system built older versions of Firebird,  LAZ (2.2.0) and IBX. Tried to compile my application - same error on IBDataset. Created a new basic application project, NO error on IBDataset. So something is ugly in my original application project environment. Current thoughts are that I will migrate each form/unit in my original application to the new project structure and hopefully have a working project.... Ian ---------------------------------------------------------------------- Zvoni · 2023-06-13 06:00 Did you install FPC/Lazarus from Distribution-Repo? ---------------------------------------------------------------------- iru · 2023-06-14 01:39 Yes, from the Ubuntu-Mint distribution. I created a new project. No code or objects. Compiled and executed correctly. Copied the main form .pas and .lfm from the old project to the new project. Tried to compile and got the error on IBDatabase...... So, something is probably ugly in .lfm.... I am busy at work at the moment so it may take me some time to chase things further.... Ian. ---------------------------------------------------------------------- Zvoni · 2023-06-14 06:02 Quote from: iru on June 14, 2023, 03:39:04 amYes, from the Ubuntu-Mint distribution. ... and there is your problem.... ---------------------------------------------------------------------- iru · 2023-06-14 11:51 No that is not the problem.... Checked the main (first loaded ) form .lfm file - nothing appeared wrong or ridiculous. Thought about the startup sequence of the program: In .lpr the 'unitglobal' object is created (it contains common constants, functions, etc (and has a IBDatabase in the 'uses')). Looked at .lpr and noted the was no IBDatabase in the 'uses' statement. Inserted one and the project loaded correctly even though there is no mention of IBDatabase in the .lpr. Hmmmmm. Even worse, I removed the IBDatabase from .lpr. Project compiled and loaded correctly..... Closed the project, shut down LAZ. Re-started LAZ, without the IBData in the .lpr the project compiled and executed.correctly. Ahhhhh the wonders of software and code.... I have no idea what the cause of the problem is! I battle on, Ian.