Sign in Join

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

Mailing lists / lazarus / 2021-09

Lazarus - Cant compile ZeosDBO

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Terry A. Haimann

I just bought a new laptop and tring to set up Lazarus. The problem is installing ZeosDBO into Lazarus.

This is on Linux Mint/Mate 20.2 on an i5-1135G7

fpc -v
Free Pascal Compiler version 3.2.0 [2020/07/07] for x86_64 Copyright (c) 1993-2020 by Florian Klaempfl and others Fatal: No source file name in command line
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

Lazarus Ver 2.0.12
Date 2021-02-21

/home/terry/ZeosDBO/src/plain/ZPlainFirebirdDriver.pas(249,26) Error: (5042) No matching implementation for interface method "Initialize(const AnsiString);" found
/home/terry/ZeosDBO/src/plain/ZPlainFirebirdDriver.pas(249,26) Error: (5042) No matching implementation for interface method "Initialize(const AnsiString);" found
/home/terry/ZeosDBO/src/plain/ZPlainFirebirdDriver.pas(528,1) Fatal: (10026) There were 2 errors compiling module, stopping Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

I am getting two errors when trying to compile and this seems to be the line it is complaining about:

TZFirebirdBaseDriver = class (TZAbstractPlainDriver, IZPlainDriver, IZInterbasePlainDriver)

    FIREBIRD_API : TZFIREBIRD_API;

I ran startlazarus as root and then did a

Package->Open Package File(lpk)

I then pointed it to ZeosDBO/packages/lazarus/zcomponent.lpk and clicked compile button. The file it is failing on is ZPlainFirebirdDriver.

Thanks for your attention.

Reply by email

Luca Olivetti
to Terry A. Haimann

El 19/9/21 a les 23:39, Terry A. Haimann via lazarus ha escrit:

I just bought a new laptop and tring to set up Lazarus. The problem is installing ZeosDBO into Lazarus.

This is the version of zeosdbo I have installed, both under windows and linux (I don't know if I should use any later or previous version, this one seems to be working fine for my projects):

$ svn info
Path: .
Working Copy Root Path: /home/luca/Datos/lazextra/zeosdbo/7.2-patches URL: https://svn.code.sf.net/p/zeoslib/code-0/branches/7.2-patches Relative URL: ^/branches/7.2-patches
Repository Root: https://svn.code.sf.net/p/zeoslib/code-0 Repository UUID: d681b350-854c-439c-a81d-c0ce20710203 Revision: 5601
Node Kind: directory
Schedule: normal
Last Changed Author: egonhugeist
Last Changed Rev: 5597
Last Changed Date: 2019-04-18 21:29:12 +0200 (dj., 18 d’abr. 2019)

I have a local patch applied but it's only for postgresql

$ svn diff
Index: src/dbc/ZDbcPostgreSql.pas
=================================================================== --- src/dbc/ZDbcPostgreSql.pas (revision 5601)
+++ src/dbc/ZDbcPostgreSql.pas (working copy)
@@ -566,6 +566,12 @@

    if Info.Values['sslrootcert']  '' then

AddParamToResult('sslrootcert', Info.Values['sslrootcert']); if Info.Values['sslcrl'] '' then AddParamToResult('sslcrl', Info.Values['sslcrl']);

+  { tcp keepalives }
+  if Info.Values['keepalives']  '' then
AddParamToResult('keepalives',Info.Values['keepalives']);
+  if Info.Values['keepalives_idle']  '' then
AddParamToResult('keepalives_idle',Info.Values['keepalives_idle']);
+  if Info.Values['keepalives_interval']  '' then
AddParamToResult('keepalives_interval',Info.Values['keepalives_interval']);
+  if Info.Values['keepalives_count']  '' then
AddParamToResult('keepalives_count',Info.Values['keepalives_count']);
+
    { Sets a connection timeout. }
    ConnectTimeout := StrToIntDef(Info.Values['timeout'], -1);
    if ConnectTimeout >= 0 then
@@ -1083,7 +1089,7 @@
          DriverManager.LogMessage(lcTransaction, ConSettings^.Protocol,
cCommit);
        PError :=
FPlainDriver.GetResultErrorField(QueryHandle,PG_DIAG_SQLSTATE);
        //transaction aborted and in postre zombi status? If so a
rollback is required
-      if (ZSysUtils.ZMemLComp(PError, current_transaction_is_aborted,
5) = 0) then begin
+      if (PErrornil) and (Perror^  #0) and
(ZSysUtils.ZMemLComp(PError, current_transaction_is_aborted, 5) = 0)
then begin
          FPlainDriver.PQclear(QueryHandle);
          QueryHandle := FPlainDriver.ExecuteQuery(FHandle,
Pointer(cRollback));
        end;

Bye

Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email

Terry A. Haimann
to Mattias Gaertner

Well, how do you install something like ZeosDBO then? If the compile is successful, it is going to want to rebuild Lazarus and Lazarus is in a protected directory.

Terry

Mattias Gaertner wrote 11 lines
On Sun, 19 Sep 2021 16:39:01 -0500 "Terry A. Haimann via lazarus" wrote: > [...] > I ran startlazarus as root ouch Not recommended. Mattias

Reply by email

Terry A. Haimann
to Luca Olivetti: El 19/9/21 a les 23:39, Terry A. Haimann via lazarus ha escrit: This is the version of…

I don't understand what you are doing here. All I want is access to MariaDB. I beleive it is using mysql80conn.

Terry

Luca Olivetti wrote 78 lines
El 19/9/21 a les 23:39, Terry A. Haimann via lazarus ha escrit: > I just bought a new laptop and tring to set up Lazarus. The > problem is > installing ZeosDBO into Lazarus. This is the version of zeosdbo I have installed, both under windows and linux (I don't know if I should use any later or previous version, this one seems to be working fine for my projects): $ svn info Path: . Working Copy Root Path: /home/luca/Datos/lazextra/zeosdbo/7.2-patches URL: https://svn.code.sf.net/p/zeoslib/code-0/branches/7.2-patches Relative URL: ^/branches/7.2-patches Repository Root: https://svn.code.sf.net/p/zeoslib/code-0 Repository UUID: d681b350-854c-439c-a81d-c0ce20710203 Revision: 5601 Node Kind: directory Schedule: normal Last Changed Author: egonhugeist Last Changed Rev: 5597 Last Changed Date: 2019-04-18 21:29:12 +0200 (dj., 18 d’abr. 2019) I have a local patch applied but it's only for postgresql $ svn diff Index: src/dbc/ZDbcPostgreSql.pas =================================================================== --- src/dbc/ZDbcPostgreSql.pas (revision 5601) +++ src/dbc/ZDbcPostgreSql.pas (working copy) @@ -566,6 +566,12 @@ if Info.Values['sslrootcert'] '' then AddParamToResult('sslrootcert', Info.Values['sslrootcert']); if Info.Values['sslcrl'] '' then AddParamToResult('sslcrl', Info.Values['sslcrl']); + { tcp keepalives } + if Info.Values['keepalives'] '' then AddParamToResult('keepalives',Info.Values['keepalives']); + if Info.Values['keepalives_idle'] '' then AddParamToResult('keepalives_idle',Info.Values['keepalives_idle']); + if Info.Values['keepalives_interval'] '' then AddParamToResult('keepalives_interval',Info.Values['keepalives_interv al']); + if Info.Values['keepalives_count'] '' then AddParamToResult('keepalives_count',Info.Values['keepalives_count']); + { Sets a connection timeout. } ConnectTimeout := StrToIntDef(Info.Values['timeout'], -1); if ConnectTimeout >= 0 then @@ -1083,7 +1089,7 @@ DriverManager.LogMessage(lcTransaction, ConSettings^.Protocol, cCommit); PError := FPlainDriver.GetResultErrorField(QueryHandle,PG_DIAG_SQLSTATE); //transaction aborted and in postre zombi status? If so a rollback is required - if (ZSysUtils.ZMemLComp(PError, current_transaction_is_aborted, 5) = 0) then begin + if (PErrornil) and (Perror^ #0) and (ZSysUtils.ZMemLComp(PError, current_transaction_is_aborted, 5) = 0) then begin FPlainDriver.PQclear(QueryHandle); QueryHandle := FPlainDriver.ExecuteQuery(FHandle, Pointer(cRollback)); end; Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email

Mattias Gaertner
to Terry A. Haimann: Well, how do you install something like ZeosDBO then? If the compile is successful, it…
Well, how do you install something like ZeosDBO then? If the compile is successful, it is going to want to rebuild Lazarus and Lazarus is in a protected directory.

Lazarus checks if the output folder is writable. If not, it creates instead a folder in your config directory.

Mattias

Show quoted text 17 lines
Terry On Mon, 2021-09-20 at 09:45 +0200, Mattias Gaertner via lazarus wrote: > On Sun, 19 Sep 2021 16:39:01 -0500 > "Terry A. Haimann via lazarus" > wrote: > > [...] > > I ran startlazarus as root > > ouch > > Not recommended. > > Mattias

Reply by email

Luca Olivetti
to Terry A. Haimann: I don't understand what you are doing here. All I want is access to MariaDB. I beleive…

El 20/9/21 a les 13:32, Terry A. Haimann via lazarus ha escrit:

I don't understand what you are doing here. All I want is access to MariaDB. I beleive it is using mysql80conn.

I was just telling you the version I'm using and that compiles fine with lazarus 2.0.12/fpc 3.2.0

Bye

Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email