<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 21, 2021 at 10:55 PM Bo Berglund via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, 21 Nov 2021 14:51:44 +0300, Mehmet Erol Sanliturk via lazarus<br>
<<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a>> wrote:<br>
<br>
>In this thread there is a point which is not clear for me :<br>
><br>
>Compile<br>
><br>
>(1)   programs in SERVER by using Lazarus installed in SERVER<br>
>(2)   programs in SERVER by using Lazarus installed in WORKSTATIONS<br>
<br>
I mean:<br>
Compile programs on the server (Lazarus running on the server) for use on any<br>
Linux machine based on The PC architecture (AMD/Intel CPU).<br></blockquote><div><br></div><div><br></div><div><br></div><div><br></div><div>I have read all of the messages in this thread starting from your initial email once more .<br></div><div><br></div><div>When you compile a program , it is possible to execute it another Windows machine by assuming <br></div><div>that the next Windows version is able to execute the program .</div><div><br></div><div>In the Linux ( or Unix ) world , this is NOT the case : Each Linux version of each Linux distribution has its OWN</div><div>library versions : There is NOT any standard library usage plan among the Linux versions or Linux distributions . <br></div><div>Therefore , it is very likely ( with respect to me : exactly ) that you will NOT be able to run your program in arbitrary Linux</div><div>distributions  IF YOU USE DYNAMICALLY LOADED LIBRARIES . I do not know the situation when you use statically <br></div><div>linked libraries . it is  always not possible to use static linking because each library does NOT have static libraries .</div><div>When there is not a static library , you need to compile the respective sources to obtain a static library <br></div><div>WITH A  SERIOUS CONSIDERATION OF  STATIC LINKING POSSIBILITY  BY STUDYING ITS LICENSE VERY CAREFULLY .<br></div><div><br></div><div><br></div><div><br></div><div>I can explain the situation with an example .</div><div><br></div><div>I have a Fedora Linux computer having a large number of repositories stored  in a different disk from the Fedora 28 installed disk .</div><div>During a country-wise electric fluctuation my Fedora 28 disk has been broken . I have installed Fedora 25 . Now ALL of the programs</div><div>are NOT executable because of dynamically loaded ( *.so ) libraries by giving an error message about  *.so library mismatch . <br></div><div>I will install Fedora 35 . This will also require recompilation of ALL of the repositories one by one .</div><div><br></div><div><br></div><div>Therefore , my opinion is your plan WILL NOT work if you use *.so libraries , and try them to execute in different Linux computers <br></div><div>with different *.so files . You may think that  ALL of the  *.so files of the libraries ARE the SAME :    NO ! <br></div><div>In your executable , the  EXACT   library version is recorded . During execution of the program , the *.so file is NOT loaded , but</div><div>its EXACT matching name is searched : If it is NOT found , it is giving a message saying that  the required   exact *.so file is not found :</div><div>*.so file with exact version number : for example : *.so.5.4.3 .</div><div><br></div><div><br></div><div>You need to check the static linking case whether it is possible to  execute your program in different  Linux ( versions , distributions ) .</div><div>I do not know the situation based on experiments because  in my NFS server , all of the clients have the same Fedora version . <br></div><div><br></div><div>Version of the NFS server may be different from the client versions ( assume NFS versions are the same or compatible ) .</div><div>In the NFS server , there are the following directories alongside the source directories :</div><div>    Executables_for_FreeBSD</div><div>    Executables_for_Linux</div><div><br></div><div>Previously , also</div><div><br></div><div>    Executables_for_Windows_XP</div><div>    Executables_for_Windows_7</div><div><br></div><div>I could NOT be able to connect to Windows_7 . Due to this I have removed  WIndows  directories and I have discontinued</div><div>use of Windows .</div><div><br></div><div>From any client I am compiling ( Lazarus is installed in the client , BUT you can install Lazarus in the server   IF YOUR VERSIONS OF <br></div><div>CLIENTS and SERVER ARE THE SAME in LINUX  if you use *.so libraries and use it from the clients . If you use static linking , please check the result . Do not forget that you will not be able to install Lazarus for FreeBSD in server because it is Linux ( or different from the client )  )  <br></div><div>programs by storing its executables into respective Linux or FreeBSD directory and execute the programs in any client from its respective <br></div><div>directory .<br></div><div><br></div><div><br></div><div>As a result , my idea about your setup is : It requires adjusting parameters of the components to obtain a consistent work</div><div>environment  with respect to your needs and availability of your tools  .<br></div><div><br></div><div><br></div><div>If you want to sell your program(s) to Linux user customers :  My suggestion would be ( you may think a much more suitable method ,</div><div>or some other experts may suggest other ways ) :<br></div><div><br></div><div>Ask  them to learn their Linux distribution and its version and hardware kind .<br></div><div>On a similar hardware and Linux distribution and version , install Lazarus , compile your program(s) from your source repository <br></div><div>and supply your program(s) to your customer . <br></div><div> </div><div><br></div><div>Mehmet Erol Sanliturk <br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
>other than use of cross compilation .<br>
<br>
I have never ever managed to set up a dev environment that could cross-compile,<br>
so I have to keep at least 3 different dev environments:<br>
<br>
- Linux on Raspberry Pi (ARM)<br>
- Linux on PC platform (AMD/Intel CPU)<br>
- Windows on PC (AMD/Intel CPU)<br>
<br>
By compiling on the target "metal" I am sure the programs will run properly...<br>
<br>
And for Linux I access the computers via VNC when I work. So I use my Windows 10<br>
box as the work environment always.<br>
<br>
<br>
-- <br>
Bo Berglund<br>
Developer in Sweden<br>
<br>
-- <br>
_______________________________________________<br>
lazarus mailing list<br>
<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a><br>
<a href="https://lists.lazarus-ide.org/listinfo/lazarus" rel="noreferrer" target="_blank">https://lists.lazarus-ide.org/listinfo/lazarus</a><br>
</blockquote></div></div>