Running a program compiled by Lazarus in another linux lazarus / 66-Unix ---------------------------------------------------------------------- nullpointer · 2017-07-04 06:27 I tried to make a simple application using lazarus in linux (Ubuntu 16.04). After compile it, I try to run the compiled app in another linux machine but the app cannot run. I've tried using chmod + x appname command but nothing happen. the App can only run on ubuntu 16.04. what the problem? ---------------------------------------------------------------------- Thaddy · 2017-07-04 06:53 Try this simple program and see if that will run on both machines. If it does, you have a dependency issue and probably have to install some libraries on the other machine or link statically. Save and compile it from a console as: fpc -CX -XXs test.pas run as ./test Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program test; // program without external dependenciesbegin  writeln('test');  readln;end. Also: - has the second machine a compatible processor? i.e. you can't run arm code on an intel - has the second machine the same bitness? you can't run 64 bit code on a 32 bit installation ---------------------------------------------------------------------- Handoko · 2017-07-04 08:08 To check your application setting for machine compatibility (as what Thaddy said), do this: Lazarus main menu > Project > Project Options > Config and Target ---------------------------------------------------------------------- nullpointer · 2017-07-04 23:52 Quote from: Thaddy on July 04, 2017, 08:53:33 amTry this simple program and see if that will run on both machines. If it does, you have a dependency issue and probably have to install some libraries on the other machine or link statically. Save and compile it from a console as: fpc -CX -XXs test.pas run as ./test Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program test; // program without external dependenciesbegin  writeln('test');  readln;end. Also: - has the second machine a compatible processor? i.e. you can't run arm code on an intel - has the second machine the same bitness? you can't run 64 bit code on a 32 bit installation thank you thaddy. i think, it may i compiled on 64 bit and run it on 32 bit. ---------------------------------------------------------------------- nullpointer · 2017-07-04 23:54 Quote from: Handoko on July 04, 2017, 10:08:42 amTo check your application setting for machine compatibility (as what Thaddy said), do this: Lazarus main menu > Project > Project Options > Config and Target terima kasih solusinya mas bro. salam kenal. ---------------------------------------------------------------------- Handoko · 2017-07-05 04:50 Nice to meet you here. ---------------------------------------------------------------------- marcov · 2017-07-05 09:56 ldd ./appname and file appname can give you some info. Specially if you compare it with binaries that come with the distribution ---------------------------------------------------------------------- Thaddy · 2017-07-05 10:04 Marco, he tried to run a 64bit compiled executable on a 32 bit platform... ---------------------------------------------------------------------- nullpointer · 2017-07-06 06:59 Why in windows there is no difference between 32 and 64. app that are compiled on a 32 bit can also run on 64 bits. ---------------------------------------------------------------------- Thaddy · 2017-07-06 07:52 But not the other way around. 64 bit won't run on 32 bit. In linux this is the same, but on most systems you have to install multi-arch to run 32 bit code on 64 bit linux. sudo apt-get install multiarch-support for debians like ubuntu. Alternatvely you can install a chrooted minimal 32 bit subsystem, but that's more complex.