RO/DA version 10.0.0.1497 Delphi 10.4.1 and Linux

Hi ,

when I try to compile a sample console RO project Delphi raise this exception:

[DCC Error] E2597 C:\Program Files (x86)\Embarcadero\Studio\21.0\bin\ld-linux.exe: error: cannot find -lz
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::deflate(System::Zlib::z_stream&, int): error: undefined reference to ‘deflate’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::deflateEnd(System::Zlib::z_stream&): error: undefined reference to ‘deflateEnd’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::inflate(System::Zlib::z_stream&, int): error: undefined reference to ‘inflate’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::inflateEnd(System::Zlib::z_stream&): error: undefined reference to ‘inflateEnd’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::deflateReset(System::Zlib::z_stream&): error: undefined reference to ‘deflateReset’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::inflateReset(System::Zlib::z_stream&): error: undefined reference to ‘inflateReset’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::crc32(unsigned int, unsigned char*, unsigned int): error: undefined reference to ‘crc32’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::deflateInit_(System::Zlib::z_stream&, int, char*, int): error: undefined reference to ‘deflateInit_’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::inflateInit_(System::Zlib::z_stream&, char*, int): error: undefined reference to ‘inflateInit_’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::deflateInit2_(System::Zlib::z_stream&, int, int, int, int, int, char*, int): error: undefined reference to ‘deflateInit2_’
c:\program files (x86)\embarcadero\studio\21.0\lib\Linux64\release\System.ZLib.o:System.ZLib:function System::Zlib::inflateInit2_(System::Zlib::z_stream&, int, char*, int): error: undefined reference to ‘inflateInit2_’

I have already configured the Linux environment (Ubuntu 20.04 server) as explained in the documentation:

http://docwiki.embarcadero.com/RADStudio/Sydney/en/Linux_Application_Development#Installing_Development_Packages

If I try to compile standard console app or webbrocker Apache module compile fine.

Any help?

Thank you very much

Hi,

according to https://quality.embarcadero.com/browse/RSP-17811 , you should install zlib1g-dev package as
sudo apt-get install zlib1g-dev

Hi EvgenyK

thank for your answer but I have already installed the zlib1g package.

If I compile a standard Apache module, I can compile fine. Same if I try to compile a simple console app.

When I try to compile a RO app Delphi raise the above exception

Thank you very much and best regards

Hi,

try to compile a simple console app that uses System.Zlib unit like

program aaa;
{$APPTYPE CONSOLE}
uses System.Zlib;
var
  k: z_stream;
begin
  deflate(k,0);
end.

will it be compiled correctly?


have you updated Linux SDK at Delphi IDE->Tools->Options->Deployment->SDK Manager after calling sudo apt-get install zlib1g-dev ?

1 Like

Hi EvgenyK

no, not compile!

But I have installed the package and update linux SDK.

I have to investigate. Thanks for the support

Hi EvgenyK

After I dropped, reinstalled PAServer and reimported SDK all work fine!

sorry if I wasted your time!

Thank you very much for your support!

1 Like