Lazarus Linux Installation Details

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rgminutillo
Posts: 6
Joined: Mon 25 Jul 2011 01:44

Lazarus Linux Installation Details

Post by rgminutillo » Mon 25 Jul 2011 02:50

I'm trying to install 6.10.0.9 into Lazarus 0.9.28.2 under Linux (Ubuntu 11.04). I downloaded mydacfpc2.tar.gz and wondered what to do with it.

I decided to unpack it into /usr/lib/lazarus/0.9.28.2/components/mydac. Then I started the Lazarus IDE and opened mydacvcl10.lpk and clicked on the 'Install' button in the package file viewer.

First I got a message indicating that other packages would also be installed (no problem there,) then I got a message stating that Lazarus only supports static linked packages and that true installation required rebuilding and restarting of Lazarus (meaning rebuilding the IDE, which I also expected.)

When I try to proceed, however, I get the following error:

/usr/lib/lazarus/0.9.28.2/components/mydac/packages/dac10.pas(1,1) Fatal: Can't find unit CRAccess used by dac10

referring to the uses clause in the automatically generated dac10.pas file which Lazarus is trying to compile.

I assume that the compiler is looking for a source file, since /usr/lib/lazarus/0.9.28.2/components/mydac/packages/lib/CRAccess.ppu and /usr/lib/lazarus/0.9.28.2/components/mydac/packages/lib/CRAccess.o both exist.

Almost all of your documentation refers to Windows versions, not Linux, so I'm stumped. What am I doing wrong? Did I unpack the tar file in the right place? Do I need to put these files in the compiler path instead of the Lazarus directory?

Thanks

RGM

AndreyZ

Post by AndreyZ » Mon 25 Jul 2011 12:19

Hello,

You should open the dclmydac10.lpk file instead of mydacvcl10.lpk. You can learn how to install MyDAC on Linux from the "Installation" topic (Lazarus) of the MyDAC documentation.

rgminutillo
Posts: 6
Joined: Mon 25 Jul 2011 01:44

Post by rgminutillo » Mon 25 Jul 2011 12:48

[quote="AndreyZ"]Hello,

You should open the dclmydac10.lpk file instead of mydacvcl10.lpk. You can learn how to install MyDAC on Linux from the "Installation" topic (Lazarus) of the MyDAC documentation.[/quote]

No I'm afraid not. It's the same result. All of the other packages are automatically set to install, and lazarus still cannot rebuild the IDE because it still cannot find the required files.

And as for reading the documentation, I said in my original post that I have done do, and only found material about lazarus under windows, not linux. Maybe you can point me to a specific doc that covers installing myDAC into lazarus under linux, but I'll certainly go back and look again in any case.

RGM

rgminutillo
Posts: 6
Joined: Mon 25 Jul 2011 01:44

Post by rgminutillo » Mon 25 Jul 2011 13:18

This is apparently a path problem. Even the two sentences in MyDAC.pdf refer to a directory that doesn't exist, and the package file itself refers to paths that don't exist.

The only directories in the tar file(other than the demos and the docs) are

/mydac/packages
/mydac/packages/lib

but when lazarus goes to rebuild its IDE with your packages, it's looking for







which is a direct paste from the .lpk file. So if the IncludeFiles paths don't exist, how is this supposed to work?

RGM

[quote="rgminutillo"][quote="AndreyZ"]Hello,

And as for reading the documentation, I said in my original post that I have done do, and only found material about lazarus under windows, not linux. Maybe you can point me to a specific doc that covers installing myDAC into lazarus under linux, but I'll certainly go back and look again in any case.

RGM[/quote]

AndreyZ

Post by AndreyZ » Tue 26 Jul 2011 09:22

We have checked the MyDAC version 6.10.0.9 installation under Ubuntu 11.04 with Lazarus 0.9.30 and Free Pascal 2.4.2, and we did not encounter any problems. The point is that there are many changes in every new Lazarus build, so we test all DAC components with the latest Lazarus build. To solve the problem, please upgrade Lazarus to version 0.9.30 and Free Pascal to version 2.4.2.

rgminutillo
Posts: 6
Joined: Mon 25 Jul 2011 01:44

Post by rgminutillo » Tue 26 Jul 2011 18:46

[quote="AndreyZ"]We have checked the MyDAC version 6.10.0.9 installation under Ubuntu 11.04 with Lazarus 0.9.30 and Free Pascal 2.4.2, and we did not encounter any problems. The point is that there are many changes in every new Lazarus build, so we test all DAC components with the latest Lazarus build. To solve the problem, please upgrade Lazarus to version 0.9.30 and Free Pascal to version 2.4.2.[/quote]

Yeah, that's why everyone loves these support forums; I make a specific point about paths in your .lpk file files and you say try a different version of lazarus. Really helpful.

Look, when you guys 'test' these installations do you do it on a non-development machine that does not have source code on it? Has anyone else had success installing the trial version on any lazarus for linux version?

RGM

AndreyZ

Post by AndreyZ » Wed 27 Jul 2011 14:05

All paths in our packages are correct. The point is that some of them are applicable only for MyDAC edition with source code, but it doesn't influence MyDAC Trial Edition installation process.
Lazarus 0.9.28 had several bugs with paths which were fixed in Lazarus 0.9.30. Please try using Lazarus 0.9.30 and check if the problem persists.

rgminutillo
Posts: 6
Joined: Mon 25 Jul 2011 01:44

Post by rgminutillo » Sat 30 Jul 2011 16:47

[quote="AndreyZ"]All paths in our packages are correct. The point is that some of them are applicable only for MyDAC edition with source code, but it doesn't influence MyDAC Trial Edition installation process.
Lazarus 0.9.28 had several bugs with paths which were fixed in Lazarus 0.9.30. Please try using Lazarus 0.9.30 and check if the problem persists.[/quote]

The problem is exactly the same after fresh install using fpc 2.4.4 and lazarus 0.9.30. The IDE rebuld fails still with "can't find unit CRAccess used by DAC 10"

CRAccess.o and CRAccess.ppu are both in /usr/lib/lazarus/0.9.30/components/mydac/lib

I extract the packages directory from your tar into /usr/lib/lazarus/0.9.30/components/mydac

You insist your paths are correct, so am I extracting the files into the wrong place?

RGM

AndreyZ

Post by AndreyZ » Tue 02 Aug 2011 08:10

The lib directory must be in the /usr/lib/lazarus/0.9.30/components/mydac/packages directory. The lib directory is correctly located in the packages directory in the mydacfpc2.tar.gz archive. You can check it on your own by opening the mydacfpc2.tar.gz archive in Archive Manager. To solve the problem, you should move the lib directory from the /usr/lib/lazarus/0.9.30/components/mydac directory to the /usr/lib/lazarus/0.9.30/components/mydac/packages directory.

rgminutillo
Posts: 6
Joined: Mon 25 Jul 2011 01:44

Post by rgminutillo » Tue 02 Aug 2011 13:24

OK, I removed the previous installation and re-extracted the whole tar (not just the packages directory) to:

/usr/lib/lazarus/0.9.30/components/

so now exist

rgm@ubuntu:/usr/lib/lazarus/0.9.30/components$ ls -al mydac
total 132
drwxr-xr-x 5 root root 4096 2011-08-02 08:50 .
drwxr-xr-x 51 root root 4096 2011-08-02 08:50 ..
drwxr-xr-x 3 rgm users 4096 2011-07-19 09:37 demos
drwxr-xr-x 2 rgm users 4096 2011-07-19 09:37 doc
-rw-r--r-- 1 rgm users 29867 2011-07-19 09:37 FAQ.html
-rw-r--r-- 1 rgm users 67029 2011-07-19 09:37 History.html
-rw-r--r-- 1 rgm users 2356 2011-07-19 09:37 License.txt
drwxr-xr-x 3 rgm users 4096 2011-07-19 09:37 packages
-rw-r--r-- 1 rgm users 7158 2011-07-19 09:37 Readme.html

and lib is a subdirectory under packages.

The problem, however, persists: When the installation gets to the rebuilding stage this is the file lazarus produces:

{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}

[quote]
unit dac10;

interface

uses
CRAccess, DALoader, CRParser, DAConsts, DBMonitorMessages,
DBMonitorClient, DASQLMonitor, DBAccess, MemData, MemDataSet, VirtualTable,
CLRClasses, MemUtils, DAScript, DADump, CRBatchMove, CRConnectionPool,
CRXml, CRVio, CRVioTcp, CRVioTcpSSL, MTSCall, CRBase64, CRDataBuffer,
CRHttp, CRVioHttp, DAAlerter;

implementation

end.
[/quote]

And then it complains that it cannot compile and the specific error is that it cannot find CDAccess, the first file in the uses list. So it seems that even though /usr/lib/lazarus/0.9.30/components/mydac/packages/lib does exist and is populated, there's still an issue.

Your last answer was helpful because it did tell me exactly where to extract the files.

RGM

[quote="AndreyZ"]The lib directory must be in the /usr/lib/lazarus/0.9.30/components/mydac/packages directory. The lib directory is correctly located in the packages directory in the mydacfpc2.tar.gz archive. You can check it on your own by opening the mydacfpc2.tar.gz archive in Archive Manager. To solve the problem, you should move the lib directory from the /usr/lib/lazarus/0.9.30/components/mydac directory to the /usr/lib/lazarus/0.9.30/components/mydac/packages directory.[/quote]

AndreyZ

Post by AndreyZ » Thu 04 Aug 2011 07:51

I've checked this question thoroughly. I tried to reproduce this problem twice: under Ubuntu 10.04 and Lazarus 0.9.28, and under Ubuntu 11.04 and Lazarus 0.9.30. In both cases there were no problems with the MyDAC Trial Editon installation. Please try checking the paths you have in MyDAC packages in the following way:
- open the dclmydac10.lpk package and open Compiler Options;
- check that the Unit output directory (-FU) on the Paths tab is set to "lib";
- open the Inherited tab and check that all DAC packages have the "lib" unit path.
It will be better if you send screenshots of these tabs to andreyz*devart*com (please make sure all paths are visible on the screenshots). Also, please execute the following command in the terminal before compiling mydac (from the mydac directory):

Code: Select all

ls -R >1.txt
, and send the 1.txt file to me too.

Post Reply