Recent

Author Topic: What are requirement files to run a compiled Lazarus app in linux?  (Read 2344 times)

incendio

  • Sr. Member
  • ****
  • Posts: 269
Hi guys,

I am new in Lazarus and Linux.

Just tried latest Lazarus on windows and on linux mint.

I came from C++ Builder and using Firebird as a database server.

On Windows, to run my app on client side, it only need to supply compiled app and fbclient.dll without a need to install Firebird.

How about in linux?

Beside supply compiled app, should I also install firebird ? What about fpc, should it install too ?

Thanks in advance.

Regards,
Sugi

« Last Edit: December 10, 2018, 09:50:30 am by incendio »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #1 on: December 10, 2018, 12:54:36 pm »
Should be the same, however, normally Linux distro maintainer has the client lib as a package already. You can still supply your own, but it has to be put somewhere the dynamic linker can find, and that may interfere with the one installed from package manager.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #2 on: December 10, 2018, 01:21:00 pm »
Note that FPC has some ways to workaround a differently named clientlibrary.

If you deploy to targets that seem to name the library differently call

ibase60dyn.initialiseIBase60(Const LibraryName : AnsiString) : integer;

with your libraryname/location in the .dpr before the application.* calls

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #3 on: December 10, 2018, 01:42:45 pm »
Particularly for Firebird there are variations (and possible discrepancies) between different distros and FB's versions 2.x and 3, binary or source packages, and full-server or client-only installations.

For a Mint (as a Debian-based) it should be enough to install libfbclient2 package.

Also (depending on FB version you're using) probably you'll need to tweak IBConnection's client library (to load right libfbclient.so.xxx) with TSQLDBLibraryLoader.
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

incendio

  • Sr. Member
  • ****
  • Posts: 269
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #4 on: December 12, 2018, 03:13:12 am »
Hi guys,

Thanks for your replied.

I tried to run compile lazarus app in target comp, it didn't run.
When I click the app, Message Box pop up, asked for what app should open this app.
If I run this app in development comp, it runs OK.

Here are my setup :
=============
Development PC :
Linux Mint 18.2 Cinamon 64, Lazarus 1.8.4, Firebird 3.0.3 Superserver.
Project Options in Lazarus set to default.

Target comp :
Linux Mint 19 XFCE, fresh install.
libfbclient.so.3.0.3 included in the same folder with app.

Both deployment and target comp are running in virtual box.

Am I missing something here?

Thanks in advance.

Regards,
Sugi



HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #5 on: December 12, 2018, 05:14:14 am »
Hi guys,

Thanks for your replied.

I tried to run compile lazarus app in target comp, it didn't run.
When I click the app, Message Box pop up, asked for what app should open this app.
If I run this app in development comp, it runs OK.

Here are my setup :
=============
Development PC :
Linux Mint 18.2 Cinamon 64, Lazarus 1.8.4, Firebird 3.0.3 Superserver.
Project Options in Lazarus set to default.

Target comp :
Linux Mint 19 XFCE, fresh install.
libfbclient.so.3.0.3 included in the same folder with app.

Both deployment and target comp are running in virtual box.

Am I missing something here?

Thanks in advance.

Regards,
Sugi
have you set the executable attribute to the copied file? It looks like you have not.
« Last Edit: December 12, 2018, 06:00:18 am by HeavyUser »

incendio

  • Sr. Member
  • ****
  • Posts: 269
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #6 on: December 12, 2018, 06:21:11 am »
You were right.

Have set it and now can run, but now, having trouble to connect to Firebird Server.

I use TSQLConnector, TSQLTransaction, and TSQLDBLibraryLoader.
LibraryName in TSQLDBLibraryLoader set to libfbclient.so.3.0.3

libfbclient.so.3.0.3 is placed in the same folder of compiled app and copied to folder /usr/lib/x86_64-linux-gnu/

Database is a remote database.
When tried to connect to database, got error :

Cannot load default Firbebird clients(libfbclient.so.2.5.1 ....)

I got the same error on development comp when run the app, but it could be fix with this command :
Code: Pascal  [Select][+][-]
  1. sudo ln /usr/lib/x86_64-linux-gnu/libfbclient.so.2 /usr/lib/x86_64-linux-gnu/libfbclient.so

But, on the target comp, the same command couldn't fix the error.

Please tell me how to fix this error.

Thanks in advance.

Regards,
Sugi

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #7 on: December 12, 2018, 06:25:37 am »
You were right.

Have set it and now can run, but now, having trouble to connect to Firebird Server.

I use TSQLConnector, TSQLTransaction, and TSQLDBLibraryLoader.
LibraryName in TSQLDBLibraryLoader set to libfbclient.so.3.0.3

libfbclient.so.3.0.3 is placed in the same folder of compiled app and copied to folder /usr/lib/x86_64-linux-gnu/

Database is a remote database.
When tried to connect to database, got error :

Cannot load default Firbebird clients(libfbclient.so.2.5.1 ....)

I got the same error on development comp when run the app, but it could be fix with this command :
Code: Pascal  [Select][+][-]
  1. sudo ln /usr/lib/x86_64-linux-gnu/libfbclient.so.2 /usr/lib/x86_64-linux-gnu/libfbclient.so

But, on the target comp, the same command couldn't fix the error.

Please tell me how to fix this error.

Thanks in advance.

Regards,
Sugi
you need to install the firebird client libraries on the target computer as well. the command you posted requires an existing installation to work.

incendio

  • Sr. Member
  • ****
  • Posts: 269
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #8 on: December 12, 2018, 08:27:45 am »
You were right.

Have set it and now can run, but now, having trouble to connect to Firebird Server.

I use TSQLConnector, TSQLTransaction, and TSQLDBLibraryLoader.
LibraryName in TSQLDBLibraryLoader set to libfbclient.so.3.0.3

libfbclient.so.3.0.3 is placed in the same folder of compiled app and copied to folder /usr/lib/x86_64-linux-gnu/

Database is a remote database.
When tried to connect to database, got error :

Cannot load default Firbebird clients(libfbclient.so.2.5.1 ....)

I got the same error on development comp when run the app, but it could be fix with this command :
Code: Pascal  [Select][+][-]
  1. sudo ln /usr/lib/x86_64-linux-gnu/libfbclient.so.2 /usr/lib/x86_64-linux-gnu/libfbclient.so

But, on the target comp, the same command couldn't fix the error.

Please tell me how to fix this error.

Thanks in advance.

Regards,
Sugi
you need to install the firebird client libraries on the target computer as well. the command you posted requires an existing installation to work.

So Lazarus still need Firebird install in target comp. Thanks for the clarification about that.
Regards,
Sugi.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: What are requirement files to run a compiled Lazarus app in linux?
« Reply #9 on: December 12, 2018, 08:54:00 am »
So Lazarus still need Firebird install in target comp.
If you are talking about Firebird Embedded then take a look at this:
http://wiki.lazarus.freepascal.org/Firebird_embedded

Here is also the main Firebird wiki:
http://wiki.lazarus.freepascal.org/Firebird

Btw. Your topic title is misleading a little. Although you have interest in general Lazarus linux application running requirements, debate's direction seams to be Lazarus Firebird linux application running requirements...
« Last Edit: December 12, 2018, 08:58:48 am by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018