Installing on Lazarus 2.3

Theres any way to extract packages only without run on windows? i want to test latest version on lazarus linux only.

Theres any indy version recomended for this enviroment? im using one indy package a little old.

Best regards

Hi,

We ship Data Abstract only as windows installer.

You can use any Indy version. I can recommend to use Indy 10.6.2 (or later).

if you are using 10.6.2+, uncomment this define in RemObjects.inc:

{.$DEFINE RemObjects_INDY10E}

Hi,

I can suggest to test .1559. this one is Lazarus friendly

Hi.
Which version works with da? stable lazarus dont work in linux.

Screenshot from 2023-04-27 18-32-16

EW
uEWCodeProcessor.pas(53,3) Error: Identifier not found “CoCreateGuid”

Remobjects_core
uROCustomRODLReader.pas(63,3) Error: Identifier not found “InitializeCriticalSection”

How can i help to solve this?

Hi,

replace CoCreateGuid with CreateGuid

Add uROSystem to uses in interface section.

only fo fpc?

Hi,

these changes are valid for Delphi too.
I’ve merged it to main trunk already

1 Like

Please test the lazarus install for serverindy package. keeps failing,
another one

uROSocketUtils.pas(458,18) Error: Identifier not found “ESysSYSNOTREADY”

i solve this way

  {$IFNDEF LINUX}
  ESYSNOTREADY = ESysSYSNOTREADY;
  {$ENDIF}

but then

uROSocketUtils.pas(1384,3) Error: Identifier not found “gethostname”

Logged as bugs://D19342.

Hi,

update

  • uROSocketUtils.pas as
      {$IFNDEF MSWINDOWS}baseunix, cnetdb, termio, unix,{$ENDIF}  // `unix` unit was added
...
const
  SD_SEND    = $01; //added
  SD_BOTH    = $02; //added
  _SS_MAXSIZE = 128;
...
  ESYSNOTREADY = ESysEOPNOTSUPP; // changed
..
function RO_gethostname: string; //added
begin                            //added
  Result := GetHostname;         //added
end;                             //added
{$ELSE}                          //added

function RO_gethostname: string;
var
  l_hostName: TBytes;
begin
  SetLength(l_hostName, MAX_PATH + 1);
  FillChar(l_hostName[0], MAX_PATH + 1, 0);
  gethostname(Pointer(@l_hostName[0]), MAX_PATH);
  Result := AnsiBytesToString(PByte(@l_hostName[0]));
end;
{$ENDIF}                           //added

initialization
  • uROCodegen4Helper.pas: put content of interface/implementation section into into {$IFDEF MSWINDOWS}..{$ENDIF} so it will be designed only for Windows platform
  • uDALookupWizard.pas: remove Windows unit from uses section
1 Like

bugs://D19342 was closed as fixed.

Was not fixed for linux.Change RO_gesthostname function to this:

function RO_gethostname: string;
{$IFDEF FPC}
begin
  {$IFDEF UNIX}
    result := GetHostName;
  {$ELSE}
    result := GetEnvironmentVariable('COMPUTERNAME');
  {$ENDIF}
end;
{$ELSE}
var
  l_hostName: TBytes;
begin
  SetLength(l_hostName, MAX_PATH + 1);
  FillChar(l_hostName[0], MAX_PATH + 1, 0);
  gethostname(Pointer(@l_hostName[0]), MAX_PATH);
  Result := AnsiBytesToString(PByte(@l_hostName[0]));
end;
{$ENDIF}

Im not sure if this works ok, if dont please let me know.

Best regards.

Hi,

I’m not sure that this is needed.

we already have

{$IFNDEF DELPHI_or_MSWINDOWS}
// fpc/non-windows 
function RO_gethostname: string;
begin
  Result := GetHostname;
end;

{$ELSE}
// delphi or fpc/windows
// `gethostname` is present in `...\source\packages\rtl-extra\src\win\winsock2.pp` 
function RO_gethostname: string;
var
  l_hostName: TBytes;
begin
  SetLength(l_hostName, MAX_PATH + 1);
  FillChar(l_hostName[0], MAX_PATH + 1, 0);
  gethostname(Pointer(@l_hostName[0]), MAX_PATH);
  Result := AnsiBytesToString(PByte(@l_hostName[0]));
end;
{$ENDIF}

Im not in the latest version because it fails on Delphi/linux, remember?

Just need to fix this problem.

Will try your code, thanks

Hi,

this is #19342:

looks like, you have applied it incorrectly

Right, just because was missing

{$IFNDEF DELPHI_or_MSWINDOWS}
// fpc/non-windows

part.

Is ok now, thanks a lot