Page 1 of 1

ODAC 8.0.1 with Lazarus linux 32-bit

Posted: Sun 02 Oct 2011 17:16
by jscheid
Hi,

I got a linker error while installing dlcodac10.lpk in Lazarus IDE under Linux 32 bit enviroment - I use OpenSuSe 11.4 and also Ubuntu 10.04.3 / FPC 2.4.2 and also 2.4.0 / Lazarus 0.9.30 :
- Compiling of package is OK, without any error message but
- Installing ends up with following messages:

Code: Select all

Free Pascal Compiler version 2.4.2 [2011/03/25] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for i386
Compiling lazarus.pp
Compiling resource ../units/i386-linux/lazarus.or
Linking ../lazarus
/usr/bin/ld: warning: ../link.res contains output sections; did you forget -T?
/home/jscheid/Projekte/ODAC/Lib/Lazarus1/linux/MemData.o: In function `MEMDATA_TCRBLOBDATA_$__READ$LONGWORD$LONGWORD$POINTER$$LONGWORD':
MemData.pas:(.text+0x10c08): undefined reference to `MEMUTILS_PTROFFSET$POINTER$INT64$$POINTER'
MemData.pas:(.text+0x10c1e): undefined reference to `MEMUTILS_PTROFFSET$POINTER$INT64$$POINTER'
/home/jscheid/Projekte/ODAC/Lib/Lazarus1/linux/MemData.o: In function `MEMDATA_TCRBLOBDATA_$__WRITE$LONGWORD$LONGWORD$POINTER':
MemData.pas:(.text+0x10d62): undefined reference to `MEMUTILS_PTROFFSET$POINTER$INT64$$POINTER'
MemData.pas:(.text+0x10d75): undefined reference to `MEMUTILS_PTROFFSET$POINTER$INT64$$POINTER'
/home/jscheid/Projekte/ODAC/Lib/Lazarus1/linux/MemDataSet.o: In function `MEMDATASET_TMEMDATASET_$__GETFIELDDATA$TFIELD$POINTER$$BOOLEAN':
MemDataSet.pas:(.text+0x1fee): undefined reference to `MEMUTILS_PTROFFSET$POINTER$INT64$$POINTER'
/home/jscheid/Projekte/ODAC/Lib/Lazarus1/linux/MemDataSet.o:MemDataSet.pas:(.text+0x22a0): more undefined references to `MEMUTILS_PTROFFSET$POINTER$INT64$$POINTER' follow
lazarus.pp(130,1) Error: Error while linking
lazarus.pp(130,1) Fatal: There were 1 errors compiling module, stopping
TMessagesView.CollectLineParts WARNING: 2312 SrcLine=lazarus.pp(130,1) Fatal: There were 1 errors compiling module, stopping
TExternalToolList.Run Exception: /usr/lib/lazarus/ide/lazarus.pp(130,1) Fatal: There were 1 errors compiling module, stopping
TMainIDE.DoOpenEditorFile ignoring special file: /usr/lib/lazarus/ide/
I try the same with ODAC version 6.90 without any error - at this time I have no password for ODAC source code version 7 ...

Best Regards,
Juergen

Posted: Mon 03 Oct 2011 10:09
by AlexP
Hello,

Thank you for the information, we have reproduced and fixed the problem.
This fix will be included in the next product version.
For the time being you should make the following changes in the MemUtils.pas file:

add the {$IFNDEF FPC} directory in the 688 line and {$ENDIF} in the 697 line;

Code: Select all

{$IFNDEF FPC} - add
function PtrOffset(Value: IntPtr; Offset: Int64): IntPtr;
begin
{$IFDEF CLR}
  Result := IntPtr(Value.ToInt64 + Offset);
{$ELSE}
  Result := IntPtr(Int64(Value) + Offset);
{$ENDIF}
end;                                       
{$ENDIF} - add

Posted: Mon 03 Oct 2011 12:17
by jscheid
Thanks a lot - it works now !
:)

Posted: Mon 03 Oct 2011 13:56
by AlexP
Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.